Commit 8a177e59 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Updated views and templates with settings NRO variables

parent ab0658b0
......@@ -35,7 +35,7 @@ from edumanage.decorators import social_active_required
@never_cache
def index(request):
return render_to_response('front/index.html', {'country': settings.COUNTRY_NAME, 'map_center': settings.MAP_CENTER}, context_instance=RequestContext(request))
return render_to_response('front/index.html', context_instance=RequestContext(request))
@login_required
......@@ -60,9 +60,7 @@ def manage(request):
{
'institution': inst,
'services': services_list,
'servers': servers_list,
'map_center': settings.MAP_CENTER
'servers': servers_list,
},
context_instance=RequestContext(request, base_response(request)))
......@@ -239,7 +237,7 @@ def add_services(request, service_pk):
edit = True
for url_form in urls_form.forms:
url_form.fields['urltype'] = forms.ChoiceField(choices=(('', '----------'),('info', 'Info'),))
return render_to_response('edumanage/services_edit.html', { 'form': form, 'services_form':names_form, 'urls_form': urls_form, "edit": edit, 'map_center': settings.MAP_CENTER},
return render_to_response('edumanage/services_edit.html', { 'form': form, 'services_form':names_form, 'urls_form': urls_form, "edit": edit},
context_instance=RequestContext(request, base_response(request)))
elif request.method == 'POST':
request_data = request.POST.copy()
......@@ -273,7 +271,7 @@ def add_services(request, service_pk):
edit = True
for url_form in urls_form.forms:
url_form.fields['urltype'] = forms.ChoiceField(choices=(('', '----------'),('info', 'Info'),))
return render_to_response('edumanage/services_edit.html', { 'institution': inst, 'form': form, 'services_form':names_form, 'urls_form': urls_form, "edit": edit, 'map_center': settings.MAP_CENTER},
return render_to_response('edumanage/services_edit.html', { 'institution': inst, 'form': form, 'services_form':names_form, 'urls_form': urls_form, "edit": edit},
context_instance=RequestContext(request, base_response(request)))
......@@ -1093,8 +1091,7 @@ def check_user_inst(request):
@never_cache
def geolocate(request):
return render_to_response('front/geolocate.html', {'map_center': settings.MAP_CENTER},
context_instance=RequestContext(request))
return render_to_response('front/geolocate.html', context_instance=RequestContext(request))
@never_cache
def participants(request):
institutions = Institution.objects.all()
......@@ -1104,7 +1101,7 @@ def participants(request):
dets.append(i.institutiondetails)
except InstitutionDetails.DoesNotExist:
pass
return render_to_response('front/participants.html', {'institutions': dets, 'country': settings.COUNTRY_NAME},
return render_to_response('front/participants.html', { 'institutions': dets } ,
context_instance=RequestContext(request))
@never_cache
def selectinst(request):
......@@ -1205,8 +1202,7 @@ def worldPoints(request):
@never_cache
def world(request):
return render_to_response('front/world.html', {'map_center': settings.MAP_CENTER},
context_instance=RequestContext(request))
return render_to_response('front/world.html', context_instance=RequestContext(request))
@never_cache
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-06 17:26+0200\n"
"POT-Creation-Date: 2013-02-07 11:37+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"
......@@ -25,21 +25,21 @@ msgstr "Ελληνικά"
msgid "English"
msgstr "Αγγλικά"
#: settings.py:191
#: settings.py:192
msgid "Greece"
msgstr "Ελλάδα"
#: settings.py:198
#: settings.py:208
msgid "GRNET Helpdesk"
msgstr ""
msgstr "Helpdesk ΕΔΕΤ"
#: accounts/views.py:80
#, python-format
msgid "%sUser account activated"
msgstr ""
#: edumanage/decorators.py:18 edumanage/views.py:1055 edumanage/views.py:1078
#: edumanage/views.py:1130
#: edumanage/decorators.py:18 edumanage/views.py:1053 edumanage/views.py:1076
#: edumanage/views.py:1127
#, python-format
msgid ""
"User account <strong>%s</strong> is pending activation. Administrators have "
......@@ -163,35 +163,35 @@ msgid ""
"%(numid)s"
msgstr ""
#: edumanage/views.py:1023
#: edumanage/views.py:1021
msgid ""
"Your idP should release the eduPersonPrincipalName attribute towards this "
"service<br>"
msgstr ""
#: edumanage/views.py:1025
#: edumanage/views.py:1023
msgid ""
"Your idP should release an appropriate eduPersonEntitlement attribute "
"towards this service<br>"
msgstr ""
#: edumanage/views.py:1027
#: edumanage/views.py:1025
msgid "Your idP should release the mail attribute towards this service"
msgstr ""
#: edumanage/views.py:1059
#: edumanage/views.py:1057
#, python-format
msgid ""
"Something went wrong during user authentication. Contact your administrator "
"%s"
msgstr ""
#: edumanage/views.py:1063
#: edumanage/views.py:1061
#, python-format
msgid "Invalid login procedure. Error: %s"
msgstr "Λανθασμένη διαδικασία εισαγωγής στη διαχείριση. Σφάλμα: %s"
#: edumanage/views.py:1116
#: edumanage/views.py:1113
msgid ""
"Violation warning: User account is already associated with an institution."
"The event has been logged and our administrators will be notified about it"
......@@ -300,18 +300,14 @@ msgstr "Eduroam στον κόσμο"
msgid "Participants"
msgstr "Συμμετέχοντες"
#: templates/base.html:160
msgid "Designed and developed by"
msgstr "Σχεδιάζεται και αναπτύσσεται από"
#: templates/base.html:160
msgid "GRNET NOC"
msgstr "το NOC του ΕΔΕΤ"
#: templates/base.html:164
#: templates/footer.html:5
msgid "If you have any questions or need help, contact"
msgstr "Αν έχετε απορίες ή χρειάζεστε βοήθεια, επικοινωνήστε με το"
#: templates/footer.html:7
msgid "Designed and developed by"
msgstr "Σχεδιάζεται και αναπτύσσεται από το"
#: templates/edumanage/add_user.html:6 templates/edumanage/contacts.html:114
#: templates/edumanage/contacts_edit.html:33
#: templates/edumanage/institution.html:35
......@@ -1147,6 +1143,9 @@ msgstr "Ενεργοποίηση"
msgid "The user will be notified about his/her account activation"
msgstr "Ο χρήστης θα ενημερωθεί για την ενεργοποίση του λογαριασμού"
#~ msgid "GRNET NOC"
#~ msgstr "το NOC του ΕΔΕΤ"
#~ msgid "contact GRNET Helpdesk"
#~ msgstr "επικοινωνήστε με το Helpdesk του ΕΔΕΤ"
......
......@@ -14,9 +14,9 @@
<script type="text/javascript">
function gettext(msgid) { return msgid; }
var lat = "{{map_center.0}}";
var lat = "{{MAP_CENTER.0}}";
var lat = parseFloat(lat.replace(",","."));
var lng = "{{map_center.1}}";
var lng = "{{MAP_CENTER.1}}";
var lng = parseFloat(lng.replace(",","."));
var zoomLevel = 6;
{% if form.data.latitude or form.instance.latitude %}
......
......@@ -5,9 +5,9 @@
<script type="text/javascript" src="/static/js/markerclusterer.js"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var lat = "{{map_center.0}}";
var lat = "{{MAP_CENTER.0}}";
var lat = parseFloat(lat.replace(",","."));
var lng = "{{map_center.1}}";
var lng = "{{MAP_CENTER.1}}";
var lng = parseFloat(lng.replace(",","."));
var zoomLevel = 6;
var latlng = new google.maps.LatLng(lat,lng);
......
......@@ -72,9 +72,9 @@ margin-bottom: 0px;
}
</style>
<script type="text/javascript">
var lat = "{{map_center.0}}";
var lat = "{{MAP_CENTER.0}}";
var lat = parseFloat(lat.replace(",","."));
var lng = "{{map_center.1}}";
var lng = "{{MAP_CENTER.1}}";
var lng = parseFloat(lng.replace(",","."));
var zoomLevel = 6;
var latlng = new google.maps.LatLng(lat, lng);
......
......@@ -11,9 +11,9 @@
<script type="text/javascript" src="/static/js/markerclusterer.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var lat = "{{map_center.0}}";
var lat = "{{MAP_CENTER.0}}";
var lat = parseFloat(lat.replace(",","."));
var lng = "{{map_center.1}}";
var lng = "{{MAP_CENTER.1}}";
var lng = parseFloat(lng.replace(",","."));
var zoomLevel = 6;
var latlng = new google.maps.LatLng(lat,lng);
......@@ -358,7 +358,7 @@
{% block subcontent %}
<h4>{% trans "Eduroam in" %} {% trans country %}</h4>
<h4>{% trans "Eduroam in" %} {% trans COUNTRY_NAME %}</h4>
<hr>
<div id="map_canvas" style="width:100%; height:600px; overflow: hidden;"></div>
......
......@@ -17,7 +17,7 @@
{% load tolocale %}
<h4>{% trans "Participating Institutions" %}</h4>
<hr>
<div>{% trans "In"%} {%trans country %} {% trans "eduroam is provided by the following instituitons/organizations" %}</div><br>
<div>{% trans "In"%} {% trans COUNTRY_NAME %} {% trans "eduroam is provided by the following instituitons/organizations" %}</div><br>
<div>{% for i in institutions %}
<address>
<strong>{% tolocale i.institution LANGUAGE_CODE %}</strong><br>
......
......@@ -13,9 +13,9 @@
<script type="text/javascript" src="/static/js/markerclusterer.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var lat = "{{map_center.0}}";
var lat = "{{MAP_CENTER.0}}";
var lat = parseFloat(lat.replace(",","."));
var lng = "{{map_center.1}}";
var lng = "{{MAP_CENTER.1}}";
var lng = parseFloat(lng.replace(",","."));
var zoomLevel = 6;
var latlng = new google.maps.LatLng(lat,lng);
......
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