app/soc/templates/soc/home/public.html
author Todd Larsen <tlarsen@google.com>
Mon, 27 Oct 2008 19:19:44 +0000
changeset 426 114fe0f840c8
parent 392 76f130cc16b0
child 445 31927f21970d
permissions -rw-r--r--
Add tooltips style display of help_text, instead of widening the form with another (often ridiculously large) column. Also, version the .css and .js files so that browsers won't display the wrong cached one when we change something. Patch by: Dmitri Gaskin, Todd Larsen Review by: Todd Larsen

{% 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 %}
{% if home_settings.feed_url %}
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript" src="/soc/content/js/blog-080819.js"></script>
    <script type="text/javascript">

    google.load("feeds", "1");

    function initialize() {
      var blog = new BlogPreview(document.getElementById("blog"));
      blog.show("{{ home_settings.feed_url }}");
    }
    google.setOnLoadCallback(initialize);

    </script>
{% endif %}
{% endblock %}

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

{% block header_title %}
{% if home_document %}
{{ home_document.short_name }}
{% else %}
{{ page.short_name }}
{% endif %}
{% endblock %}

{% block body %}
 {% if home_document %}
  {{ home_document.content|safe }}
  <div id="lastmodified">Last updated on: {{ home_document.modified }}</div>
 {% else %}
{% block missing_doc %}
This is the default home page can be edited via Settings.
{% endblock %}
 {% endif %}
 {% if home_settings.feed_url %}
    <div id="blog"></div>
 {% endif %}
{% endblock %}