mirror of https://github.com/interlegis/sigi.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.7 KiB
73 lines
2.7 KiB
{% 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("/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'
|
|
}
|
|
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 %}
|
|
|