[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 5
From: |
Sylvain Beucler |
Subject: |
[Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 5d9ff62fdbd9b689267017867704114319699ad7 |
Date: |
Sat, 24 Jul 2010 17:06:46 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Savane-cleanup framework".
The branch, master has been updated
via 5d9ff62fdbd9b689267017867704114319699ad7 (commit)
from 56849b30c1c6c3dfcd935a071e51d0296ff0c70f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/savane-cleanup/framework.git/commit/?id=5d9ff62fdbd9b689267017867704114319699ad7
commit 5d9ff62fdbd9b689267017867704114319699ad7
Author: Sylvain Beucler <address@hidden>
Date: Sat Jul 24 19:06:42 2010 +0200
Include title (and icon) as part of pagemenu
diff --git a/savane/svmain/templatetags/svpagemenu.py
b/savane/svmain/templatetags/svpagemenu.py
index 74b8c54..d859202 100644
--- a/savane/svmain/templatetags/svpagemenu.py
+++ b/savane/svmain/templatetags/svpagemenu.py
@@ -19,13 +19,20 @@
from django import template
from django.core.urlresolvers import reverse
import savane.svmain.models as svmain_models
+from django.conf import settings
register = template.Library()
@register.inclusion_tag('svmain/svpagemenu.html', takes_context=True)
def svpagemenu(context, menu_name):
+ """
+ Return info to build the top menu, including menu structure and
+ page icon.
+ """
+ icon = 'main'
+ entries = []
+
if menu_name == 'group':
- entries = []
entry_home = { 'text' : 'Home',
'href' : reverse('savane.svmain.group_detail',
args=[context['group'].name]),
'title': "Project Main Page at %s" % 'this website'}
@@ -45,15 +52,19 @@ def svpagemenu(context, menu_name):
{'text' : 2.1, 'href' : 2.1, 'title': 2.1 },
]
}
+
entries.append(entry_home)
entries.append(entry_test)
- return { 'entries' : entries,
- 'menu_name': menu_name,
- }
elif menu_name == 'my':
- return {
- 'entries':
- [
- ],
- 'menu_name': menu_name,
+ pass
+
+ context = {
+ 'title' : context['title'],
+ 'menu_name' : menu_name,
+ 'entries' : entries,
+ 'icon' : icon,
+ # STATIC_MEDIA_URL is not available in inclusion tags, because
+ # RequestContext is not used; let's work around that lack:
+ 'STATIC_MEDIA_URL' : settings.STATIC_MEDIA_URL,
}
+ return context
diff --git a/templates/base.html b/templates/base.html
index 3c886fe..bace42f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -36,9 +36,11 @@
</ul>
<div class="main"><a name="top"></a>
- <h1>{% include "title.html" %}</h1>
-
- {% block pagemenu %}{% endblock %}
+ {% block pagemenu %}
+ <h1><img
src="{{STATIC_MEDIA_URL}}savane/images/common/contexts1/main.orig.png"
+ width="48" height="48" alt="" class="pageicon" />{% include
"title.html" %}</h1>
+ <div class="topmenu" id="topmenu"></div>
+ {% endblock %}
<div class="content">
{% if messages %}
diff --git a/templates/index.html b/templates/index.html
index 44b40aa..d4072b4 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
+{% block pagemenu %}{% endblock %}
+
{% block content %}
<div class="intro">
<!-- intro -->
diff --git a/templates/svmain/svpagemenu.html b/templates/svmain/svpagemenu.html
index ab75e21..ca429dd 100644
--- a/templates/svmain/svpagemenu.html
+++ b/templates/svmain/svpagemenu.html
@@ -1,3 +1,6 @@
+<h1><img
src="{{STATIC_MEDIA_URL}}savane/images/common/contexts1/{{icon}}.orig.png"
+ width="48" height="48" alt="" class="pageicon" />{% include
"title.html" %}</h1>
+
<ul class="topmenu" id="topmenu">
{% for l1 in entries %}
<li class="topmenuitemmainitem">
-----------------------------------------------------------------------
Summary of changes:
savane/svmain/templatetags/svpagemenu.py | 29 ++++++++++++++++++++---------
templates/base.html | 8 +++++---
templates/index.html | 2 ++
templates/svmain/svpagemenu.html | 3 +++
4 files changed, 30 insertions(+), 12 deletions(-)
hooks/post-receive
--
Savane-cleanup framework
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 5d9ff62fdbd9b689267017867704114319699ad7,
Sylvain Beucler <=