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

View File

@@ -45,7 +45,6 @@
{% endif %}
{% endif %}
<li>
{% if not is_toggled %}
<button class="btn-post-action"
{% if trigger_name %}name="{{ trigger_name }}"{% endif %}
@@ -61,7 +60,6 @@
{% if toggled_confirm %}data-ic-confirm="{{ toggled_confirm }}"{% endif %}
>{{ toggled_label }}</button>
{% endif %}
</li>
{% endmacro %}
{% macro _post_action_toggle_button_url(route_name, subject) %}

View File

@@ -159,7 +159,7 @@
{% endif %}
{% 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 %}
{% if request.has_permission('label', comment) %}
@@ -190,11 +190,11 @@
{% endif %}
{% 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 %}
{% 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 %}
{% if request.has_permission('reply', comment) %}

View File

@@ -209,11 +209,11 @@
</button>
<menu class="menu">
{% 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 %}
{% 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 %}
</ul>
</div>

View File

@@ -166,19 +166,19 @@
{% endif %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{# Only show "View Markdown" (and dropdown) when it's a text topic and the user is