Browse Source

Move <li> tag out of post_action_toggle_button

merge-requests/102/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 %}
{% 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) %}

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

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

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

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

8
tildes/tildes/templates/topic.jinja2

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

Loading…
Cancel
Save