Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:mollyproject/mollyproject

  • Loading branch information...
commit 69753709c8952e3f69716a1c7b7987b69a7f8fb5 2 parents fcea1d4 + f0fe804
@timfernando timfernando authored
View
10 demos/molly_oxford/templates/home/index.html
@@ -1,4 +1,5 @@
{% extends "home/base.html" %}
+{% load molly_utils %}
{% load molly_apps_weather %}
{% load portal_misc %}{% load maps %}{% load molly_apps_search %}{% load oxford_apps_river_status %}
@@ -35,6 +36,15 @@
{% endblock %}
{% block content %}
+ {% if messages %}
+ <div class="section">
+ <ul class="content-list">
+ {% for message in messages %}
+ <li>{{ message|sanitize_html }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
<div class="bubble">
<div class="center">
<ol class="icon-menu">
View
8 molly/apps/home/views.py
@@ -39,6 +39,13 @@ def handle_GET(self, request, context):
and not settings.DEBUG
and conf.has_app('molly.apps.desktop')):
return HttpResponseRedirect(reverse('desktop:index'))
+
+ # Add any one-off messages to be shown to this user
+ messages = []
+
+ if request.session.get('opera_mini_warning', False) and request.browser.mobile_browser == u'Opera Mini':
+ messages.append('Please note that the "Mobile View" on Opera Mini does not display this site correctly. To ensure correct operation of this site, ensure "Mobile View" is set to Off in Opera settings')
+ request.session['opera_mini_warning'] = True
applications = [{
'application_name': app.application_name,
@@ -46,6 +53,7 @@ def handle_GET(self, request, context):
'title': app.title,
'url': reverse('%s:index' % app.local_name) if app.has_urlconf else None,
'display_to_user': app.display_to_user,
+ 'messages': messages
} for app in conf.all_apps()]
context = {
Please sign in to comment.
Something went wrong with that request. Please try again.