Browse Source

Add special sorting/style for group wiki pages called "index"

merge-requests/72/head
deing 6 years ago
committed by Deimos
parent
commit
88e9c5a19f
  1. 5
      tildes/tildes/templates/group_wiki_page.jinja2
  2. 5
      tildes/tildes/templates/topic_listing.jinja2

5
tildes/tildes/templates/group_wiki_page.jinja2

@ -42,8 +42,13 @@
<ul class="nav">
<li>Page list</li>
<ul class="nav">
{% if page_list|selectattr("page_name", "eq", "index")|list %}
<li class="nav-item"><a href="{{ request.route_url("group_wiki_page", group_path=page.group.path, wiki_page_slug="index") }}" class="text-bold">index</a></li>
{% endif %}
{% for other_page in page_list %}
{% if other_page.page_name != "index" %}
<li class="nav-item"><a href="{{ request.route_url("group_wiki_page", group_path=other_page.group.path, wiki_page_slug=other_page.slug) }}">{{ other_page.page_name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</ul>

5
tildes/tildes/templates/topic_listing.jinja2

@ -228,8 +228,13 @@
<ul class="nav">
<li>Group wiki pages</li>
<ul class="nav">
{% if wiki_pages|selectattr("page_name", "eq", "index")|list %}
<li class="nav-item"><a href="{{ request.route_url("group_wiki_page", group_path=group.path, wiki_page_slug="index") }}" class="text-bold">index</a></li>
{% endif %}
{% for page in wiki_pages %}
{% if page.page_name != "index" %}
<li class="nav-item"><a href="{{ request.route_url("group_wiki_page", group_path=group.path, wiki_page_slug=page.slug) }}">{{ page.page_name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</ul>

Loading…
Cancel
Save