app/soc/templates/soc/presence/home.html
author Sverre Rabbelier <srabbelier@gmail.com>
Sun, 15 Feb 2009 20:27:09 +0000
changeset 1358 6be502a1bcc6
parent 1243 ccd791a899b3
child 1397 c63de68dadec
permissions -rw-r--r--
Be modular when loading the various JS modules Patch by: Sverre Rabbelier
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
     1
{% extends "soc/base.html" %}
81
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     2
{% comment %}
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     3
Licensed under the Apache License, Version 2.0 (the "License");
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     4
you may not use this file except in compliance with the License.
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     5
You may obtain a copy of the License at
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     6
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     7
  http://www.apache.org/licenses/LICENSE-2.0
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     8
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     9
Unless required by applicable law or agreed to in writing, software
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    10
distributed under the License is distributed on an "AS IS" BASIS,
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    11
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    12
See the License for the specific language governing permissions and
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    13
limitations under the License.
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    14
{% endcomment %}
b03b1ec17727 Moved soc/site/home.html to soc/site/home/public.html and updated default template for public() in home.py
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    15
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    16
{% block scripts %}
1358
6be502a1bcc6 Be modular when loading the various JS modules
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1243
diff changeset
    17
{{ block.super }}
501
be89bf307478 Fix not working feed display for home settings public view. Modify blog javascript so that we can define how many feed entries we want to display. Change default number of entries to 3 as suggested by Leslie and Chris.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 482
diff changeset
    18
{% if entity.feed_url %}
1358
6be502a1bcc6 Be modular when loading the various JS modules
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1243
diff changeset
    19
  <script type="text/javascript" src="http://www.google.com/jsapi"></script>
6be502a1bcc6 Be modular when loading the various JS modules
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1243
diff changeset
    20
  <script type="text/javascript" src="/soc/content/js/blog-081117.js"></script>
6be502a1bcc6 Be modular when loading the various JS modules
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1243
diff changeset
    21
  <script type="text/javascript" src="/soc/content/js/feed-loader.js"></script>
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    22
{% endif %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    23
{% endblock %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    24
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    25
{% block page_title %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    26
{% if home_document %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    27
{{ home_document.title }}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    28
{% else %}
482
839740b061ad Factor out direct use of the page object
Sverre Rabbelier <srabbelier@gmail.com>
parents: 446
diff changeset
    29
{{ page_name }}
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    30
{% endif %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    31
{% endblock %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    32
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    33
{% block header_title %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    34
{% if home_document %}
1243
ccd791a899b3 Use short_name for the header title in a presence's home page
Sverre Rabbelier <srabbelier@gmail.com>
parents: 922
diff changeset
    35
{{ home_document.title }}
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    36
{% else %}
482
839740b061ad Factor out direct use of the page object
Sverre Rabbelier <srabbelier@gmail.com>
parents: 446
diff changeset
    37
{{ page_name }}
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    38
{% endif %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    39
{% endblock %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    40
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    41
{% block body %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    42
 {% if home_document %}
707
26a95753cd99 Changed template for home/public.html to show last modified in the top-right corner.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 574
diff changeset
    43
  <div id="created">Last modified on {{ home_document.modified }} by {{ home_document.modified_by.name }}</div>
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    44
  {{ home_document.content|safe }}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    45
 {% else %}
445
31927f21970d Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents: 426
diff changeset
    46
{% block missing_doc %}
922
ca683f467bea Generate the 'edit settings' link dynamically
Sverre Rabbelier <srabbelier@gmail.com>
parents: 921
diff changeset
    47
This is the default home page, it can be edited via <a href="/{{ entity_type|lower }}/edit/{{ entity.key.name }}">Edit Site Settings</a>.<br />
141
e120c24b89e2 Added Melange front page edit view where you can change title, content, feed url. Created SiteSettings and Document models and some logic for them. Added isFeedURLValid function in soc/logic/feed.py. Created some functions for handling datastore updates of different kinds of Models (soc/logic/model.py). Fixed some typos and too long lines of code.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 81
diff changeset
    48
{% endblock %}
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    49
 {% endif %}
501
be89bf307478 Fix not working feed display for home settings public view. Modify blog javascript so that we can define how many feed entries we want to display. Change default number of entries to 3 as suggested by Leslie and Chris.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 482
diff changeset
    50
 {% if entity.feed_url %}
446
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    51
    <div id="blog"></div>
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    52
 {% endif %}
0b479d573a4c Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents: 445
diff changeset
    53
{% endblock %}