diff --git a/sigi/settings.py b/sigi/settings.py index 0c6a44d..3bf8f98 100644 --- a/sigi/settings.py +++ b/sigi/settings.py @@ -87,6 +87,8 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.admindocs', 'django_extensions', # http://django-command-extensions.googlecode.com/ + 'GChartWrapper.charts', + 'sigi.apps.log', 'sigi.apps.casas', 'sigi.apps.contatos', 'sigi.apps.convenios', diff --git a/sigi/sites.py b/sigi/sites.py index 445a44b..885556c 100644 --- a/sigi/sites.py +++ b/sigi/sites.py @@ -23,9 +23,10 @@ from sigi.apps.mesas.admin import (Legislatura, LegislaturaAdmin, Coligacao, from sigi.apps.parlamentares.admin import (Partido, PartidoAdmin, Parlamentar, ParlamentarAdmin, Mandato, MandatoAdmin) -class DefaultSite(AdminSite): +class DefaultSite(AdminSite): index_template = 'index.html' login_template = 'login.html' + app_index_template = 'app_index.html' default = DefaultSite() diff --git a/sigi/templates/app_index.html b/sigi/templates/app_index.html new file mode 100644 index 0000000..6f81af4 --- /dev/null +++ b/sigi/templates/app_index.html @@ -0,0 +1,8 @@ +{% extends "admin/app_index.html" %} + +{% block sidebar %} + +{% endblock %} diff --git a/sigi/templates/index.html b/sigi/templates/index.html index a587932..874f1f6 100644 --- a/sigi/templates/index.html +++ b/sigi/templates/index.html @@ -5,39 +5,46 @@ {% block content_title %}

Dashboard

{% endblock %} +{% block content %} +
+{% if app_list %} + {% for app in app_list %} +
+ + + {% for model in app.models %} + + {% if model.perms.change %} + + {% else %} + + {% endif %} + + {% if model.perms.add %} + + {% else %} + + {% endif %} + + {% if model.perms.change %} + + {% else %} + + {% endif %} + + {% endfor %} +
{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
{{ model.name }}{{ model.name }}{% trans 'Add' %} {% trans 'Change' %} 
+
+ {% endfor %} +{% else %} +

{% trans "You don't have permission to edit anything." %}

+{% endif %} +
+{% endblock %} + {% block sidebar %} {% endblock %} diff --git a/sigi/templates/snippets/modules/actions.html b/sigi/templates/snippets/modules/actions.html new file mode 100644 index 0000000..18fe0e1 --- /dev/null +++ b/sigi/templates/snippets/modules/actions.html @@ -0,0 +1,32 @@ +{% load i18n log %} +
+

Atividades recentes

+

Últimas atividades

+ {% get_admin_log 10 as admin_log %} + {% if not admin_log %} +

Não disponível.

+ {% else %} + + {% endif %} +
diff --git a/sigi/templates/snippets/modules/user.html b/sigi/templates/snippets/modules/user.html new file mode 100644 index 0000000..787ce3b --- /dev/null +++ b/sigi/templates/snippets/modules/user.html @@ -0,0 +1,10 @@ +{% load i18n %} +
+

Meu espaço

+

{{ user.get_full_name }}

+ + +