Browse Source

Move <li> tag out of post_action_toggle_button

merge-requests/110/head
Deimos 5 years ago
parent
commit
eee2f2a03c
  1. 2
      tildes/tildes/templates/macros/buttons.jinja2
  2. 6
      tildes/tildes/templates/macros/comments.jinja2
  3. 4
      tildes/tildes/templates/macros/topics.jinja2
  4. 8
      tildes/tildes/templates/topic.jinja2

2
tildes/tildes/templates/macros/buttons.jinja2

@ -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) %}

6
tildes/tildes/templates/macros/comments.jinja2

@ -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) %}

4
tildes/tildes/templates/macros/topics.jinja2

@ -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>

8
tildes/tildes/templates/topic.jinja2

@ -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

Loading…
Cancel
Save