Commit 5aa6e823 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Added location search in location add/edit. This closes #2972

Added a text field in institution location edit/creation. This
one closes issue #2972
parent 96c4a324
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-22 12:33+0200\n"
"POT-Creation-Date: 2012-12-06 18:01+0200\n"
"PO-Revision-Date: 2012-10-23 11:29+0300\n"
"Last-Translator: Leonidas Poulopoulos <leopoul@noc.grnet.gr>\n"
"Language-Team: Greek <leopoul@noc.grnet.gr>\n"
......@@ -33,7 +33,7 @@ msgstr "Ελλάδα"
msgid "GRNET Helpdesk"
msgstr ""
#: accounts/views.py:76
#: accounts/views.py:78
#, python-format
msgid "%sUser account activated"
msgstr ""
......@@ -209,8 +209,8 @@ msgid ""
"_ characters."
msgstr ""
#: templates/404.html:6 templates/500.html:6 templates/base.html:79
#: templates/base.html.py:122 templates/status.html:6
#: templates/404.html:6 templates/500.html:6 templates/base.html:78
#: templates/base.html.py:121 templates/status.html:6
#: templates/edumanage/contacts.html:4
#: templates/edumanage/contacts_edit.html:4
#: templates/edumanage/institution.html:12
......@@ -231,7 +231,7 @@ msgstr ""
msgid "Home"
msgstr "Αρχική"
#: templates/404.html:12 templates/500.html:12 templates/base.html:85
#: templates/404.html:12 templates/500.html:12 templates/base.html:84
#: templates/status.html:12 templates/front/management.html:15
#: templates/registration/activate.html:13
#: templates/registration/activation_complete.html:13
......@@ -239,55 +239,55 @@ msgstr "Αρχική"
msgid "Manage"
msgstr "Διαχείριση"
#: templates/base.html:92 templates/edumanage/services_edit.html:349
#: templates/base.html:91 templates/edumanage/services_edit.html:375
msgid "Language"
msgstr "Γλώσσα"
#: templates/base.html:123
#: templates/base.html:122
msgid "USERS"
msgstr "ΧΡΗΣΤΕΣ"
#: templates/base.html:124
#: templates/base.html:123
msgid "The service"
msgstr "Η υπηρεσία"
#: templates/base.html:126
#: templates/base.html:125
msgid "INSTITUTIONS"
msgstr "ΦΟΡΕΙΣ"
#: templates/base.html:127 templates/front/management.html:10
#: templates/base.html:126 templates/front/management.html:10
msgid "Management"
msgstr "Διαχείριση"
#: templates/base.html:128
#: templates/base.html:127
msgid "SERVICE"
msgstr "ΥΠΗΡΕΣΙΑ"
#: templates/base.html:129
#: templates/base.html:128
msgid "Closest eduroam"
msgstr "Πλησιέστερο eduroam"
#: templates/base.html:130
#: templates/base.html:129
msgid "World eduroam"
msgstr "Eduroam στον κόσμο"
#: templates/base.html:131
#: templates/base.html:130
msgid "Participants"
msgstr "Συμμετέχοντες"
#: templates/base.html:158
#: templates/base.html:157
msgid "Designed and developed by"
msgstr "Σχεδιάζεται και αναπτύσσεται από"
#: templates/base.html:158
#: templates/base.html:157
msgid "GRNET NOC"
msgstr "το NOC του ΕΔΕΤ"
#: templates/base.html:162
#: templates/base.html:161
msgid "If you have any questions or need help"
msgstr "Αν έχετε απορίες ή χρειάζεστε βοήθεια"
#: templates/base.html:162
#: templates/base.html:161
msgid "contact GRNET Helpdesk"
msgstr "επικοινωνήστε με το Helpdesk του ΕΔΕΤ"
......@@ -296,7 +296,7 @@ msgstr "επικοινωνήστε με το Helpdesk του ΕΔΕΤ"
#: templates/edumanage/institution.html:35
#: templates/edumanage/institution_edit.html:87
#: templates/edumanage/servers.html:118 templates/edumanage/services.html:114
#: templates/edumanage/services_edit.html:349 templates/front/index.html:174
#: templates/edumanage/services_edit.html:375 templates/front/index.html:170
msgid "Name"
msgstr "Όνομα"
......@@ -315,7 +315,7 @@ msgstr "Τηλέφωνο"
#: templates/edumanage/institution.html:59
#: templates/edumanage/institution_edit.html:115
#: templates/edumanage/service_details.html:137
#: templates/edumanage/services_edit.html:388
#: templates/edumanage/services_edit.html:414
#: templates/edumanage/welcome.html:217
msgid "Contacts"
msgstr "Επαφές"
......@@ -429,7 +429,7 @@ msgstr "Ενέργεια"
#: templates/edumanage/servers_edit.html:21
#: templates/edumanage/services.html:130
#: templates/edumanage/services_edit.html:7
#: templates/edumanage/services_edit.html:310
#: templates/edumanage/services_edit.html:331
msgid "edit"
msgstr "επεξεργασία"
......@@ -468,7 +468,7 @@ msgstr "Προσθήκη Επαφής"
#: templates/edumanage/monlocauthpar_edit.html:77
#: templates/edumanage/realms_edit.html:59
#: templates/edumanage/servers_edit.html:118
#: templates/edumanage/services_edit.html:475
#: templates/edumanage/services_edit.html:501
#: templates/registration/select_institution.html:57
msgid "Apply"
msgstr "Εφαρμογή"
......@@ -493,20 +493,20 @@ msgstr "Τύπος"
#: templates/edumanage/institution.html:47
#: templates/edumanage/institution_edit.html:99
#: templates/edumanage/services_edit.html:364
#: templates/edumanage/services_edit.html:390
msgid "Address Street"
msgstr "Οδός"
#: templates/edumanage/institution.html:53
#: templates/edumanage/institution_edit.html:107
#: templates/edumanage/services_edit.html:372
#: templates/edumanage/services_edit.html:398
msgid "Address City"
msgstr "Πόλη"
#: templates/edumanage/institution.html:67
#: templates/edumanage/institution_edit.html:123
#: templates/edumanage/service_details.html:192
#: templates/edumanage/services_edit.html:452
#: templates/edumanage/services_edit.html:478
msgid "Urls"
msgstr "Σύνδεσμοι"
......@@ -546,13 +546,13 @@ msgid "Number of Users"
msgstr "Αριθμός Χρηστών"
#: templates/edumanage/institution_edit.html:179
#: templates/edumanage/services_edit.html:483
#: templates/edumanage/services_edit.html:509
msgid "Add User"
msgstr "Νέος Χρήστης"
#: templates/edumanage/institution_edit.html:185
#: templates/edumanage/services.html:160
#: templates/edumanage/services_edit.html:489
#: templates/edumanage/services_edit.html:515
msgid "Close"
msgstr "Κλείσιμο"
......@@ -749,43 +749,43 @@ msgid "Locations"
msgstr "Τοποθεσίες"
#: templates/edumanage/service_details.html:104
#: templates/edumanage/services_edit.html:323
#: templates/edumanage/services_edit.html:344
msgid "Location"
msgstr "Τοποθεσία"
#: templates/edumanage/service_details.html:113
#: templates/edumanage/services_edit.html:344
#: templates/edumanage/services_edit.html:370
msgid "Location Name"
msgstr "Όνομα Τοποθεσίας"
#: templates/edumanage/service_details.html:122
#: templates/edumanage/services.html:115 templates/front/index.html:177
#: templates/edumanage/services.html:115 templates/front/index.html:173
msgid "Address"
msgstr "Διεύθυνση"
#: templates/edumanage/service_details.html:145
#: templates/edumanage/services.html:117
#: templates/edumanage/services_edit.html:396
#: templates/edumanage/services_edit.html:422
msgid "Encryption Level"
msgstr "Επίπεδο Κρυπτογράφησης"
#: templates/edumanage/service_details.html:151
#: templates/edumanage/services_edit.html:404 templates/front/index.html:192
#: templates/edumanage/services_edit.html:430 templates/front/index.html:188
msgid "Port Restrict"
msgstr ""
#: templates/edumanage/service_details.html:158
#: templates/edumanage/services_edit.html:412
#: templates/edumanage/services_edit.html:438
msgid "Transparent Proxy"
msgstr ""
#: templates/edumanage/service_details.html:179
#: templates/edumanage/services_edit.html:436
#: templates/edumanage/services_edit.html:462
msgid "AP number"
msgstr "Αριθμός APs"
#: templates/edumanage/service_details.html:186
#: templates/edumanage/services_edit.html:444 templates/front/index.html:204
#: templates/edumanage/services_edit.html:470 templates/front/index.html:200
msgid "Wired"
msgstr ""
......@@ -813,7 +813,7 @@ msgstr "διαγράφηκε επιτυχώς"
msgid "Add location"
msgstr "Προσθήκη τοποθεσίας"
#: templates/edumanage/services.html:116 templates/front/index.html:183
#: templates/edumanage/services.html:116 templates/front/index.html:179
msgid "SSID"
msgstr ""
......@@ -830,39 +830,43 @@ msgid "Location Details"
msgstr "Λεπτομέρειες Τοποθεσίας"
#: templates/edumanage/services_edit.html:7
#: templates/edumanage/services_edit.html:310
#: templates/edumanage/services_edit.html:331
msgid "Add Location"
msgstr "Προσθήκη Tοποθεσίας"
#: templates/edumanage/services_edit.html:331
#: templates/edumanage/services_edit.html:352
msgid "Search location"
msgstr "Αναζήτηση τοποθεσίας"
#: templates/edumanage/services_edit.html:357
msgid "Update Map"
msgstr "Ενημέρωση χάρτη"
#: templates/edumanage/services_edit.html:334
#: templates/edumanage/services_edit.html:360
msgid "Current Location"
msgstr "Τρέχουσα Τοποθεσία"
#: templates/edumanage/services_edit.html:457
#: templates/edumanage/services_edit.html:483
msgid "url"
msgstr "σύνδεσμος"
#: templates/edumanage/services_edit.html:457
#: templates/edumanage/services_edit.html:483
msgid "type"
msgstr "τύπος"
#: templates/edumanage/services_edit.html:457
#: templates/edumanage/services_edit.html:483
msgid "language"
msgstr "γλώσσα"
#: templates/edumanage/services_edit.html:490
#: templates/edumanage/services_edit.html:516
msgid "Save Changes"
msgstr "Αποθήκευση Αλλαγών"
#: templates/edumanage/welcome.html:105 templates/front/index.html:168
#: templates/edumanage/welcome.html:105 templates/front/index.html:164
msgid "Info"
msgstr "Στοιχεία"
#: templates/edumanage/welcome.html:106 templates/front/index.html:169
#: templates/edumanage/welcome.html:106 templates/front/index.html:165
msgid "More..."
msgstr "Περισσότερα"
......@@ -882,19 +886,19 @@ msgstr "Δεν έχουν εισαχθεί υπηρεσίες"
msgid "Add new service"
msgstr "Προσθήκη υπηρεσίας"
#: templates/front/index.html:180
#: templates/front/index.html:176
msgid "Encryption"
msgstr "Κρυπτογράφηση"
#: templates/front/index.html:186
#: templates/front/index.html:182
msgid "Number of APs"
msgstr "Αριθμός APs"
#: templates/front/index.html:195
#: templates/front/index.html:191
msgid "transp_proxy"
msgstr ""
#: templates/front/index.html:362
#: templates/front/index.html:358
msgid "Eduroam in Greece"
msgstr "Eduroam στην Ελλάδα"
......
......@@ -8,7 +8,7 @@
{% endblock %}
{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.formset.js"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&language=en&libraries=places"></script>
<script src="/static/js/jquery_csrf_protect.js" type="text/javascript"></script>
<script type="text/javascript">
......@@ -170,8 +170,17 @@
navigationControl: true,
mapTypeControl: false,
};
map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
var input = document.getElementById('searchbox');
var autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.bindTo('bounds', map);
if (getOnce == false) {
marker = new google.maps.Marker({
position : latlng,
......@@ -203,7 +212,19 @@
google.maps.event.addListener(marker, 'dragend', function(event) {
setPositionValues(marker.getPosition());
});
google.maps.event.addListener(autocomplete, 'place_changed', function() {
var place = autocomplete.getPlace();
if (place.geometry.viewport) {
map.fitBounds(place.geometry.viewport);
} else {
map.setCenter(place.geometry.location);
map.setZoom(17); // Why 17? Because it looks good.
}
getOnce == true;
moveMarker(place.geometry.location);
});
}
$(document).ready(function() {
......@@ -321,12 +342,17 @@
</div>
<div class="control-group {% if form.longitude.errors or form.latitude.errors %} error {% endif %}">
<label class="control-label" for="id_map_canvas"><b>{% trans "Location" %}</b></label>
<div class="controls">
<div id="map_canvas" style="width:100%; height:350px;"></div>
<span class="help-block">{{ form.longitude.help_text }}</span>
</div>
<div class="controls" style="margin-top: 5px; margin-bottom: 5px;">
{% trans "Search location" %}: <input type="text" value="" id="searchbox" style=" width: 300px;">
</div>
<div class="controls">
Lat:{{ form.latitude }} Lng:{{ form.longitude }}
Lat: {{ form.latitude }} Lng: {{ form.longitude }}
<button class="btn btn-info disabled" id="updatemap" disabled="disabled">
{% trans "Update Map" %}
</button>
......
......@@ -200,7 +200,7 @@ margin-bottom: 0px;
map.setZoom(17); // Why 17? Because it looks good.
}
moveMarker(place.geometry.location);
})
});
}
function calcRoute(start, end) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment