summaryrefslogtreecommitdiffstats
path: root/virtualenv/pffedportal
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2012-07-02 14:35:52 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2012-07-02 14:35:52 (GMT)
commite96eb4eb7c85d983c3d369b2a59520f0aa62ab68 (patch)
tree51838228a8634318f50bf9d61a2ace4bda272426 /virtualenv/pffedportal
parent9b615b31bae4e3e435639b9271899606fe0801ab (diff)
downloadunivnautes-old-e96eb4eb7c85d983c3d369b2a59520f0aa62ab68.zip
univnautes-old-e96eb4eb7c85d983c3d369b2a59520f0aa62ab68.tar.gz
univnautes-old-e96eb4eb7c85d983c3d369b2a59520f0aa62ab68.tar.bz2
mailform: mobile templates
Diffstat (limited to 'virtualenv/pffedportal')
-rw-r--r--virtualenv/pffedportal/base/views.py13
-rw-r--r--virtualenv/pffedportal/templates/mobile/base0.html2
-rw-r--r--virtualenv/pffedportal/templates/mobile/login0.html7
3 files changed, 20 insertions, 2 deletions
diff --git a/virtualenv/pffedportal/base/views.py b/virtualenv/pffedportal/base/views.py
index 8ed742b..117c349 100644
--- a/virtualenv/pffedportal/base/views.py
+++ b/virtualenv/pffedportal/base/views.py
@@ -62,6 +62,10 @@ def index(request):
next_url_host = urlparse.urlsplit(next_url)[1]
except:
next_url_host = next_url
+ if settings.EMAIL_RCPT and settings.EMAIL_HOST:
+ mailform = True
+ else:
+ mailform = False
response = render_to_response('index.html',
{'next_url': next_url,
'next_url_host': next_url_host,
@@ -70,6 +74,7 @@ def index(request):
'pfsenseid': pfsenseid,
'pfsense_session': pfsense_session,
'prefered_idp': request.session.get('prefered_idp', ''),
+ 'mailform': mailform,
},
context_instance=RequestContext(request))
# store prefered_idp in a cookie with a ten days ttl
@@ -91,9 +96,15 @@ def login(request):
except:
default_idp = None
register_next_target(request, url='/')
+ if settings.EMAIL_RCPT and settings.EMAIL_HOST:
+ mailform = True
+ else:
+ mailform = False
return render_to_response('login.html',
{'default_idp': default_idp,
- 'idp_providers': get_idp_list_sorted()},
+ 'idp_providers': get_idp_list_sorted(),
+ 'mailform': mailform,
+ },
context_instance=RequestContext(request))
def sso(request, is_passive=None, force_authn=None, http_method=None):
diff --git a/virtualenv/pffedportal/templates/mobile/base0.html b/virtualenv/pffedportal/templates/mobile/base0.html
index 5cc8f89..a66aff8 100644
--- a/virtualenv/pffedportal/templates/mobile/base0.html
+++ b/virtualenv/pffedportal/templates/mobile/base0.html
@@ -16,7 +16,7 @@
<div data-role="page" id="home" data-theme="b">
<div data-role="header" data-position="inline">
- <h1><img src="{{ MEDIA_URL }}mobile/logo_eduspot_120x86.png" class="logo-eduspot"/></h1>
+ <h1><a href="/" data-ajax="false"><img src="{{ MEDIA_URL }}mobile/logo_eduspot_120x86.png" class="logo-eduspot"/></a></h1>
{% block home-navbar %}{% endblock %}
</div>
<div data-role="content">
diff --git a/virtualenv/pffedportal/templates/mobile/login0.html b/virtualenv/pffedportal/templates/mobile/login0.html
index 26084ab..2610bb0 100644
--- a/virtualenv/pffedportal/templates/mobile/login0.html
+++ b/virtualenv/pffedportal/templates/mobile/login0.html
@@ -9,6 +9,11 @@
data-transition="pop">Informations</a></li>
<li><a href="#conditions" data-icon="alert" data-iconpos="top"
data-transition="pop">Conditions d'utilisation</a></li>
+ {% if mailform %}
+ <li><a href="/mail" data-icon="gear" data-iconpos="top"
+ data-ajax="false">En cas de soucis</a></li>
+ {% endif %}
+
</ul>
</div>
{% endblock %}
@@ -47,5 +52,7 @@
{% endfor %}
</ul>
+</nav>
+
{% endblock %}