Browse Source

Retirada do /sigi/ das urls

stable/2.0
Breno 11 years ago
parent
commit
0070ab21fc
  1. 2
      sigi/apps/diagnosticos/models.py
  2. 2
      sigi/apps/diagnosticos/templates/diagnosticos/graficos.html
  3. 4
      sigi/apps/diagnosticos/templates/diagnosticos/mapa.html
  4. 2
      sigi/apps/diagnosticos/tests.py
  5. 2
      sigi/apps/diagnosticos/urls.py
  6. 6
      sigi/apps/metas/templates/metas/mapa.html
  7. 2
      sigi/apps/metas/views.py
  8. 4
      sigi/apps/servicos/templates/servicos/mapa.html
  9. 4
      sigi/apps/servidores/templates/admin/servidores/servidor/change_list.html
  10. 1
      sigi/settings.py
  11. 19
      sigi/urls.py
  12. 6
      sigiStatic/js/metas/mapa.js
  13. 2
      templates/admin/base_site.html
  14. 4
      templates/index.html
  15. 6
      templates/snippets/modules/charts-convenios.html

2
sigi/apps/diagnosticos/models.py

@ -132,7 +132,7 @@ class Diagnostico(BaseEntity):
return str(self.casa_legislativa).decode('utf8')
def get_absolute_url(self):
return "/sigi/diagnosticos/diagnostico/%i.pdf" % (self.id, )
return "/diagnosticos/diagnostico/%i.pdf" % (self.id, )
class Categoria(models.Model):

2
sigi/apps/diagnosticos/templates/diagnosticos/graficos.html

