From cb7d57f3880f2b973e211c69a189288074818f82 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Fri, 31 Oct 2014 13:12:23 -0200 Subject: [PATCH] Move all remaining sourcecode from /media to /sigiStatic --- sigi/apps/casas/reports.py | 6 +- sigi/apps/casas/views.py | 1 - .../templates/convenios/tabela_regiao.html | 37 ++-- sigi/apps/convenios/views.py | 1 - .../diagnosticos/diagnostico/change_form.html | 3 +- .../diagnosticos/diagnostico_pdf.html | 13 +- ...ticos_categoria_casa_legislativa_form.html | 3 +- .../diagnosticos_categoria_contatos_form.html | 3 +- .../diagnosticos_categorias_form.html | 3 +- .../diagnosticos_categorias_list.html | 3 +- sigi/apps/parlamentares/reports.py | 6 +- sigi/apps/parlamentares/views.py | 1 - sigi/apps/relatorios/reports.py | 5 +- .../diagnosticos/jquery.mobile-1.0.min.css | 2 + .../js/diagnosticos/jquery-1.6.4.min.js | 4 + .../js/diagnosticos/jquery.mobile-1.0.min.js | 172 ++++++++++++++++++ 16 files changed, 224 insertions(+), 39 deletions(-) create mode 100644 sigiStatic/css/diagnosticos/jquery.mobile-1.0.min.css create mode 100644 sigiStatic/js/diagnosticos/jquery-1.6.4.min.js create mode 100644 sigiStatic/js/diagnosticos/jquery.mobile-1.0.min.js diff --git a/sigi/apps/casas/reports.py b/sigi/apps/casas/reports.py index b993a31..1cb8a1d 100644 --- a/sigi/apps/casas/reports.py +++ b/sigi/apps/casas/reports.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from django.templatetags.static import static from django.utils.translation import ugettext as _ from geraldo import Report, DetailBand, Label, ObjectValue, ReportGroup, ReportBand, landscape, SubReport, BAND_WIDTH, SystemField from geraldo.graphics import Image @@ -7,7 +8,6 @@ from reportlab.lib.pagesizes import A4 from reportlab.lib.units import cm from sigi.apps.relatorios.reports import ReportDefault -from sigi.settings import STATICFILES_DIRS def string_to_cm(texto): @@ -187,11 +187,11 @@ class CasasLegislativasReport(ReportDefault): elements = list(ReportDefault.band_page_header.elements) elements = [ - Image(filename='%s/img/logo-interlegis.jpg' % STATICFILES_DIRS, + Image(filename=static('img/logo-interlegis.jpg'), left=23.5 * cm, right=1 * cm, top=0.1 * cm, bottom=1 * cm, width=4.2 * cm, height=3 * cm, ), - Image(filename='%s/img/logo-senado.png' % STATICFILES_DIRS, + Image(filename=static('img/logo-senado.png'), left=1 * cm, right=1 * cm, top=0.1 * cm, bottom=1 * cm, width=3 * cm, height=3 * cm, ), diff --git a/sigi/apps/casas/views.py b/sigi/apps/casas/views.py index a031d7d..c1ba13d 100644 --- a/sigi/apps/casas/views.py +++ b/sigi/apps/casas/views.py @@ -104,7 +104,6 @@ def visualizar_carrinho(request): request, 'casas/carrinho.html', { - 'MEDIA_URL': settings.MEDIA_URL, 'carIsEmpty': carrinhoIsEmpty, 'paginas': paginas, 'query_str': '?' + request.META['QUERY_STRING'] diff --git a/sigi/apps/convenios/templates/convenios/tabela_regiao.html b/sigi/apps/convenios/templates/convenios/tabela_regiao.html index 48db3eb..ad17d13 100644 --- a/sigi/apps/convenios/templates/convenios/tabela_regiao.html +++ b/sigi/apps/convenios/templates/convenios/tabela_regiao.html @@ -1,3 +1,4 @@ +{% load static from staticfiles %} {% load i18n %} @@ -29,11 +30,11 @@ margin-right: 1cm; height: 1cm; } - } + } body{ font-family: 'Helvetica'; font-size: 9pt; - } + } #corpo h1{ text-align: center; } @@ -53,13 +54,13 @@ padding-top: 0.15cm; } #footerContent #esquerda{ - text-align: left; + text-align: left; } #footerContent #direita{ text-align: right; - background-image: url("/media/images/logo-senado.png"); - } - .tabela { + background-image: url("{% static 'img/logo-senado.png' %}"); + } + .tabela { padding-top: 0.1cm; padding-left: 0.1cm; border: black solid; @@ -71,7 +72,7 @@ font-weight: bold; font-size: 11pt; } - .tabela th{ + .tabela th{ background-color: #CFCFCF; text-align: left; } @@ -81,13 +82,13 @@ .tabela .sumario{ font-weight: bold; background-color: #CFCFCF; - } + } .tabela .cabecalho_esquerda{ background-color: #E8E8E8; font-weight: bold; } - + @@ -95,13 +96,13 @@
- + - - + +
Logo SenadoLogo Senado {% trans 'SENADO FEDERAL' %}
{% trans 'SINTER - Secretaria Especial do Interlegis' %}
Logo Interlegis
Logo Interlegis
-

