app/soc/templates/soc/presence/home.html
author Lennard de Rijk <ljvderijk@gmail.com>
Thu, 04 Jun 2009 21:58:05 +0200
changeset 2384 71780864a5ed
parent 2271 6519029b444f
child 2801 0ee67cc9bd20
permissions -rw-r--r--
Now showing link to edit the home page document on the home page. This will only show up if you have the right to edit the document. Update issue 271 Now also working for home pages.

{% extends "soc/base.html" %}
{% comment %}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}

{% block scripts %}
{{ block.super }}
{% if entity.feed_url %}
  <script type="text/javascript" src="http://www.google.com/jsapi"></script>
  <script type="text/javascript" src="/soc/content/js/blog-081117.js"></script>
  <script type="text/javascript" >
  google.load("feeds", "1");

  function initialize() {
    var blog = new BlogPreview(document.getElementById("blog"));
    blog.show("{{ entity.feed_url }}", 3);
  }
  google.setOnLoadCallback(initialize);
  </script>
{% endif %}
{% endblock %}

{% block page_title %}
{% if home_document %}
{{ home_document.title }}
{% else %}
{{ page_name }}
{% endif %}
{% endblock %}

{% block header_title %}
{% if home_document %}
{{ home_document.title }} 
	{% if home_document_edit_redirect %}
		<a href={{ home_document_edit_redirect }}> (Click here to Edit Home Page)</a>
	{% endif %}
{% else %}
{{ page_name }}
{% endif %}
{% endblock %}

{% block body %}
 {% if home_document %}
  <div id="created">Last modified on {{ home_document.modified }} by {{ home_document.modified_by.name }}</div>
  {{ home_document.content|safe }}
 {% else %}
{% block missing_doc %}
This is the default home page, it can be edited via <a href="/{{ entity_type_url|lower }}/edit/{{ entity.key.id_or_name }}">Edit {{ entity_type }} Settings</a>.<br />
{% endblock %}
 {% endif %}
 {% block home_extras %}<!--To be used in inherited templates-->{% endblock %}
 {% if entity.feed_url %}
    <div id="blog"></div>
 {% endif %}
{% endblock %}