author | Lennard de Rijk <ljvderijk@gmail.com> |
Mon, 23 Feb 2009 16:44:47 +0000 | |
changeset 1473 | e82bf1e4bf36 |
parent 1397 | c63de68dadec |
child 1500 | a495ae7efc70 |
permissions | -rw-r--r-- |
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> |
1397
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
21 |
<script type="text/javascript" > |
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
22 |
google.load("feeds", "1"); |
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
23 |
|
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
24 |
function initialize() { |
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
25 |
var blog = new BlogPreview(document.getElementById("blog")); |
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
26 |
blog.show("{{ entity.feed_url }}", 3); |
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
27 |
} |
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
28 |
google.setOnLoadCallback(initialize); |
c63de68dadec
Fixed blog on home view
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
29 |
</script> |
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 page_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 %} |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
35 |
{{ home_document.title }} |
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 header_title %} |
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 %} |
1243
ccd791a899b3
Use short_name for the header title in a presence's home page
Sverre Rabbelier <srabbelier@gmail.com>
parents:
922
diff
changeset
|
43 |
{{ 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
|
44 |
{% else %} |
482
839740b061ad
Factor out direct use of the page object
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
45 |
{{ page_name }} |
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
46 |
{% endif %} |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
47 |
{% endblock %} |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
48 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
49 |
{% block body %} |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
50 |
{% 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
|
51 |
<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
|
52 |
{{ 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
|
53 |
{% else %} |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
426
diff
changeset
|
54 |
{% block missing_doc %} |
1473
e82bf1e4bf36
Changed the message displayed when no homepage is set to show the correct settings name.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1397
diff
changeset
|
55 |
This is the default home page, it can be edited via <a href="/{{ entity_type|lower }}/edit/{{ entity.key.name }}">Edit {{ entity_type }} 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
|
56 |
{% endblock %} |
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
57 |
{% 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
|
58 |
{% 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
|
59 |
<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
|
60 |
{% endif %} |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
61 |
{% endblock %} |