aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/wiki/includes
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-18 18:12:04 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-18 18:12:04 +0100
commit06fed91f6515e08a0e62cc48ade80d65257fcbd9 (patch)
tree9dd7be80f78dda8f3ef629828e2382738be2f552 /pydis_site/templates/wiki/includes
parentSource page (diff)
Searching and pagination
Diffstat (limited to 'pydis_site/templates/wiki/includes')
-rw-r--r--pydis_site/templates/wiki/includes/pagination.html24
-rw-r--r--pydis_site/templates/wiki/includes/searchresult.html7
2 files changed, 4 insertions, 27 deletions
diff --git a/pydis_site/templates/wiki/includes/pagination.html b/pydis_site/templates/wiki/includes/pagination.html
deleted file mode 100644
index 6e7ec608..00000000
--- a/pydis_site/templates/wiki/includes/pagination.html
+++ /dev/null
@@ -1,24 +0,0 @@
-{% load i18n %}
-{% if is_paginated %}
-<ul class="pagination">
- {% if page_obj.has_previous %}
- <li><a class="prev btn btn-info" href="?{% if search_query %}q={{ search_query }}&{% endif %}page={{ page_obj.previous_page_number }}{% if appended_key %}&{{ appended_key }}={{ appended_value }}{% endif %}">&laquo;</a></li>
- {% else %}
- <li class="disabled"><span>&laquo;</span></li>
- {% endif %}
-
- {% for pc in paginator.page_range %}
- {% if pc == 0 %}
- <li class="disabled"><span>...</span></li>
- {% else %}
- <li class="{% if pc == page_obj.number %} active{% endif %}"><a href="?{% if search_query %}q={{ search_query }}&{% endif %}page={{ pc }}{% if appended_key %}&{{ appended_key }}={{ appended_value }}{% endif %}">{{ pc }}</a></li>
- {% endif %}
- {% endfor %}
-
- {% if page_obj.has_next %}
- <li><a class="next btn btn-info" href="?{% if search_query %}q={{ search_query }}&{% endif %}page={{ page_obj.next_page_number }}{% if appended_key %}&{{ appended_key }}={{ appended_value }}{% endif %}">&raquo;</a></li>
- {% else %}
- <li class="disabled"><span>&raquo;</span></li>
- {% endif %}
-</ul>
-{% endif %}
diff --git a/pydis_site/templates/wiki/includes/searchresult.html b/pydis_site/templates/wiki/includes/searchresult.html
index f6dd7a09..350280a0 100644
--- a/pydis_site/templates/wiki/includes/searchresult.html
+++ b/pydis_site/templates/wiki/includes/searchresult.html
@@ -4,19 +4,20 @@
<tr>
<td>
{% for urlpath in article.urlpath_set.all %}
- <a href="{% url 'wiki:get' path=urlpath.path %}">{{ article.current_revision.title }}<br /><small class="muted">/{{ urlpath.path }}</small></a>
+ <a href="{% url 'wiki:get' path=urlpath.path %}">{{ article.current_revision.title }}<br /><small class="has-text-grey">Slug: /{{ urlpath.path }}</small></a>
{% empty %}
<a href="{% url 'wiki:get' article_id=article.id %}">{{ article.current_revision.title }}</a>
{% endfor %}
+
{% if article.current_revision.deleted %}
<span class="fa fa-trash"></span>
{% endif %}
+
{% if article.current_revision.locked %}
<span class="fa fa-lock"></span>
{% endif %}
- <p class="muted"><small>{{ article.render|get_content_snippet:search_query }}</small></p>
</td>
- <td style="white-space: nowrap">
+ <td class="has-text-right">
{{ article.current_revision.created|naturaltime }}
</td>
</tr>