allura
修訂 | a242e89476803a20e9cb821ad6038b205ba0eb3a (tree) |
---|---|
時間 | 2012-05-22 05:20:32 |
作者 | pill <pill.sv0@gmai...> |
Commiter | Cory Johns |
[4187]ticket:51 fix not bulletproof conditions in titlebar template + small test extention
@@ -59,13 +59,10 @@ | ||
59 | 59 | {{theme_macros.header(c.user.username, c.user._id, c.user.display_name, g.login_url, '/auth/logout')}} |
60 | 60 | {% set flash = tg.flash_obj.render('flash', use_js=False) %} |
61 | 61 | <section id="page-body" class="{{g.document_class(neighborhood)}}"> |
62 | - <div class="grid-24"> | |
63 | - {% if neighborhood and neighborhood.show_title %} | |
62 | + <div class="grid-24"> | |
64 | 63 | {% block nav_menu %} |
65 | 64 | {% include g.theme.nav_menu %} |
66 | 65 | {% endblock %} |
67 | - {% endif %} | |
68 | - | |
69 | 66 | </div> |
70 | 67 | <div id="top_nav" class=""> |
71 | 68 | {% block top_nav %} |
@@ -1,5 +1,5 @@ | ||
1 | 1 | {% import 'allura:templates/jinja_master/lib.html' as lib with context %} |
2 | -{% if not c.project %} | |
2 | +{% if not c.project or not c.project.neighborhood.show_title %} | |
3 | 3 | <div id="nav_menu_missing"></div> |
4 | 4 | {% else %} |
5 | 5 | {% if c.project.neighborhood.icon %} |
@@ -22,4 +22,4 @@ | ||
22 | 22 | {% endif %} |
23 | 23 | </h1> |
24 | 24 | </a> |
25 | -{% endif %} | |
25 | +{% endif %} | |
\ No newline at end of file |
@@ -1,4 +1,4 @@ | ||
1 | -{% if not neighborhood %} | |
1 | +{% if not neighborhood or not neighborhood.show_title %} | |
2 | 2 | <div id="nav_menu_missing"></div> |
3 | 3 | {% else %} |
4 | 4 |
@@ -78,7 +78,8 @@ class TestNeighborhood(TestController): | ||
78 | 78 | r = self.app.get('/adobe/_admin/overview', extra_environ=dict(username='root')) |
79 | 79 | # no title now |
80 | 80 | assert 'class="project_title"' not in str(r) |
81 | - | |
81 | + r = self.app.get('/adobe', extra_environ=dict(username='root')) | |
82 | + assert 'class="project_title"' not in str(r) | |
82 | 83 | |
83 | 84 | |
84 | 85 | def test_admin_stats_del_count(self): |