@ -48,7 +48,7 @@ jQuery(document).ready(function () {
{{ pergunta }}
<li>
{% if pergunta.datatype == 'many' or pergunta.datatype == 'one' %}
<a id="{{ pergunta.name }}" href="/sigi/diagnosticos/api/?id={{ pergunta.name }}"><p>{{ pergunta.title }}</p></a>
<a id="{{ pergunta.name }}" href="/diagnosticos/api/?id={{ pergunta.name }}"><p>{{ pergunta.title }}</p></a>
<div id="output_{{ pergunta.name }}" class="grafico">
<img style="display:none"/>
</div>

4
sigi/apps/diagnosticos/templates/diagnosticos/mapa.html

@ -22,14 +22,14 @@
var map = new google.maps.Map(document.getElementById("map"),
myOptions);
$.get("/sigi/diagnosticos/mundiagjson/", function(municipios) {
$.get("/diagnosticos/mundiagjson/", function(municipios) {
for (var i in municipios) {
var municipio = municipios[i];
var markData = {
map: map,
position: new google.maps.LatLng(municipio.lat, municipio.lng),
title: municipio.nome,
icon: '{{ MEDIA_URL }}images/mapmarker.png' //'/sigi/media/images/mapmarker.png'
icon: '{{ MEDIA_URL }}images/mapmarker.png'
}
var mark = new google.maps.Marker(markData);
var infoWin = new google.maps.InfoWindow({content:

2
sigi/apps/diagnosticos/tests.py

@ -10,6 +10,6 @@ class DiagnosticosViewsTest(TestCase):
def test_diagnostico_list_success(self):
response = self.client.get('/sigi/mobile/diagnosticos')
response = self.client.get('/mobile/diagnosticos')
self.assertEquals(200, response.status_code)
self.assertTemplateUsed(response, 'diagnosticos/diagnosticos_list.html')

2
sigi/apps/diagnosticos/urls.py

@ -3,7 +3,7 @@ from django.conf.urls import patterns, url
from django.views.generic import TemplateView
LOGIN_REDIRECT_URL = '/sigi/diagnosticos/mobile/login'
LOGIN_REDIRECT_URL = '/diagnosticos/mobile/login'
urlpatterns = patterns('sigi.apps.diagnosticos.views',
# Lista de Diagnósticos

6
sigi/apps/metas/templates/metas/mapa.html

@ -29,9 +29,9 @@
</div>
</form>
<ul class="object-tools">
<li> <a href="/sigi/dashboard/mapsum/" id="summary_report" onclick="return false;">Relatório resumo</a> </li>
<li> <a href="/sigi/dashboard/maplist/" id="list_report" onclick="return false;">Listagem das Casas</a> </li>
<li> <a href="/sigi/dashboard/maplist/?fmt=csv" id="list_csv" onclick="return false;">Exportar Casas</a> </li>
<li> <a href="/dashboard/mapsum/" id="summary_report" onclick="return false;">Relatório resumo</a> </li>
<li> <a href="/dashboard/maplist/" id="list_report" onclick="return false;">Listagem das Casas</a> </li>
<li> <a href="/dashboard/maplist/?fmt=csv" id="list_csv" onclick="return false;">Exportar Casas</a> </li>
<li> <a href="#" id="closeiwlink">Fechar todas as janelas de informação</a> </li>
</ul>
</div>

2
sigi/apps/metas/views.py

@ -300,7 +300,7 @@ def gera_map_data_file(cronjob=False):
}
for sv in c.servico_set.all():
casa['info'].append(u"%s ativado em %s <a href='%s' target='_blank'><img src='/sigi/media/images/link.gif' alt='link'></a>" % (
casa['info'].append(u"%s ativado em %s <a href='%s' target='_blank'><img src='/media/images/link.gif' alt='link'></a>" % (
sv.tipo_servico.nome, sv.data_ativacao.strftime('%d/%m/%Y') if sv.data_ativacao else
u'<sem data de ativação>', sv.url))
casa['seit'].append(sv.tipo_servico.sigla)

4
sigi/apps/servicos/templates/servicos/mapa.html

@ -22,14 +22,14 @@
var map = new google.maps.Map(document.getElementById("map"),
myOptions);
$.get("/sigi/servicos/munatenjson/{{ params.servico }}", function(municipios) {
$.get("/servicos/munatenjson/{{ params.servico }}", function(municipios) {
for (var i in municipios) {
var municipio = municipios[i];
var markData = {
map: map,
position: new google.maps.LatLng(municipio.lat, municipio.lng),
title: municipio.nome,
icon: '{{ MEDIA_URL }}images/mapmarker.png' //'/sigi/media/images/mapmarker.png'
icon: '{{ MEDIA_URL }}images/mapmarker.png'
}
var mark = new google.maps.Marker(markData);
var infoWin = new google.maps.InfoWindow({content:

4
sigi/apps/servidores/templates/admin/servidores/servidor/change_list.html

@ -4,10 +4,10 @@
{% block object-tools %}
<ul class="object-tools">
<li>
<a href="/sigi/servidores/servidores_por_cargo.pdf" class="historylink">Relatório por cargo</a>
<a href="/servidores/servidores_por_cargo.pdf" class="historylink">Relatório por cargo</a>
</li>
<li>
<a href="/sigi/servidores/servidores_por_funcao.pdf" class="historylink">Relatório por função</a>
<a href="/servidores/servidores_por_funcao.pdf" class="historylink">Relatório por função</a>
</li>
{% if has_add_permission %}
<li>

1
sigi/settings.py

@ -115,7 +115,6 @@ STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'sigiStatic'),
)
# ADMIN_MEDIA_PREFIX = '/sigi/admin_media/' # Deprecated!
DEFAULT_FROM_EMAIL = 'sesostris@interlegis.leg.br'

19
sigi/urls.py

@ -1,6 +1,6 @@
#-*- coding:utf-8 -*-
from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView, TemplateView
from django.views.generic.base import TemplateView
from django.conf import settings
from django.conf.urls.static import static
@ -9,18 +9,17 @@ admin.site.index_template = 'index.html'
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', RedirectView.as_view(url='/sigi/'), name='go-to-sigi'),
url(r'^sigi/parlamentares/parlamentar/', include('sigi.apps.parlamentares.urls')),
url(r'^sigi/casas/casalegislativa/', include('sigi.apps.casas.urls')),
url(r'^sigi/convenios/convenio/', include('sigi.apps.convenios.urls')),
url(r'^sigi/diagnosticos/', include('sigi.apps.diagnosticos.urls')),
url(r'^sigi/servidores/', include('sigi.apps.servidores.urls')),
url(r'^sigi/servicos/', include('sigi.apps.servicos.urls')),
url(r'^sigi/dashboard/', include('sigi.apps.metas.urls')),
url(r'^parlamentares/parlamentar/', include('sigi.apps.parlamentares.urls')),
url(r'^casas/casalegislativa/', include('sigi.apps.casas.urls')),
url(r'^convenios/convenio/', include('sigi.apps.convenios.urls')),
url(r'^diagnosticos/', include('sigi.apps.diagnosticos.urls')),
url(r'^servidores/', include('sigi.apps.servidores.urls')),
url(r'^servicos/', include('sigi.apps.servicos.urls')),
url(r'^dashboard/', include('sigi.apps.metas.urls')),
url(r'^sigi/', include(admin.site.urls)),
url(r'^', include(admin.site.urls)),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
if settings.DEBUG:

6
sigiStatic/js/metas/mapa.js

@ -22,7 +22,7 @@
function ajax_submit(event) {
$.ajax({
url: "/sigi/dashboard/mapdata/",
url: "/dashboard/mapdata/",
type: 'GET',
cache: true,
success: function(return_data) {
@ -39,7 +39,7 @@
map: null, // Just create the mark, dont plot it
position: new google.maps.LatLng(parseFloat(municipio.lat), parseFloat(municipio.lng)),
title: municipio.nome,
icon: '/sigi/media/images/' + municipio.icone + '.png'
icon: '/media/images/' + municipio.icone + '.png'
}
var mark = new google.maps.Marker(markData);
var infoWin = new google.maps.InfoWindow({content: '<strong>' + municipio.nome + '</strong><br/><br/>' + municipio.info });
@ -141,7 +141,7 @@
function search(event) {
$.ajax({
url: "/sigi/dashboard/mapsearch/",
url: "/dashboard/mapsearch/",
type: 'GET',
data: $("#changelist-search").serializeArray(),
cache: true,

2
templates/admin/base_site.html

@ -32,7 +32,7 @@
{% block branding %}
<h1 id="site-name">
<a href="/sigi">Sistema de Informações Gerenciais do Interlegis</a>
<a href="/">Sistema de Informações Gerenciais do Interlegis</a>
</h1>
{% endblock %}

4
templates/index.html

@ -21,14 +21,14 @@
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
$.get("/sigi/diagnosticos/mundiagjson/", function(municipios) {
$.get("/diagnosticos/mundiagjson/", function(municipios) {
for (var i in municipios) {
var municipio = municipios[i];
var markData = {
map: map,
position: new google.maps.LatLng(municipio.lat, municipio.lng),
title: municipio.nome,
icon: '{{ STATIC_URL }}img/mapmarker.png' //'/sigi/media/images/mapmarker.png'
icon: '{{ STATIC_URL }}img/mapmarker.png'
}
var mark = new google.maps.Marker(markData);
var infoWin = new google.maps.InfoWindow({content:

6
templates/snippets/modules/charts-convenios.html

@ -59,7 +59,7 @@
<div class="module" style="height: 300px;">
<h2>Serviços</h2>
<div class="titlemapbox">
<div class="mapbox"><a href="/sigi/dashboard/mapa/"><img src="{{ STATIC_URL }}img/mapicon.png"/><br/>Ver mapa</a></div>
<div class="mapbox"><a href="/dashboard/mapa/"><img src="{{ STATIC_URL }}img/mapicon.png"/><br/>Ver mapa</a></div>
<h3>Serviços hospedados no Interlegis (SEIT)</h3>
</div>
@ -117,7 +117,7 @@
<h2>Atendimentos</h2>
<h3>Mapa de atuação do Interlegis</h3>
<div class="align-center">
<a href="/sigi/dashboard/mapa/"> <img src="{{ STATIC_URL }}img/mapicon-large.png" style="width: 60%;"/> </a>
<a href="/dashboard/mapa/"> <img src="{{ STATIC_URL }}img/mapicon-large.png" style="width: 60%;"/> </a>
</div>
{% comment %}
<h2>Metas BID</h2>
@ -154,7 +154,7 @@
<td style="text-align: right;">{{ data.count }}</td>
</tr>
{% endfor %}
<tr><td colspan="2"><a href="/sigi/diagnosticos/mapa/">Ver mapa ampliado</a></td></tr>
<tr><td colspan="2"><a href="/diagnosticos/mapa/">Ver mapa ampliado</a></td></tr>
</table>
<div id="map_canvas" style="float: left; height: 80%; width: 300px;">

Loading…
Cancel
Save