Make it possible to use base.html to display simple messages
authorSverre Rabbelier <srabbelier@gmail.com>
Sun, 01 Mar 2009 20:00:23 +0000
changeset 1580 947a0ee153a4
parent 1579 a06d60fcb23d
child 1581 4484186d7427
Make it possible to use base.html to display simple messages Patch by: Sverre Rabbelier
app/soc/templates/soc/base.html
app/soc/templates/soc/error.html
--- a/app/soc/templates/soc/base.html	Sun Mar 01 18:57:08 2009 +0000
+++ b/app/soc/templates/soc/base.html	Sun Mar 01 20:00:23 2009 +0000
@@ -206,11 +206,15 @@
   </div>
 
   <div id="body">
-	
+
    <div style="line-height: 140%;">
-	{% block body %}
+  {% block body %}
+  {% if body_content %}
+  {{ body_content }}
+  {% else %}
   &lt;Missing Page Body&gt;
-	{% endblock %}
+  {% endif %}
+  {% endblock %}
    </div>
    <div id="footer" dir="ltr">
     <div class="text">
--- a/app/soc/templates/soc/error.html	Sun Mar 01 18:57:08 2009 +0000
+++ b/app/soc/templates/soc/error.html	Sun Mar 01 20:00:23 2009 +0000
@@ -12,6 +12,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 {% endcomment %}
+
 {% block page_title %}
  {%if title %}
   {{ title }}
@@ -19,6 +20,7 @@
   Error{% if status %} {{ status }}{% endif %}
  {% endif %}
 {% endblock %}
+
 {% block header_title %}
  {%if header %}
   {{ header }}
@@ -33,6 +35,7 @@
   {% endif %}
  {% endif %}
 {% endblock %}
+
 {% block body %}
 <div class="error">
 {%if status %}Error {{ status }}: {% endif %}{{ message|safe }}