diff options
author | 2019-04-08 14:06:11 +0100 | |
---|---|---|
committer | 2019-04-08 14:06:11 +0100 | |
commit | 027475779bfa7db50a1c1ff9935bcb546b33f961 (patch) | |
tree | 1782c502797f4e1cea5a876dcb4b51f99e4a8ba1 /pydis_site/templates/wiki/includes/breadcrumbs.html | |
parent | Remove wiki host, use /wiki - Also some wiki config (diff) |
Add base templates for django-wiki, as provided
Diffstat (limited to 'pydis_site/templates/wiki/includes/breadcrumbs.html')
-rw-r--r-- | pydis_site/templates/wiki/includes/breadcrumbs.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pydis_site/templates/wiki/includes/breadcrumbs.html b/pydis_site/templates/wiki/includes/breadcrumbs.html new file mode 100644 index 00000000..b7a8aeae --- /dev/null +++ b/pydis_site/templates/wiki/includes/breadcrumbs.html @@ -0,0 +1,61 @@ +{% load i18n %} +{% if urlpath %} +<div id="article-breadcrumbs"> + +<ul class="breadcrumb pull-left"> + {% for ancestor in urlpath.cached_ancestors %} + <li><a href="{% url 'wiki:get' path=ancestor.path %}">{{ ancestor.article.current_revision.title|truncatechars:25 }}</a></li> + {% endfor %} + <li class="active">{{ article.current_revision.title|truncatechars:25 }}</li> +</ul> +<div class="pull-left" style="margin-left: 10px;"> + <div class="btn-group"> + <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}"> + <span class="fa fa-sitemap"></span> + <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + {% for child in children_slice %} + <li> + <a href="{% url 'wiki:get' path=child.path %}"> + {{ child.article.current_revision.title }} + </a> + </li> + {% empty %} + <li><a href="#"><em>{% trans "No sub-articles" %}</em></a></li> + {% endfor %} + {% if children_slice_more %} + <li><a href="#"><em>{% trans "...and more" %}</em></a></li> + {% endif %} + <li class="divider"></li> + <li> + <a href="{% url 'wiki:dir' path=urlpath.path %}">{% trans "Browse articles in this level" %} »</a> + </li> + </ul> + </div> +</div> +<div class="pull-left" style="margin-left: 10px;"> + <div class="btn-group"> + <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}"> + <span class="fa fa-file"></span> + <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li> + {% if urlpath.parent %} + <a href="{% url 'wiki:create' path=urlpath.parent.path %}" style="padding: 7px;"> + <span class="fa fa-arrow-right"></span> + {% blocktrans with article.current_revision.title as title %}New article next to {{ title }}{% endblocktrans %} + </a> + {% endif %} + <a href="{% url 'wiki:create' path=urlpath.path %}" style="padding: 7px;"> + <span class="fa fa-arrow-down"></span> + {% blocktrans with article.current_revision.title as title %}New article below {{ title }}{% endblocktrans %} + </a> + </li> + </ul> + </div> +</div> +<div style="clear: both"></div> +</div> +{% endif %} |