Anonymous avatar Anonymous committed d6af2b1

Some small template fixes and added admin URLs.

Comments (0)

Files changed (5)

solace/templates/kb/by_tag.html

 {% set page_title = _('Questions Tagged “%s”') % tag.name|e %}
 {% set page_navigation_item = 'kb.tags' %}
 {% block html_head %}
-{{ super() }}
+{{- super() }}
 <link rel="alternate" href="{{ url_for('kb.by_tag_feed', name=tag.name, order_by=order_by)
   }}" type="application/atom+xml">
 {%- endblock %}

solace/templates/kb/overview.html

 {% from 'kb/_boxes.html' import render_topics, render_topic_tabs %}
 {% set page_title = _('Overview') %}
 {% block html_head %}
-{{ super() }}
+{{- super() }}
 <link rel="alternate" href="{{ url_for('kb.overview_feed', order_by=order_by)
   }}" type="application/atom+xml">
 {%- endblock %}

solace/templates/kb/unanswered.html

 {% from 'kb/_boxes.html' import render_topics, render_topic_tabs %}
 {% set page_title = _('Unanswered Questions') %}
 {% block html_head %}
-{{ super() }}
+{{- super() }}
 <link rel="alternate" href="{{ url_for('kb.unanswered_feed', order_by=order_by)
   }}" type="application/atom+xml">
 {%- endblock %}

solace/templates/layout.html

 <!doctype html>
-{% from '_helpers.html' import render_user %}
-{%- block html_head -%}
+{%- from '_helpers.html' import render_user %}
+{%- block html_head %}
 <title>{% block html_head_title %}{% if page_title %}{{ page_title
   }} | {% endif %}{{ settings.WEBSITE_TITLE|e }}{% endblock %}</title>
 {{ packs.default }}
     <p class="links">
     {%- if request.is_logged_in %}
       {{ render_user(request.user, with_avatar=false) }} |
+      {%- if request.user.is_admin %}
+        <a href="{{ url_for('admin.overview') }}">{{ _('Admin Panel') }}</a> |
+      {%- endif %}
       <a href="{{ url_for('core.logout') }}">{{ _('Logout') }}</a>
     {%- else %}
       <a href="{{ url_for('core.register') }}">{{ _('Register') }}</a> |
     Rule('/_reset_password/<email>/<key>') > 'core.reset_password',
     Rule('/_activate/<email>/<key>') > 'core.activate_user',
 
+    # administration
+    Rule('/admin/') > 'admin.overview',
+    Rule('/admin/status') > 'admin.status',
+    Rule('/admin/bans') > 'admin.bans',
+
     # AJAX
     Rule('/_set_language/<locale>') > 'core.set_language',
     Rule('/_set_timezone_offset') > 'core.set_timezone_offset',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.