Dashboard of dashboards UI. Skeleton for review dashboard. [bug 638470]

This commit is contained in:
Paul Craciunoiu 2011-03-07 19:45:25 +02:00
Родитель b029d9c698
Коммит a48fa43611
4 изменённых файлов: 50 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,29 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "base.html" %}
{% set scripts = ('wiki',) %}
{% set styles = ('wiki',) %}
{% block content %}
<article id="{{ dashboard_id }}" class="main dashboards">
<h1>{{ title }}</h1>
{% block dashboard_content %}
{% endblock %}
</article>
{% endblock %}
{% block side_top %}
<nav id="doc-tabs">
<ul>{# If form is set, we're editing #}
<li class="{{ review_classes }}">
<a href="{{ url('dashboards.review') }}">{{ title }}</a>
</li>
<li class="{{ forum_classes }}"><a href="#TODO">Forum</a></li>
<li class="{{ locale_classes }}"><a href="{{ url('dashboards.localization') }}">My locale</a></li>
<li><a href="{{ profile_url(user) }}">Profile</a></li>
</ul>
</nav>
{% endblock %}
{% block breadcrumbs %}
{% endblock %}

Просмотреть файл

@ -0,0 +1,10 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "dashboards/base.html" %}
{% set title = _('Review Dashboard') %}
{% set dashboard_id = 'review' %}
{% set review_classes = 'active' %}
{% block dashboard_content %}
Content for review dashboard.
{% endblock %}

Просмотреть файл

@ -2,6 +2,7 @@ from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('dashboards.views',
url(r'^review$', 'review', name='dashboards.review'),
url(r'^localization$', 'localization', name='dashboards.localization'),
url(r'^contributors$', 'contributors', name='dashboards.contributors'),
url(r'^wiki-rows/(?P<readout_slug>[^/]+)', 'wiki_rows',

Просмотреть файл

@ -8,6 +8,7 @@ from django.views.decorators.http import require_GET
import jingo
from tower import ugettext as _
from access.decorators import login_required
from dashboards.readouts import (overview_rows, READOUTS, L10N_READOUTS,
CONTRIBUTOR_READOUTS)
from sumo_locales import LOCALES
@ -104,3 +105,12 @@ def wiki_rows(request, readout_slug):
mode=smart_int(request.GET.get('mode'), None))
max_rows = smart_int(request.GET.get('max'), fallback=None)
return HttpResponse(readout.render(max_rows=max_rows))
@require_GET
@login_required
def review(request):
"""Review dashboard for a user, includes activity, announcements, etc."""
# TODO: site-wide announcements.
# TODO: activity stream.
return jingo.render(request, 'dashboards/review.html')