diff mbox

[Branch,~linaro-validation/lava-server/trunk] Rev 291: Fix the bread crumb generated page title.

Message ID 20111129093713.13982.56483.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Zygmunt Krynicki Nov. 29, 2011, 9:37 a.m. UTC
------------------------------------------------------------
revno: 291
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: lava-server
timestamp: Fri 2011-11-18 12:24:38 +0100
message:
  Fix the bread crumb generated page title.
  
  The new method joins all the breadcrumbs with the pipe chachacter using django
  template filter. Breadcrumbs have also been improved to render to the name of
  the crumb (so explicit looping and calling methods is no longer needed).
modified:
  lava_server/bread_crumbs.py
  lava_server/templates/layouts/base.html
  lava_server/templates/layouts/content.html


--
lp:lava-server
https://code.launchpad.net/~linaro-validation/lava-server/trunk

You are subscribed to branch lp:lava-server.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_server/bread_crumbs.py'
--- lava_server/bread_crumbs.py	2011-10-11 09:20:14 +0000
+++ lava_server/bread_crumbs.py	2011-11-18 11:24:38 +0000
@@ -135,6 +135,9 @@ 
         self.bread_crumb = bread_crumb
         self.kwargs = kwargs
 
+    def __unicode__(self):
+        return self.get_name()
+
     def get_name(self):
         return self.bread_crumb.get_name(self.kwargs)
 

=== modified file 'lava_server/templates/layouts/base.html'
--- lava_server/templates/layouts/base.html	2011-11-08 23:50:58 +0000
+++ lava_server/templates/layouts/base.html	2011-11-18 11:24:38 +0000
@@ -2,7 +2,7 @@ 
 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
   <head>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-    <title>{% block title %}LAVA{% endblock %}</title>
+    <title>{% block title %}{% endblock %}</title>
     {% block scripts_and_styles %}
     <script type="text/javascript" src="{{ STATIC_URL }}lava-server/js/jquery-1.5.1.min.js"></script> 
     <script type="text/javascript" src="{{ STATIC_URL }}lava-server/js/jquery-ui-1.8.12.custom.min.js"></script> 

=== modified file 'lava_server/templates/layouts/content.html'
--- lava_server/templates/layouts/content.html	2011-11-10 12:26:47 +0000
+++ lava_server/templates/layouts/content.html	2011-11-18 11:24:38 +0000
@@ -3,7 +3,7 @@ 
 
 
 {% block title %}
-{{ block.super }}{% for bread_crumb in bread_crumb_trail %} | {{ bread_crumb.get_name }}{% endfor %}
+{{ bread_crumb_trail|join:" | " }}
 {% endblock %}