Add topsecret dashboard with links to all admin features.
This commit is contained in:
parent
c7e624fdd7
commit
9f3c7e9b3a
2 changed files with 54 additions and 2 deletions
52
remarkbox/templates/topsecret-dashboard.j2
Normal file
52
remarkbox/templates/topsecret-dashboard.j2
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{% extends request.base_template -%}
|
||||
{% block title %}{{ the_title }} | {{ request.domain }}{%- endblock -%}
|
||||
{% block content -%}
|
||||
|
||||
<h3>{{ the_title }}</h3>
|
||||
|
||||
<h4>Content</h4>
|
||||
<ul>
|
||||
<li><a href="{{ request.route_url('topsecret') }}/nodes">All Nodes</a> — recent activity across all namespaces</li>
|
||||
<li><a href="{{ request.route_url('topsecret') }}/namespaces">Namespaces</a> — list all namespaces</li>
|
||||
<li><a href="{{ request.route_url('topsecret') }}/namespace-owners">Namespace Owners</a> — who owns what</li>
|
||||
<li><a href="{{ request.route_url('topsecret') }}/namespace-requests">Namespace Requests</a> — pending ownership requests</li>
|
||||
<li><a href="{{ request.route_url('topsecret') }}/notifications">Notifications</a> — all notifications</li>
|
||||
</ul>
|
||||
|
||||
<h4>Users</h4>
|
||||
<ul>
|
||||
<li><a href="{{ request.route_url('topsecret-users') }}">Superusers</a> — promote and demote superusers</li>
|
||||
</ul>
|
||||
|
||||
<h4>Recent Root Nodes</h4>
|
||||
|
||||
{% if nodes %}
|
||||
{%- for node in nodes %}
|
||||
<div class="summary">
|
||||
<span class="author-and-date">
|
||||
{% if node.user %}
|
||||
{{ snippets.user_link(node.user) }}
|
||||
{% else %}
|
||||
<a href="{{ request.link_prefix }}/{{ node.id }}/{{ node.slug }}">thread</a>
|
||||
{% endif %}
|
||||
<span id="{{ node.id }}" class="date" title="{{ node.created_date }}">
|
||||
{{ node.human_changed_timestamp }}
|
||||
</span>
|
||||
</span>
|
||||
<br>
|
||||
{% if node.has_uri -%}
|
||||
<a href="{{ node.uri.data }}" target="_blank" rel="nofollow">{{ node.uri.data }}</a>
|
||||
{% else -%}
|
||||
<a href="{{ request.link_prefix }}/{{ node.id }}/{{ node.slug }}">{{ node.title }}</a>
|
||||
{% endif -%}
|
||||
<br>
|
||||
<a href="{{ request.link_prefix }}/{{ node.id }}/{{ node.slug }}">
|
||||
<span class="remark-count">{{ node.stats["root"]["visible_count"] }} remarks</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor -%}
|
||||
{% else %}
|
||||
<p>No root nodes found.</p>
|
||||
{% endif %}
|
||||
|
||||
{%- endblock -%}
|
||||
|
|
@ -64,12 +64,12 @@ def topsecret_notifications(request):
|
|||
}
|
||||
|
||||
|
||||
@view_config(route_name="topsecret", renderer="home.j2")
|
||||
@view_config(route_name="topsecret", renderer="topsecret-dashboard.j2")
|
||||
@super_fly_required
|
||||
def topsecret_roots(request):
|
||||
return {
|
||||
"nodes": get_topsecret_roots(request.dbsession),
|
||||
"the_title": "topsecret root nodes!",
|
||||
"the_title": "topsecret dashboard",
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue