root / templates / edumanage / service_details.html @ 2bdd3a0c
History | View | Annotate | Download (7.5 kB)
1 |
{% extends "edumanage/welcome.html"%} |
---|---|
2 |
{% load tolocale %} |
3 |
{% block crumbs %} |
4 |
<li><a href="{% url manage %}">Home</a><span class="divider">/</span></li> |
5 |
<li><a href="{% url services %}">Services</a><span class="divider">/</span></li> |
6 |
<li class="active">{% tolocale service LANGUAGE_CODE %}</li> |
7 |
{% endblock %} |
8 |
{% block extrahead %} |
9 |
<style type="text/css"> |
10 |
.control-label{ |
11 |
padding-top: 0px !important; |
12 |
width: auto !important; |
13 |
} |
14 |
</style>
|
15 |
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> |
16 |
|
17 |
<script type="text/javascript"> |
18 |
|
19 |
var map = '';
|
20 |
var lat = "{{service.latitude}}";
|
21 |
var lat = parseFloat(lat.replace(",","."));
|
22 |
var lng = "{{service.longitude}}";
|
23 |
var lng = parseFloat(lng.replace(",","."));
|
24 |
var latlng = new google.maps.LatLng(lat,lng);
|
25 |
var zoomLevel = 16;
|
26 |
|
27 |
function initialize() {
|
28 |
image = new google.maps.MarkerImage('/static/img/edupin.png',
|
29 |
// This marker is 29 pixels wide by 40 pixels tall.
|
30 |
new google.maps.Size(29, 40),
|
31 |
// The origin for this image is 0,0.
|
32 |
new google.maps.Point(0,0),
|
33 |
// The anchor for this image is the base of the flagpole at 18,42.
|
34 |
new google.maps.Point(14, 40)
|
35 |
);
|
36 |
var styleArray = [
|
37 |
{
|
38 |
featureType: "all",
|
39 |
stylers: [
|
40 |
{ saturation: -60 },
|
41 |
{gamma: 1.00 }
|
42 |
]
|
43 |
},{
|
44 |
featureType: "poi.business",
|
45 |
elementType: "labels",
|
46 |
stylers: [
|
47 |
{ visibility: "off" }
|
48 |
]
|
49 |
},
|
50 |
{ "featureType": "transit.line", "elementType": "geometry", "stylers": [ { "visibility": "off" } ] },
|
51 |
{ "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] },
|
52 |
{'featureType': "administrative.country",
|
53 |
'elementType': "labels",
|
54 |
'stylers': [
|
55 |
{ 'visibility': "off" }
|
56 |
]}
|
57 |
];
|
58 |
var mapOptions = {
|
59 |
center : latlng,
|
60 |
zoom : zoomLevel,
|
61 |
styles: styleArray,
|
62 |
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
63 |
mapTypeControlOptions: {
|
64 |
style: google.maps.MapTypeControlStyle.DEFAULT
|
65 |
},
|
66 |
navigationControl: true,
|
67 |
mapTypeControl: false,
|
68 |
};
|
69 |
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
|
70 |
var marker = new google.maps.Marker({
|
71 |
'position' : latlng,
|
72 |
'map' : map,
|
73 |
'icon': image,
|
74 |
});
|
75 |
|
76 |
}
|
77 |
|
78 |
|
79 |
$(document).ready(function() {
|
80 |
|
81 |
initialize();
|
82 |
|
83 |
|
84 |
});
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
</script>
|
90 |
|
91 |
|
92 |
{% endblock %} |
93 |
|
94 |
{% block homeactive %}{% endblock %} |
95 |
{% block servicesactive %}class="active"{% endblock %} |
96 |
{% block subcontent %} |
97 |
|
98 |
<h4>{% tolocale service LANGUAGE_CODE %}</h4> |
99 |
<hr>
|
100 |
<div class="form-horizontal span7"> |
101 |
|
102 |
<div class="control-group {% if form.longitude.errors or form.latitude.errors %} error {% endif %}"> |
103 |
<label class="control-label" for="id_map_canvas">Location</label> |
104 |
|
105 |
<div class="controls"> |
106 |
Lat: {{ service.latitude }}<br>
|
107 |
Lng: {{ service.longitude }} |
108 |
</div>
|
109 |
</div>
|
110 |
|
111 |
<div class="control-group"> |
112 |
<label class="control-label" for="id_address_city">loc_name</label> |
113 |
|
114 |
<div class="controls"> |
115 |
{% for name in service.loc_name.all %} |
116 |
{{name.name}} ({{name.get_lang_display}}){% if not forloop.last %}<br>{% endif %}
|
117 |
{% endfor %} |
118 |
</div>
|
119 |
</div>
|
120 |
<div class="control-group {% if form.address_street.errors %} error {% endif %}"> |
121 |
<label class="control-label" for="id_address_street">Address</label> |
122 |
<div class="controls"> |
123 |
{{ service.address_street }}<br>
|
124 |
{{ service.address_city }} |
125 |
|
126 |
</div>
|
127 |
</div>
|
128 |
<div class="control-group {% if form.SSID.errors %} error {% endif %}"> |
129 |
<label class="control-label" for="id_url">SSID</label> |
130 |
<div class="controls"> |
131 |
{{ service.SSID }} |
132 |
|
133 |
</div>
|
134 |
</div>
|
135 |
<div class="control-group {% if form.contact.errors %} error {% endif %}"> |
136 |
<label class="control-label" for="id_contact">Contact</label> |
137 |
<div class="controls"> |
138 |
{% for contact in service.contact.all %} |
139 |
{{contact.firstname}} {{contact.lastname}} (<a href="mailto:{{contact.email}}">{{contact.email}}</a> - tel:{{contact.phone}}){% if not forloop.last %}<br>{% endif %} |
140 |
{% endfor %} |
141 |
</div>
|
142 |
</div>
|
143 |
<div class="control-group {% if form.enc_level.errors %} error {% endif %}"> |
144 |
<label class="control-label" for="id_oper_name">enc_level</label> |
145 |
<div class="controls"> |
146 |
{{ service.enc_level }} |
147 |
|
148 |
</div>
|
149 |
</div>
|
150 |
<div class="control-group {% if form.port_restrict.errors %} error {% endif %}"> |
151 |
<label class="control-label" for="id_number_user">port_restrict</label> |
152 |
<div class="controls"> |
153 |
{{ service.port_restrict }} |
154 |
|
155 |
</div>
|
156 |
</div>
|
157 |
<div class="control-group {% if form.transp_proxy.errors %} error {% endif %}"> |
158 |
<label class="control-label" for="id_number_id">transp_proxy</label> |
159 |
<div class="controls"> |
160 |
{{ service.transp_proxy }} |
161 |
|
162 |
</div>
|
163 |
</div>
|
164 |
<div class="control-group {% if form.IPv6.errors %} error {% endif %}"> |
165 |
<label class="control-label" for="id_number_id">IPv6</label> |
166 |
<div class="controls"> |
167 |
{{ service.IPv6 }} |
168 |
|
169 |
</div>
|
170 |
</div>
|
171 |
<div class="control-group {% if form.NAT.errors %} error {% endif %}"> |
172 |
<label class="control-label" for="id_number_id">NAT</label> |
173 |
<div class="controls"> |
174 |
{{ service.NAT }} |
175 |
|
176 |
</div>
|
177 |
</div>
|
178 |
<div class="control-group {% if form.AP_no.errors %} error {% endif %}"> |
179 |
<label class="control-label" for="id_number_id">AP_no</label> |
180 |
<div class="controls"> |
181 |
{{ service.AP_no }} |
182 |
|
183 |
</div>
|
184 |
</div>
|
185 |
<div class="control-group {% if form.wired.errors %} error {% endif %}"> |
186 |
<label class="control-label" for="id_number_id">wired</label> |
187 |
<div class="controls"> |
188 |
{{ service.wired }} |
189 |
</div>
|
190 |
</div>
|
191 |
<div class="control-group {% for err in urls_form.errors %}{% if err|length > 0 %}error{% endif %}{% endfor %}{% if urls_form.non_form_errors %}error{% endif %}"> |
192 |
<label class="control-label" for="id_urls">Urls</label> |
193 |
<div class="controls"> |
194 |
{% for url in service.url.all %} |
195 |
<a href="{{url.url}}">{{url.url}}</a> - {{url.get_urltype_display}} ({{url.get_lang_display}}){% if not forloop.last %}<br>{% endif %} |
196 |
{% endfor %} |
197 |
</div>
|
198 |
</div>
|
199 |
<div class="control-group"> |
200 |
<div class="controls"> |
201 |
<a class="btn btn-large btn-primary" href="{% url edit-services service.pk %}">Edit</a> |
202 |
</div>
|
203 |
</div>
|
204 |
|
205 |
|
206 |
</div>
|
207 |
<div class="span4"><div id="map_canvas" style="width:300px; height: 300px;"></div> |
208 |
</div>
|
209 |
{% endblock %} |