Browse Source

Correção dos static files path e layout

stable/2.0
Breno Teixeira 11 years ago
parent
commit
387950f38d
  1. 6
      media/css/base_site.css
  2. BIN
      sigi.db
  3. 2
      sigi/apps/casas/views.py
  4. 4
      sigi/apps/contatos/admin.py
  5. 1
      sigi/apps/contatos/models.py
  6. 11
      sigi/apps/diagnosticos/templates/diagnosticos/graficos.html
  7. 1
      sigi/apps/metas/templates/metas/dashboard.html
  8. 2
      sigi/apps/servidores/admin.py
  9. 1
      sigi/urls.py
  10. 2
      templates/admin/app_index.html
  11. 6
      templates/admin/carrinho.html
  12. 73
      templates/admin/index.html
  13. 4
      templates/admin/tabs_style.html

6
media/css/base_site.css

@ -25,7 +25,7 @@ a:hover {
}
#nav-global ul { /*background:#222;*/
background: #efefef url("../../admin_media/img/admin/nav-bg.gif");
background: #efefef url("../../static/admin/img/nav-bg.gif");
/*#9C9C9C;*/
height: 25px;
margin: 0;
@ -195,7 +195,7 @@ div#footer a {
/* JQuery */
.tabs-conteudo li {
border: 1px solid #CCC;
background-image: url("/sigi/admin_media/img/admin/nav-bg.gif");
background-image: url("../../static/admin/img/nav-bg.gif");
display: inline;
padding: 4px 8px;
}
@ -206,7 +206,7 @@ div#footer a {
.conteudo_regiao li{
border: 1px solid #CCC;
background-image: url("/sigi/admin_media/img/admin/nav-bg.gif");
background-image: url("../../static/admin/img/nav-bg.gif");
padding: 4px 8px;
width: 30%;
list-style: none;

BIN
sigi.db

Binary file not shown.

2
sigi/apps/casas/views.py

@ -95,7 +95,7 @@ def visualizar_carrinho(request):
return render_to_response(
'casas/carrinho.html',
{
"ADMIN_MEDIA_PREFIX":settings.ADMIN_MEDIA_PREFIX,
# "ADMIN_MEDIA_PREFIX":settings.ADMIN_MEDIA_PREFIX,
'MEDIA_URL':settings.MEDIA_URL,
'carIsEmpty':carrinhoIsEmpty,
'paginas':paginas,

4
sigi/apps/contatos/admin.py

@ -3,12 +3,14 @@ from django.contrib import admin
from sigi.apps.contatos.models import (UnidadeFederativa, Municipio, Telefone,
Contato)
from sigi.apps.utils import queryset_ascii
from sigi.apps.contatos.filters import PopulationFilter
class UnidadeFederativaAdmin(admin.ModelAdmin):
actions = None
list_display = ('codigo_ibge', 'nome', 'sigla', 'regiao', 'populacao')
list_display_links = ('codigo_ibge', 'nome')
list_filter = ('regiao', 'populacao')
list_filter = ('regiao', 'populacao', PopulationFilter,)
search_fields = ('search_text', 'codigo_ibge', 'sigla', 'regiao')
queryset = queryset_ascii

1
sigi/apps/contatos/models.py

@ -33,7 +33,6 @@ class UnidadeFederativa(models.Model):
)
regiao = models.CharField('região', max_length=2, choices=REGIAO_CHOICES)
populacao = models.PositiveIntegerField('população')
populacao.list_filter_range = [100000, 1000000, 10000000]
class Meta:
ordering = ('nome',)

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

@ -1,4 +1,4 @@
{% extends "index.html" %}
{% extends "admin/index.html" %}
{% block content_title %}<h1>Graficos dos Diagnósticos</h1>{% endblock %}
@ -37,21 +37,22 @@ jQuery(document).ready(function () {
<form id="categoria" action="." method="POST">
<select name="categoria">
{% for categoria in categorias %}
<option value="{{categoria.id}}" {% if categoria.id == sel_categoria %}selected="selected"{% endif %}>{{categoria.nome}}</option>
<option value="{{ categoria.id }}" {% if categoria.id == sel_categoria %}selected="selected"{% endif %}>{{ categoria.nome }}</option>
{% endfor %}
</select>
</form>
<div id="perguntas">
<ul>
{% for pergunta in perguntas %}
{{ pergunta }}
<li>
{% if pergunta.datatype == 'many' or pergunta.datatype == 'one' %}
<a id="{{pergunta.name}}" href="/sigi/api/diagnosticos/?id={{pergunta.name}}"><p>{{pergunta.title}}</p></a>
<div id="output_{{pergunta.name}}" class="grafico">
<a id="{{ pergunta.name }}" href="/sigi/api/diagnosticos/?id={{ pergunta.name }}"><p>{{ pergunta.title }}</p></a>
<div id="output_{{ pergunta.name }}" class="grafico">
<img style="display:none"/>
</div>
{% else %}
<p>{{pergunta.title}}</p>
<p>{{ pergunta.title }}</p>
{% endif %}
</li>
{% endfor %}

1
sigi/apps/metas/templates/metas/dashboard.html

@ -1,5 +1,4 @@
{% extends "admin/index.html" %}
{% load adminmedia %}
{% block title %}SIGI{% endblock %}

2
sigi/apps/servidores/admin.py

@ -36,7 +36,7 @@ class ServidorFilter(AlphabeticFilter):
class LicencaAdmin(admin.ModelAdmin):
form = LicencaForm
list_display = ('servidor', 'inicio_licenca', 'fim_licenca')
list_filter = (ServidorFilter, 'servidor', 'inicio_licenca', 'fim_licenca')
list_filter = (ServidorFilter, 'inicio_licenca', 'fim_licenca')
search_fields = ('obs',
'servidor__nome_completo', 'servidor__email_pessoal',
'servidor__user__email', 'servidor__user__username')

1
sigi/urls.py

@ -5,6 +5,7 @@ from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
admin.site.index_template = 'index.html'
admin.autodiscover()
urlpatterns = patterns('',

2
templates/admin/app_index.html

@ -1,4 +1,4 @@
{% extends "admin/app_index.html" %}
{% extends "admin/index.html" %}
{% block extrastyle %}
<link rel="stylesheet" type="text/css"

6
templates/admin/carrinho.html

@ -5,7 +5,7 @@
<style>
.botoes{
/*background: url("{{ADMIN_MEDIA_PREFIX}}img/admin/nav-bg.gif");*/
/*background: url("../../static/admin/img/nav-bg.gif");*/
font-weight: bold;
/*color: red;*/
}
@ -16,7 +16,7 @@
color: blue;
}
.botoes li {
background-image: url("{{ADMIN_MEDIA_PREFIX}}img/admin/nav-bg.gif");
background-image: url("../../static/admin/img/nav-bg.gif");
display: inline;
border: 1px solid #CCC;
padding: 5px 10px;
@ -27,7 +27,7 @@
}
.botao_excluir input{
color: red;
background: url("{{ADMIN_MEDIA_PREFIX}}img/admin/icon_deletelink.gif") no-repeat scroll 0 50% transparent
background: url("../../static/admin/img/icon_deletelink.gif") no-repeat scroll 0 50% transparent
}
</style>

73
templates/admin/index.html

@ -1,73 +0,0 @@
{% extends "admin/base_site.html" %}
{% load i18n admin_static %}
{% block title %}SIGI{% endblock %}
{% block extrahead %}
{{ block.super }}
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/core.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.init.js"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"> </script>
<script type="text/javascript">
(function($) {
$(document).ready(function($) {
var latlng = new google.maps.LatLng(-14.2350040, -51.925280);
var myOptions = {
zoom: 3,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
$.get("/sigi/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'
}
var mark = new google.maps.Marker(markData);
var infoWin = new google.maps.InfoWindow({content:
'<strong>' + municipio.nome + '</strong><br/>' +
'<strong>Início da visita:</strong><br/>' + municipio.inicio + '<br/>' +
'<strong>Término da visita:</strong><br/>' + municipio.fim + '<br/>' +
'<strong>Equipe:</trong><br/>' + municipio.equipe });
linkMarkMessage(mark, infoWin, map);
}
});
function linkMarkMessage(mark, infoWin, map) {
google.maps.event.addListener(mark, 'click', function() {
infoWin.open(map, mark);});
}
})
})(django.jQuery);
</script>
{% endblock %}
{% block content_title %}<h1>Dashboard</h1>{% endblock %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}dashboard{% endblock %}
{% block breadcrumbs %}{% endblock %}
{% block content %}
<div id="content-main">
{% include "snippets/modules/charts-convenios.html" %}
</div>
{% endblock %}
{% block sidebar %}
<div id="content-related">
{% include "snippets/modules/user.html" %}
{% include "snippets/modules/actions.html" %}
</div>
{% endblock %}

4
templates/admin/tabs_style.html

@ -8,7 +8,7 @@
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery/ui/jquery.ui.tabs.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery/ui/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery/ui/ jquery.ui.sortable.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery/ui/jquery.ui.sortable.js"></script>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs({
@ -26,6 +26,6 @@
<style>
.ui-tabs-nav {
background-image: url("{{ MEDIA_URL }}img/admin/nav-bg.gif");
background-image: url("{{ MEDIA_URL }}admin/img/nav-bg.gif");
}
</style>

Loading…
Cancel
Save