app/soc/templates/soc/home/public.html
changeset 921 e499cc2641f6
parent 920 39badbfb80be
child 922 ca683f467bea
equal deleted inserted replaced
920:39badbfb80be 921:e499cc2641f6
     1 {% extends "soc/base.html" %}
       
     2 {% comment %}
       
     3 Licensed under the Apache License, Version 2.0 (the "License");
       
     4 you may not use this file except in compliance with the License.
       
     5 You may obtain a copy of the License at
       
     6 
       
     7   http://www.apache.org/licenses/LICENSE-2.0
       
     8 
       
     9 Unless required by applicable law or agreed to in writing, software
       
    10 distributed under the License is distributed on an "AS IS" BASIS,
       
    11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    12 See the License for the specific language governing permissions and
       
    13 limitations under the License.
       
    14 {% endcomment %}
       
    15 
       
    16 {% block scripts %}
       
    17 {% if entity.feed_url %}
       
    18     <script type="text/javascript" src="http://www.google.com/jsapi"></script>
       
    19     <script type="text/javascript" src="/soc/content/js/blog-081117.js"></script>
       
    20     <script type="text/javascript">
       
    21 
       
    22     google.load("feeds", "1");
       
    23 
       
    24     function initialize() {
       
    25       var blog = new BlogPreview(document.getElementById("blog"));
       
    26       blog.show("{{ entity.feed_url }}", 3);
       
    27     }
       
    28     google.setOnLoadCallback(initialize);
       
    29 
       
    30     </script>
       
    31 {% endif %}
       
    32 {% endblock %}
       
    33 
       
    34 {% block page_title %}
       
    35 {% if home_document %}
       
    36 {{ home_document.title }}
       
    37 {% else %}
       
    38 {{ page_name }}
       
    39 {% endif %}
       
    40 {% endblock %}
       
    41 
       
    42 {% block header_title %}
       
    43 {% if home_document %}
       
    44 {{ home_document.short_name }}
       
    45 {% else %}
       
    46 {{ page_name }}
       
    47 {% endif %}
       
    48 {% endblock %}
       
    49 
       
    50 {% block body %}
       
    51  {% if home_document %}
       
    52   <div id="created">Last modified on {{ home_document.modified }} by {{ home_document.modified_by.name }}</div>
       
    53   {{ home_document.content|safe }}
       
    54  {% else %}
       
    55 {% block missing_doc %}
       
    56 This is the default home page can be edited via <a href="/site/edit">Edit Site Settings</a>.<br />
       
    57 {% endblock %}
       
    58  {% endif %}
       
    59  {% if entity.feed_url %}
       
    60     <div id="blog"></div>
       
    61  {% endif %}
       
    62 {% endblock %}