Move <li> tag out of post_action_toggle_button

This commit is contained in:
Deimos
2020-02-09 16:19:04 -07:00
parent a4b52086bd
commit eee2f2a03c
4 changed files with 9 additions and 11 deletions
@@ -45,7 +45,6 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
<li>
{% if not is_toggled %} {% if not is_toggled %}
<button class="btn-post-action" <button class="btn-post-action"
{% if trigger_name %}name="{{ trigger_name }}"{% endif %} {% if trigger_name %}name="{{ trigger_name }}"{% endif %}
@@ -61,7 +60,6 @@
{% if toggled_confirm %}data-ic-confirm="{{ toggled_confirm }}"{% endif %} {% if toggled_confirm %}data-ic-confirm="{{ toggled_confirm }}"{% endif %}
>{{ toggled_label }}</button> >{{ toggled_label }}</button>
{% endif %} {% endif %}
</li>
{% endmacro %} {% endmacro %}
{% macro _post_action_toggle_button_url(route_name, subject) %} {% macro _post_action_toggle_button_url(route_name, subject) %}
@@ -159,7 +159,7 @@
{% endif %} {% endif %}
{% if request.has_permission('vote', comment) %} {% if request.has_permission('vote', comment) %}
{{ post_action_toggle_button("vote", comment, is_toggled=comment.user_voted) }} <li>{{ post_action_toggle_button("vote", comment, is_toggled=comment.user_voted) }}</li>
{% endif %} {% endif %}
{% if request.has_permission('label', comment) %} {% if request.has_permission('label', comment) %}
@@ -190,11 +190,11 @@
{% endif %} {% endif %}
{% if request.has_permission('bookmark', comment) %} {% if request.has_permission('bookmark', comment) %}
{{ post_action_toggle_button("bookmark", comment, is_toggled=comment.user_bookmarked) }} <li>{{ post_action_toggle_button("bookmark", comment, is_toggled=comment.user_bookmarked) }}</li>
{% endif %} {% endif %}
{% if request.has_permission("remove", comment) %} {% if request.has_permission("remove", comment) %}
{{ post_action_toggle_button("remove", comment, comment.is_removed) }} <li>{{ post_action_toggle_button("remove", comment, comment.is_removed) }}</li>
{% endif %} {% endif %}
{% if request.has_permission('reply', comment) %} {% if request.has_permission('reply', comment) %}
+2 -2
View File
@@ -209,11 +209,11 @@
</button> </button>
<menu class="menu"> <menu class="menu">
{% if request.has_permission("bookmark", topic) %} {% if request.has_permission("bookmark", topic) %}
{{ post_action_toggle_button("bookmark", topic, is_toggled=topic.user_bookmarked) }} <li>{{ post_action_toggle_button("bookmark", topic, is_toggled=topic.user_bookmarked) }}</li>
{% endif %} {% endif %}
{% if request.has_permission("ignore", topic) %} {% if request.has_permission("ignore", topic) %}
{{ post_action_toggle_button("ignore", topic, is_toggled=topic.user_ignored, trigger_name="topic-actions-ignore") }} <li>{{ post_action_toggle_button("ignore", topic, is_toggled=topic.user_ignored, trigger_name="topic-actions-ignore") }}</li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
+4 -4
View File
@@ -166,19 +166,19 @@
{% endif %} {% endif %}
{% if request.has_permission('lock', topic) %} {% if request.has_permission('lock', topic) %}
{{ post_action_toggle_button("lock", topic, topic.is_locked) }} <li>{{ post_action_toggle_button("lock", topic, topic.is_locked) }}</li>
{% endif %} {% endif %}
{% if request.has_permission('bookmark', topic) %} {% if request.has_permission('bookmark', topic) %}
{{ post_action_toggle_button("bookmark", topic, is_toggled=topic.user_bookmarked) }} <li>{{ post_action_toggle_button("bookmark", topic, is_toggled=topic.user_bookmarked) }}</li>
{% endif %} {% endif %}
{% if request.has_permission("ignore", topic) %} {% if request.has_permission("ignore", topic) %}
{{ post_action_toggle_button("ignore", topic, is_toggled=topic.user_ignored) }} <li>{{ post_action_toggle_button("ignore", topic, is_toggled=topic.user_ignored) }}</li>
{% endif %} {% endif %}
{% if request.has_permission("remove", topic) %} {% if request.has_permission("remove", topic) %}
{{ post_action_toggle_button("remove", topic, topic.is_removed) }} <li>{{ post_action_toggle_button("remove", topic, topic.is_removed) }}</li>
{% endif %} {% endif %}
{# Only show "View Markdown" (and dropdown) when it's a text topic and the user is {# Only show "View Markdown" (and dropdown) when it's a text topic and the user is