{{regiao}}

-
+

{{regiao}}

+
{% for tabela in tabelas %} @@ -113,7 +114,7 @@ {%endfor%} - + {% for linha in tabela.linhas %} @@ -132,7 +133,7 @@
{{linha.estado}}

{% endfor %} -
+
@@ -141,6 +142,6 @@
- + - + \ No newline at end of file diff --git a/sigi/apps/convenios/views.py b/sigi/apps/convenios/views.py index a9f15ff..44418e9 100644 --- a/sigi/apps/convenios/views.py +++ b/sigi/apps/convenios/views.py @@ -128,7 +128,6 @@ def visualizar_carrinho(request): request, 'convenios/carrinho.html', { - 'MEDIA_URL': settings.MEDIA_URL, 'carIsEmpty': carrinhoIsEmpty, 'paginas': paginas, 'query_str': '?' + request.META['QUERY_STRING'] diff --git a/sigi/apps/diagnosticos/templates/admin/diagnosticos/diagnostico/change_form.html b/sigi/apps/diagnosticos/templates/admin/diagnosticos/diagnostico/change_form.html index 34718cd..869d839 100644 --- a/sigi/apps/diagnosticos/templates/admin/diagnosticos/diagnostico/change_form.html +++ b/sigi/apps/diagnosticos/templates/admin/diagnosticos/diagnostico/change_form.html @@ -1,9 +1,10 @@ {% extends "base_change_form.html" %} +{% load static from staticfiles %} {% load i18n reporting_tags %} {% block extrastyle %} {{ block.super }} - + {% endblock %} {% block object-tools %} diff --git a/sigi/apps/diagnosticos/templates/diagnosticos/diagnostico_pdf.html b/sigi/apps/diagnosticos/templates/diagnosticos/diagnostico_pdf.html index 19477b5..c346ccb 100644 --- a/sigi/apps/diagnosticos/templates/diagnosticos/diagnostico_pdf.html +++ b/sigi/apps/diagnosticos/templates/diagnosticos/diagnostico_pdf.html @@ -1,4 +1,5 @@ {% load smart_if %} +{% load static from staticfiles %} {% load i18n %} @@ -87,19 +88,19 @@
- +

{% trans 'PROJETO DE MODERNIZAÇÃO DO LEGISLATIVO' %} @@ -116,12 +117,12 @@

{% trans 'Chefe da equipe de diagnóstico:' %}

{{diagnostico.responsavel}}

- +

{% trans 'Membros da equipe de diagnóstico:' %}

{% for membro in diagnostico.equipe_set.all %}

{{membro}}

{% endfor %} - + {% for funcionario in funcionarios %} {% if funcionario.setor == 'contato_interlegis' %}

{% trans 'Nome do responsável pelas Informações:' %}

@@ -137,7 +138,7 @@ {% endif %} {% endfor %} - +