Commits

Luke Plant  committed 4aadb80

Added django.contrib.messages integration to main template, for use by booking system.

  • Participants
  • Parent commits e92113f
  • Branches bookings

Comments (0)

Files changed (2)

File cciw/cciwmain/static/css/style.css

 {
     margin-top: 1em;
     margin-bottom: 1em;
+}
+
+#mainstandard #contentBody #contentInner
+{
     padding: 0.5em 0.8em 32px 0.8em;
 }
 
     color: white;
     padding: 5px;
 }
+
+/* Messages */
+ul.messagelist {
+    padding: 0 0 5px 0;
+    margin: 0;
+}
+
+ul.messagelist li {
+    font-size: 12px;
+    display: block;
+    padding: 4px 5px 4px 25px;
+    margin: 0 0 3px 0;
+    border-bottom: 1px solid #ddd;
+    color: #666;
+    background: #ffc url(../admin/img/icon_success.gif) 5px .3em no-repeat;
+}
+
+ul.messagelist li.warning{
+    background-image: url(../admin/img/icon_alert.gif);
+}
+
+ul.messagelist li.error{
+    background-image: url(../admin/img/icon_error.gif);
+}

File templates/cciw/standard.html

 				<h1>{% block pagetitle %}{{ title }}{% endblock %}</h1>
 			</div>
 			<div id="contentBody">
-				{% block breadcrumb %}
-					{% if breadcrumb %}
-						<div class='breadcrumb'>{{ breadcrumb }}</div>
-					{% endif %}
-				{% endblock %}
-				{% block content %}
-					{{ contentBody }}
-				{% endblock %}
+                          {% block contentTop %}
+                            {% block messages %}
+                            {% if messages %}
+                            <ul class="messagelist">{% for message in messages %}
+                              <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+                              {% endfor %}</ul>
+                            {% endif %}
+                            {% endblock messages %}
+                          {% endblock contentTop %}
+                          <div id="contentInner">
+			    {% block breadcrumb %}
+			    {% if breadcrumb %}
+			    <div class='breadcrumb'>{{ breadcrumb }}</div>
+			    {% endif %}
+			    {% endblock %}
+			    {% block content %}
+			    {{ contentBody }}
+			    {% endblock %}
+                          </div>
 			</div>
 			<div class="bottomlinks">{% atomfeedlinkvisible %} <a href="/website/help/" title="Get help or report problems with the site">Help</a> | <a href="/website/abuse/" title="How to report absue of the web site">Report abuse</a></div>
 		</div>