allura
Revision | c56e599a1a1fd3ad079d0634ef3f1fde9bf4deda (tree) |
---|---|
Zeit | 2012-06-27 03:58:36 |
Autor | Dave Brondsema <dbrondsema@geek...> |
Commiter | Dave Brondsema |
[#4208] rename has_home_tool method
@@ -53,7 +53,7 @@ class UpdateNeighborhoodCommand(base.Command): | ||
53 | 53 | else: |
54 | 54 | home_tool_active = False |
55 | 55 | |
56 | - if home_tool_active == nb.has_home_project: | |
56 | + if home_tool_active == nb.has_home_tool: | |
57 | 57 | return |
58 | 58 | |
59 | 59 | p = nb.neighborhood_project |
@@ -91,7 +91,7 @@ class NeighborhoodController(object): | ||
91 | 91 | c.project = self.neighborhood.neighborhood_project |
92 | 92 | if self.neighborhood.redirect: |
93 | 93 | redirect(self.neighborhood.redirect) |
94 | - if not self.neighborhood.has_home_project: | |
94 | + if not self.neighborhood.has_home_tool: | |
95 | 95 | mount = c.project.first_mount() |
96 | 96 | if mount is not None: |
97 | 97 | if 'ac' in mount: |
@@ -109,7 +109,7 @@ class Neighborhood(MappedClass): | ||
109 | 109 | return "" |
110 | 110 | |
111 | 111 | @property |
112 | - def has_home_project(self): | |
112 | + def has_home_tool(self): | |
113 | 113 | return self.neighborhood_project.app_config('home') is not None |
114 | 114 | |
115 | 115 | @property |
@@ -5,7 +5,7 @@ | ||
5 | 5 | <div class="grid-14">{{widget.display_field(widget.fields.name)}}</div> |
6 | 6 | <label class="grid-4">Redirect</label> |
7 | 7 | <div class="grid-14">{{widget.display_field(widget.fields.redirect)}}</div> |
8 | - {% if value.has_home_project %} | |
8 | + {% if value.has_home_tool %} | |
9 | 9 | <label class="grid-4">Home Content (HTML)</label> |
10 | 10 | <div class="grid-14">{{widget.display_field(widget.fields.homepage)}}</div> |
11 | 11 | <label class="grid-4">Allow Browsing</label> |
@@ -123,10 +123,10 @@ def test_update_neighborhood(): | ||
123 | 123 | cmd.run([test_config, 'Projects', 'True']) |
124 | 124 | cmd.command() |
125 | 125 | nb = M.Neighborhood.query.get(name='Projects') |
126 | - assert nb.has_home_project == True | |
126 | + assert nb.has_home_tool == True | |
127 | 127 | |
128 | 128 | cmd = create_neighborhood.UpdateNeighborhoodCommand('update-neighborhood') |
129 | 129 | cmd.run([test_config, 'Projects', 'False']) |
130 | 130 | cmd.command() |
131 | 131 | nb = M.Neighborhood.query.get(name='Projects') |
132 | - assert nb.has_home_project == False | |
132 | + assert nb.has_home_tool == False |