From ece34b01fb362d4ca70d788260094bc5253fc233 Mon Sep 17 00:00:00 2001 From: Breno Teixeira Date: Tue, 5 Nov 2013 16:48:31 -0200 Subject: [PATCH] =?UTF-8?q?Migra=C3=A7=C3=A3o=20de=20todas=20urls=20da=20a?= =?UTF-8?q?pp=20servicos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/convenios/urls.py | 4 + sigi/apps/convenios/views.py | 1 - sigi/apps/diagnosticos/urls.py | 5 +- .../apps/metas/templates/metas/dashboard.html | 41 ++++++ sigi/apps/metas/templates/metas/map_list.html | 44 ++++++ sigi/apps/metas/templates/metas/map_sum.html | 98 +++++++++++++ sigi/apps/metas/templates/metas/mapa.html | 102 ++++++++++++++ sigi/apps/metas/templates/metas/snippets.html | 40 ++++++ sigi/apps/metas/urls.py | 13 +- .../templates/parlamentares/carrinho.html | 2 +- .../templates/parlamentares/change_list.html | 2 +- sigi/apps/parlamentares/urls.py | 7 + sigi/apps/parlamentares/views.py | 3 +- .../templates/servicos/casa_manifesta.html | 129 ++++++++++++++++++ .../servicos/templates/servicos/mapa.html | 61 +++++++++ sigi/apps/servicos/urls.py | 12 ++ sigi/apps/servicos/views.py | 12 ++ .../servidores/servidores_por_cargo.html | 50 +++++++ .../servidores/servidores_por_funcao.html | 50 +++++++ sigi/apps/servidores/urls.py | 9 ++ sigi/settings.py | 5 +- sigi/urls.py | 4 +- 22 files changed, 684 insertions(+), 10 deletions(-) create mode 100644 sigi/apps/metas/templates/metas/dashboard.html create mode 100644 sigi/apps/metas/templates/metas/map_list.html create mode 100644 sigi/apps/metas/templates/metas/map_sum.html create mode 100644 sigi/apps/metas/templates/metas/mapa.html create mode 100644 sigi/apps/metas/templates/metas/snippets.html create mode 100644 sigi/apps/servicos/templates/servicos/casa_manifesta.html create mode 100644 sigi/apps/servicos/templates/servicos/mapa.html create mode 100644 sigi/apps/servicos/urls.py create mode 100644 sigi/apps/servidores/templates/servidores/servidores_por_cargo.html create mode 100644 sigi/apps/servidores/templates/servidores/servidores_por_funcao.html create mode 100644 sigi/apps/servidores/urls.py diff --git a/sigi/apps/convenios/urls.py b/sigi/apps/convenios/urls.py index 25b58ed..9386b9d 100644 --- a/sigi/apps/convenios/urls.py +++ b/sigi/apps/convenios/urls.py @@ -4,4 +4,8 @@ from django.conf.urls import patterns, url urlpatterns = patterns('sigi.apps.convenios.views', url(r'^reports/$', 'report', name='convenios-report'), + url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), + url(r'^carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-carrinho'), + url(r'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), + # url(r'^$', '', name=''), ) \ No newline at end of file diff --git a/sigi/apps/convenios/views.py b/sigi/apps/convenios/views.py index 2f2a6d7..070d0d5 100644 --- a/sigi/apps/convenios/views.py +++ b/sigi/apps/convenios/views.py @@ -126,7 +126,6 @@ def visualizar_carrinho(request): return render_to_response( 'convenios/carrinho.html', { - "ADMIN_MEDIA_PREFIX":settings.ADMIN_MEDIA_PREFIX, 'MEDIA_URL':settings.MEDIA_URL, 'carIsEmpty':carrinhoIsEmpty, 'paginas':paginas, diff --git a/sigi/apps/diagnosticos/urls.py b/sigi/apps/diagnosticos/urls.py index 9e421de..e5f8efd 100644 --- a/sigi/apps/diagnosticos/urls.py +++ b/sigi/apps/diagnosticos/urls.py @@ -26,7 +26,10 @@ urlpatterns = patterns('sigi.apps.diagnosticos.views', 'categoria_detalhes', name='detalhes_categoria'), url(r'^mapa/$', TemplateView.as_view(template_name="diagnosticos/mapa.html"), name='template-mapa'), - url(r'^mundiagjson/$', 'municipios_diagnosticados', name='municipios-diagnosticados') + url(r'^mundiagjson/$', 'municipios_diagnosticados', name='municipios-diagnosticados'), + + # Reports diagnosticos + url(r'^diagnostico/(?P\w+).pdf$', 'diagnostico_pdf', name='diagnostico-pdf'), ) urlpatterns += patterns('django.contrib.auth.views', diff --git a/sigi/apps/metas/templates/metas/dashboard.html b/sigi/apps/metas/templates/metas/dashboard.html new file mode 100644 index 0000000..f4f67ec --- /dev/null +++ b/sigi/apps/metas/templates/metas/dashboard.html @@ -0,0 +1,41 @@ +{% extends "admin/index.html" %} +{% load adminmedia %} + +{% block title %}SIGI{% endblock %} + +{% block extrahead %} + {{ block.super }} + +{% endblock %} + +{% block content_title %} +

Triggers e indicadores de progresso

+{% comment %} +
+
+

+
+
+{% endcomment %} +{% endblock %} + +{% block content %} +
+
+ + {% include "metas/snippets.html" %} + +
+
+{% endblock %} + +{% block sidebar %} + +{% endblock %} diff --git a/sigi/apps/metas/templates/metas/map_list.html b/sigi/apps/metas/templates/metas/map_list.html new file mode 100644 index 0000000..cb6b6e1 --- /dev/null +++ b/sigi/apps/metas/templates/metas/map_list.html @@ -0,0 +1,44 @@ +{% extends "base_report.html" %} +{% load mapa_tags %} + +{% block extra_head %} + +Lista de Casas atendidas +{% endblock %} + +{% block report %} +

Lista de Casas atendidas

+

+ + + + + + + + {% for casa in casas %} + + + + + + + {% endfor %} +
Casa LegislativaEstadoRegiãoServiços
{{ casa.nome }}{{ casa.municipio.uf.nome }}{{ casa.municipio.uf.get_regiao_display }}
    {{ casa|map_desc_serv }}
+{% endblock %} + + \ No newline at end of file diff --git a/sigi/apps/metas/templates/metas/map_sum.html b/sigi/apps/metas/templates/metas/map_sum.html new file mode 100644 index 0000000..13cc73e --- /dev/null +++ b/sigi/apps/metas/templates/metas/map_sum.html @@ -0,0 +1,98 @@ +{% extends "base_report.html" %} + +{% block extra_head %} + +Sumário da atuação do Interlegis +{% endblock %} + +{% block report %} +

Sumário da atuação do Interlegis

+

+ + + + + + + + + + {% for servico in servicos %} + + {% endfor %} + {% for projeto in projetos %} + + {% endfor %} + {% for projeto in projetos %} + + {% endfor %} + + + + {% for r_sigla, regiao in result.iteritems %} + + + {% for sigla, qtde in regiao.servicos.iteritems %} + + {% endfor %} + {% for sigla, qtde in regiao.convenios.iteritems %} + + {% endfor %} + {% for sigla, qtde in regiao.equipadas.iteritems %} + + {% endfor %} + {% for sigla, qtde in regiao.diagnosticos.iteritems %} + + {% endfor %} + + {% for uf_id, uf in regiao.ufs.iteritems %} + + + {% for sigla, qtde in uf.servicos.iteritems %} + + {% endfor %} + {% for sigla, qtde in uf.convenios.iteritems %} + + {% endfor %} + {% for sigla, qtde in uf.equipadas.iteritems %} + + {% endfor %} + {% for sigla, qtde in uf.diagnosticos.iteritems %} + + {% endfor %} + + {% endfor %} + {% endfor %} + + + {% for sigla, qtde in tot_servicos.iteritems %} + + {% endfor %} + {% for sigla, qtde in tot_convenios.iteritems %} + + {% endfor %} + {% for sigla, qtde in tot_equipadas.iteritems %} + + {% endfor %} + {% for sigla, qtde in tot_diagnosticos.iteritems %} + + {% endfor %} + +
Região / EstadoServiços SEITConveniadasEquipadasDiagnósticos
{{ servico.nome }}{{ projeto.sigla }}{{ projeto.sigla }}Em andamentoPublicados
{{ regiao.nome }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}
{{ uf.nome }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}
Total{{ qtde|default:"-" }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}{{ qtde|default:"-" }}
+{% endblock %} + + \ No newline at end of file diff --git a/sigi/apps/metas/templates/metas/mapa.html b/sigi/apps/metas/templates/metas/mapa.html new file mode 100644 index 0000000..925e0e2 --- /dev/null +++ b/sigi/apps/metas/templates/metas/mapa.html @@ -0,0 +1,102 @@ +{% extends "admin/index.html" %} + +{% block title %}SIGI{% endblock %} + +{% block extrahead %} + {{ block.super }} + {% load staticfiles %} + + + + + + + +{% endblock %} + +{% block content_title %} +

Mapa de atuação do Interlegis

+ +{% endblock %} +{% block content %} +
+ +
+{% endblock %} + +{% block sidebar %} +
+ +
+{% endblock %} diff --git a/sigi/apps/metas/templates/metas/snippets.html b/sigi/apps/metas/templates/metas/snippets.html new file mode 100644 index 0000000..db58276 --- /dev/null +++ b/sigi/apps/metas/templates/metas/snippets.html @@ -0,0 +1,40 @@ +{% load charts %} + +{# ------------- Todas as metas ------------- #} +
+

Todas as metas

+

Estado das metas do contrato BID

+ + {% for meta in metas %} + + + + + + {% endfor %} +
{{ meta.titulo }} + + {{ meta.percentual_concluido }}%
+
+
 
Ruim
+
 
Preocupante
+
 
Bom
+
 
Atingido
+
+
+ +{# ------------- Evolução dos desembolsos ------------- #} +
+

Evolução dos desembolsos

+

Desembolsos últimos seis meses

+ +
+ +{% comment %} +{# ------------- Evolução dos desembolsos ------------- #} +
+

Todas as metas

+

Estado das metas do contrato BID

+
+{% endcomment %} \ No newline at end of file diff --git a/sigi/apps/metas/urls.py b/sigi/apps/metas/urls.py index 5d79a9f..e6a3107 100644 --- a/sigi/apps/metas/urls.py +++ b/sigi/apps/metas/urls.py @@ -1,3 +1,12 @@ -from django.conf.urls.defaults import * +# coding: utf-8 +from django.conf.urls import patterns, url -# place app url patterns here \ No newline at end of file + +urlpatterns = patterns('sigi.apps.metas.views', + url(r'^$', 'dashboard', name='metas-dashboardsss'), #tagerror + url(r'^mapa/$', 'mapa', name='metas-mapa'), #tagerror + url(r'^mapdata/$', 'map_data', name='metas-map_data'), + url(r'^mapsearch/$', 'map_search', name='metas-map_search'), + url(r'^mapsum/$', 'map_sum', name='metas-map_sum'), + url(r'^maplist/$', 'map_list', name='metas-map_list'), +) \ No newline at end of file diff --git a/sigi/apps/parlamentares/templates/parlamentares/carrinho.html b/sigi/apps/parlamentares/templates/parlamentares/carrinho.html index a40b8fc..d2f4c4f 100644 --- a/sigi/apps/parlamentares/templates/parlamentares/carrinho.html +++ b/sigi/apps/parlamentares/templates/parlamentares/carrinho.html @@ -1,5 +1,5 @@ {% extends "admin/carrinho.html" %} -{% load adminmedia admin_list i18n %} +{% load admin_list i18n %} {% block extrastyle %} {{ block.super }} {% include "admin/tabs_style.html" %} diff --git a/sigi/apps/parlamentares/templates/parlamentares/change_list.html b/sigi/apps/parlamentares/templates/parlamentares/change_list.html index 05501cd..c601b73 100644 --- a/sigi/apps/parlamentares/templates/parlamentares/change_list.html +++ b/sigi/apps/parlamentares/templates/parlamentares/change_list.html @@ -1,5 +1,5 @@ {% extends "admin/change_list.html" %} -{% load adminmedia admin_list i18n reporting_tags %} +{% load admin_list i18n reporting_tags %} {% block object-tools %}