allura
Revision | ddd3892eda49c6d2fa4fc39c29c767f26a50f3d5 (tree) |
---|---|
Zeit | 2012-04-19 03:08:54 |
Autor | Dave Brondsema <dbrondsema@geek...> |
Commiter | Jenny Steele |
[#4063] remove all useless className='nav_child' (from an old theme)
@@ -241,7 +241,7 @@ class Application(object): | ||
241 | 241 | admin_url = c.project.url()+'admin/'+self.config.options.mount_point+'/' |
242 | 242 | links = [] |
243 | 243 | if self.permissions and has_access(c.project, 'admin')(): |
244 | - links.append(SitemapEntry('Permissions', admin_url + 'permissions', className='nav_child')) | |
244 | + links.append(SitemapEntry('Permissions', admin_url + 'permissions')) | |
245 | 245 | if force_options or len(self.config_options) > 3: |
246 | 246 | links.append(SitemapEntry('Options', admin_url + 'options', className='admin_modal')) |
247 | 247 | links.append(SitemapEntry('Label', admin_url + 'edit_label', className='admin_modal')) |
@@ -112,7 +112,7 @@ class NeighborhoodController(object): | ||
112 | 112 | SitemapEntry('') |
113 | 113 | ] |
114 | 114 | c.custom_sidebar_menu = c.custom_sidebar_menu + [ |
115 | - SitemapEntry(cat.label, self.neighborhood.url()+'browse/'+cat.name, className='nav_child') for cat in categories | |
115 | + SitemapEntry(cat.label, self.neighborhood.url()+'browse/'+cat.name) for cat in categories | |
116 | 116 | ] |
117 | 117 | return dict(neighborhood=self.neighborhood, |
118 | 118 | title="Welcome to "+self.neighborhood.name, |
@@ -393,8 +393,8 @@ def set_nav(neighborhood): | ||
393 | 393 | else: |
394 | 394 | admin_url = neighborhood.url() + '_admin/' |
395 | 395 | c.custom_sidebar_menu = [ |
396 | - SitemapEntry('Overview', admin_url + 'overview', className='nav_child'), | |
397 | - SitemapEntry('Awards', admin_url + 'accolades', className='nav_child')] | |
396 | + SitemapEntry('Overview', admin_url + 'overview'), | |
397 | + SitemapEntry('Awards', admin_url + 'accolades')] | |
398 | 398 | |
399 | 399 | class NeighborhoodAdminController(object): |
400 | 400 | def __init__(self, neighborhood): |
@@ -90,7 +90,7 @@ class RootController(WsgiDispatchController): | ||
90 | 90 | for n in neighborhoods ] |
91 | 91 | categories = M.ProjectCategory.query.find({'parent_id':None}).sort('name').all() |
92 | 92 | c.custom_sidebar_menu = [ |
93 | - SitemapEntry(cat.label, '/browse/'+cat.name, className='nav_child') for cat in categories | |
93 | + SitemapEntry(cat.label, '/browse/'+cat.name) for cat in categories | |
94 | 94 | ] |
95 | 95 | return dict(projects=psort,title="All Projects",text=None) |
96 | 96 |
@@ -61,14 +61,14 @@ class ProjectBrowseController(BaseController): | ||
61 | 61 | nav.append(SitemapEntry( |
62 | 62 | cat.label, |
63 | 63 | self.nav_stub+cat.name, |
64 | - className='nav_child')) | |
64 | + )) | |
65 | 65 | if (self.category and self.category._id == cat._id and cat.subcategories) or ( |
66 | 66 | self.parent_category and self.parent_category._id == cat._id): |
67 | 67 | for subcat in cat.subcategories: |
68 | 68 | nav.append(SitemapEntry( |
69 | 69 | subcat.label, |
70 | 70 | self.nav_stub+cat.name+'/'+subcat.name, |
71 | - className='nav_child2')) | |
71 | + )) | |
72 | 72 | return nav |
73 | 73 | |
74 | 74 | def _find_projects(self,sort='alpha', limit=None, start=0): |
@@ -121,25 +121,25 @@ class AdminApp(Application): | ||
121 | 121 | nbhd_admin_url = c.project.neighborhood.url()+'_admin/' |
122 | 122 | links = links + [ |
123 | 123 | SitemapEntry('Neighborhood'), |
124 | - SitemapEntry('Overview', nbhd_admin_url+'overview', className='nav_child'), | |
125 | - SitemapEntry('Awards', nbhd_admin_url+'accolades', className='nav_child')] | |
124 | + SitemapEntry('Overview', nbhd_admin_url+'overview'), | |
125 | + SitemapEntry('Awards', nbhd_admin_url+'accolades')] | |
126 | 126 | else: |
127 | 127 | links += [ |
128 | - SitemapEntry('Metadata', admin_url+'overview', className='nav_child'), | |
129 | - SitemapEntry('Screenshots', admin_url+'screenshots', className='nav_child'), | |
130 | - SitemapEntry('Categorization', admin_url+'trove', className='nav_child') | |
128 | + SitemapEntry('Metadata', admin_url+'overview'), | |
129 | + SitemapEntry('Screenshots', admin_url+'screenshots'), | |
130 | + SitemapEntry('Categorization', admin_url+'trove') | |
131 | 131 | ] |
132 | 132 | if has_access(c.project, 'admin')(): |
133 | - links.append(SitemapEntry('Permissions', admin_url+'permissions/', className='nav_child')) | |
134 | - links.append(SitemapEntry('Tools', admin_url+'tools', className='nav_child')) | |
133 | + links.append(SitemapEntry('Permissions', admin_url+'permissions/')) | |
134 | + links.append(SitemapEntry('Tools', admin_url+'tools')) | |
135 | 135 | if c.project.is_root and has_access(c.project, 'admin')(): |
136 | - links.append(SitemapEntry('Usergroups', admin_url+'groups/', className='nav_child')) | |
136 | + links.append(SitemapEntry('Usergroups', admin_url+'groups/')) | |
137 | 137 | if len(c.project.neighborhood_invitations): |
138 | 138 | links.append(SitemapEntry('Invitation(s)', admin_url+'invitations')) |
139 | 139 | links.append(SitemapEntry('Audit Trail', admin_url+ 'audit/')) |
140 | 140 | if c.project.shortname == '--init--': |
141 | 141 | links.append(None) |
142 | - links.append(SitemapEntry('Help', nbhd_admin_url+ 'help/', className='nav_child')) | |
142 | + links.append(SitemapEntry('Help', nbhd_admin_url+ 'help/')) | |
143 | 143 | return links |
144 | 144 | |
145 | 145 | def admin_menu(self): |
@@ -71,7 +71,7 @@ class RepositoryApp(Application): | ||
71 | 71 | links = [SitemapEntry('Viewable Files', admin_url + 'extensions', className='admin_modal')] |
72 | 72 | links.append(SitemapEntry('Refresh Repository', |
73 | 73 | c.project.url() + self.config.options.mount_point + '/refresh', |
74 | - className='nav_child')) | |
74 | + )) | |
75 | 75 | links += super(RepositoryApp, self).admin_menu() |
76 | 76 | [links.remove(l) for l in links[:] if l.label == 'Options'] |
77 | 77 | return links |
@@ -96,7 +96,6 @@ class RepositoryApp(Application): | ||
96 | 96 | links += [ |
97 | 97 | SitemapEntry( |
98 | 98 | 'Merge Requests', c.app.url + 'merge-requests/', |
99 | - className='nav_child', | |
100 | 99 | small=merge_request_count) ] |
101 | 100 | if self.repo.upstream_repo.name: |
102 | 101 | repo_path_parts = self.repo.upstream_repo.name.strip('/').split('/') |
@@ -104,26 +103,23 @@ class RepositoryApp(Application): | ||
104 | 103 | SitemapEntry('Clone of'), |
105 | 104 | SitemapEntry('%s / <strong>%s</strong>' % |
106 | 105 | (repo_path_parts[1], repo_path_parts[-1]), |
107 | - self.repo.upstream_repo.name, | |
108 | - className='nav_child') | |
106 | + self.repo.upstream_repo.name) | |
109 | 107 | ] |
110 | 108 | if len(c.app.repo.branches) and has_access(c.app.repo, 'admin'): |
111 | 109 | links.append(SitemapEntry('Request Merge', c.app.url + 'request_merge', |
112 | 110 | ui_icon=g.icons['merge'], |
113 | - className='nav_child')) | |
111 | + )) | |
114 | 112 | pending_upstream_merges = self.repo.pending_upstream_merges() |
115 | 113 | if pending_upstream_merges: |
116 | 114 | links.append(SitemapEntry( |
117 | 115 | 'Pending Merges', |
118 | 116 | self.repo.upstream_repo.name + 'merge-requests/', |
119 | - className='nav_child', | |
120 | 117 | small=pending_upstream_merges)) |
121 | 118 | if self.repo.branches: |
122 | 119 | links.append(SitemapEntry('Branches')) |
123 | 120 | for b in self.repo.branches: |
124 | 121 | links.append(SitemapEntry( |
125 | 122 | b.name, url(c.app.url, dict(branch='ref/' + b.name)), |
126 | - className='nav_child', | |
127 | 123 | small=b.count)) |
128 | 124 | if self.repo.repo_tags: |
129 | 125 | links.append(SitemapEntry('Tags')) |
@@ -132,14 +128,13 @@ class RepositoryApp(Application): | ||
132 | 128 | if i < max_tags: |
133 | 129 | links.append(SitemapEntry( |
134 | 130 | b.name, url(c.app.url, dict(branch='ref/' + b.name)), |
135 | - className='nav_child', | |
136 | 131 | small=b.count)) |
137 | 132 | elif i == max_tags: |
138 | 133 | links.append( |
139 | 134 | SitemapEntry( |
140 | 135 | 'More Tags', |
141 | 136 | default_branch_url+'tags/', |
142 | - className='nav_child')) | |
137 | + )) | |
143 | 138 | break |
144 | 139 | if self.repo.forks: |
145 | 140 | links.append(SitemapEntry('Forks')) |
@@ -148,7 +143,7 @@ class RepositoryApp(Application): | ||
148 | 143 | links.append(SitemapEntry( |
149 | 144 | '%s / <strong>%s</strong>' % |
150 | 145 | (repo_path_parts[1], repo_path_parts[-1]), |
151 | - f.url(), className='nav_child')) | |
146 | + f.url())) | |
152 | 147 | return links |
153 | 148 | |
154 | 149 | def install(self, project): |
@@ -37,7 +37,6 @@ class TestRootController(TestController): | ||
37 | 37 | cat_links = response.html.find('div',{'id':'sidebar'}).findAll('li') |
38 | 38 | assert len(cat_links) == 4 |
39 | 39 | assert cat_links[0].find('a').get('href') == '/browse/clustering' |
40 | - assert cat_links[0].find('a').get('class') == 'nav_child' | |
41 | 40 | assert cat_links[0].find('a').find('span').string == 'Clustering' |
42 | 41 | |
43 | 42 | def test_strange_accept_headers(self): |
@@ -70,7 +69,6 @@ class TestRootController(TestController): | ||
70 | 69 | cat_links = response.html.find('div',{'id':'sidebar'}).findAll('ul')[1].findAll('li') |
71 | 70 | assert len(cat_links) == 3, cat_links |
72 | 71 | assert cat_links[0].find('a').get('href') == '/adobe/browse/clustering' |
73 | - assert cat_links[0].find('a').get('class') == 'nav_child' | |
74 | 72 | assert cat_links[0].find('a').find('span').string == 'Clustering' |
75 | 73 | |
76 | 74 | def test_neighborhood_project_browse(self): |
@@ -130,7 +130,7 @@ class ForgeDiscussionApp(Application): | ||
130 | 130 | if f.url() in request.url and h.has_access(f, 'moderate')(): |
131 | 131 | moderate_link = SitemapEntry('Moderate', "%smoderate/" % f.url(), ui_icon=g.icons['pencil'], |
132 | 132 | small = DM.ForumPost.query.find({'discussion_id':f._id, 'status':{'$ne': 'ok'}}).count()) |
133 | - forum_links.append(SitemapEntry(f.name, f.url(), className='nav_child', small=f.num_topics)) | |
133 | + forum_links.append(SitemapEntry(f.name, f.url(), small=f.num_topics)) | |
134 | 134 | l.append(SitemapEntry('Create Topic', c.app.url + 'create_topic', ui_icon=g.icons['plus'])) |
135 | 135 | if has_access(c.app, 'configure')(): |
136 | 136 | l.append(SitemapEntry('Add Forum', c.app.url + 'new_forum', ui_icon=g.icons['conversation'])) |
@@ -146,7 +146,7 @@ class ForgeDiscussionApp(Application): | ||
146 | 146 | l.append(SitemapEntry('Forums')) |
147 | 147 | l = l + forum_links |
148 | 148 | l.append(SitemapEntry('Help')) |
149 | - l.append(SitemapEntry('Formatting Help', c.app.url + 'markdown_syntax', className='nav_child')) | |
149 | + l.append(SitemapEntry('Formatting Help', c.app.url + 'markdown_syntax')) | |
150 | 150 | return l |
151 | 151 | except: # pragma no cover |
152 | 152 | log.exception('sidebar_menu') |
@@ -636,7 +636,7 @@ class TestForum(TestController): | ||
636 | 636 | assert '<a href="/p/test/discussion/create_topic"><b data-icon="+" class="ico ico-plus"></b> <span>Create Topic</span></a>' in sidebarmenu |
637 | 637 | assert '<a href="/p/test/discussion/new_forum"><b data-icon="q" class="ico ico-conversation"></b> <span>Add Forum</span></a>' in sidebarmenu |
638 | 638 | assert '<h3 class="">Help</h3>' in sidebarmenu |
639 | - assert '<a href="/p/test/discussion/markdown_syntax" class="nav_child"><span>Formatting Help</span></a>' in sidebarmenu | |
639 | + assert '<a href="/p/test/discussion/markdown_syntax"><span>Formatting Help</span></a>' in sidebarmenu | |
640 | 640 | assert '<a href="flag_as_spam" class="sidebar_thread_spam"><b data-icon="^" class="ico ico-flag"></b> <span>Mark as Spam</span></a>' not in sidebarmenu |
641 | 641 | r = self.app.get('/discussion/create_topic/') |
642 | 642 | f = r.html.find('form',{'action':'/p/test/discussion/save_new_topic'}) |
@@ -658,7 +658,7 @@ class TestForum(TestController): | ||
658 | 658 | assert '<a href="/p/test/discussion/create_topic"><b data-icon="+" class="ico ico-plus"></b> <span>Create Topic</span></a>' in sidebarmenu |
659 | 659 | assert '<a href="/p/test/discussion/new_forum"><b data-icon="q" class="ico ico-conversation"></b> <span>Add Forum</span></a>' in sidebarmenu |
660 | 660 | assert '<h3 class="">Help</h3>' in sidebarmenu |
661 | - assert '<a href="/p/test/discussion/markdown_syntax" class="nav_child"><span>Formatting Help</span></a>' in sidebarmenu | |
661 | + assert '<a href="/p/test/discussion/markdown_syntax"><span>Formatting Help</span></a>' in sidebarmenu | |
662 | 662 | assert '<a href="flag_as_spam" class="sidebar_thread_spam"><b data-icon="^" class="ico ico-flag"></b> <span>Mark as Spam</span></a>' not in sidebarmenu |
663 | 663 | r = self.app.get('/discussion/create_topic/') |
664 | 664 | f = r.html.find('form',{'action':'/p/test/discussion/save_new_topic'}) |
@@ -163,9 +163,6 @@ class ForgeTrackerApp(Application): | ||
163 | 163 | links = [SitemapEntry('Field Management', admin_url + 'fields'), |
164 | 164 | SitemapEntry('Edit Searches', admin_url + 'bins/')] |
165 | 165 | links += super(ForgeTrackerApp, self).admin_menu() |
166 | - # make the options link non-modal | |
167 | - options_link = [l for l in links if l.label == 'Options'][0] | |
168 | - options_link.className = 'nav_child' | |
169 | 166 | return links |
170 | 167 | |
171 | 168 | @h.exceptionless([], log) |
@@ -176,7 +173,7 @@ class ForgeTrackerApp(Application): | ||
176 | 173 | for bin in self.bins: |
177 | 174 | label = bin.shorthand_id() |
178 | 175 | search_bins.append(SitemapEntry( |
179 | - h.text.truncate(label, 72), bin.url(), className='nav_child search_bin')) | |
176 | + h.text.truncate(label, 72), bin.url(), className='search_bin')) | |
180 | 177 | for fld in c.app.globals.milestone_fields: |
181 | 178 | milestones.append(SitemapEntry(h.text.truncate(fld.label, 72))) |
182 | 179 | for m in getattr(fld, "milestones", []): |
@@ -185,7 +182,6 @@ class ForgeTrackerApp(Application): | ||
185 | 182 | SitemapEntry( |
186 | 183 | h.text.truncate(m.name, 72), |
187 | 184 | self.url + fld.name[1:] + '/' + h.urlquote(m.name) + '/', |
188 | - className='nav_child', | |
189 | 185 | small=c.app.globals.milestone_count('%s:%s' % (fld.name, m.name))['hits'])) |
190 | 186 | if ticket.isdigit(): |
191 | 187 | ticket = TM.Ticket.query.find(dict(app_config_id=self.config._id,ticket_num=int(ticket))).first() |
@@ -209,13 +205,13 @@ class ForgeTrackerApp(Application): | ||
209 | 205 | if ticket.super_id: |
210 | 206 | links.append(SitemapEntry('Supertask')) |
211 | 207 | super = TM.Ticket.query.get(_id=ticket.super_id, app_config_id=c.app.config._id) |
212 | - links.append(SitemapEntry('[#{0}]'.format(super.ticket_num), super.url(), className='nav_child')) | |
208 | + links.append(SitemapEntry('[#{0}]'.format(super.ticket_num), super.url())) | |
213 | 209 | if ticket.sub_ids: |
214 | 210 | links.append(SitemapEntry('Subtasks')) |
215 | 211 | for sub_id in ticket.sub_ids or []: |
216 | 212 | sub = TM.Ticket.query.get(_id=sub_id, app_config_id=c.app.config._id) |
217 | - links.append(SitemapEntry('[#{0}]'.format(sub.ticket_num), sub.url(), className='nav_child')) | |
218 | - #links.append(SitemapEntry('Create New Subtask', '{0}new/?super_id={1}'.format(self.config.url(), ticket._id), className='nav_child')) | |
213 | + links.append(SitemapEntry('[#{0}]'.format(sub.ticket_num), sub.url())) | |
214 | + #links.append(SitemapEntry('Create New Subtask', '{0}new/?super_id={1}'.format(self.config.url(), ticket._id))) | |
219 | 215 | |
220 | 216 | links += milestones |
221 | 217 |
@@ -223,7 +219,7 @@ class ForgeTrackerApp(Application): | ||
223 | 219 | links.append(SitemapEntry('Searches')) |
224 | 220 | links = links + search_bins |
225 | 221 | links.append(SitemapEntry('Help')) |
226 | - links.append(SitemapEntry('Formatting Help', self.config.url() + 'markdown_syntax', className='nav_child')) | |
222 | + links.append(SitemapEntry('Formatting Help', self.config.url() + 'markdown_syntax')) | |
227 | 223 | return links |
228 | 224 | |
229 | 225 | def sidebar_menu_js(self): |
@@ -175,7 +175,7 @@ class ForgeWikiApp(Application): | ||
175 | 175 | links.append(SitemapEntry('Moderate', discussion.url() + 'moderate', ui_icon=g.icons['pencil'], |
176 | 176 | small = pending_mod_count)) |
177 | 177 | links += [SitemapEntry(''), |
178 | - SitemapEntry('Formatting Help',c.app.url+'markdown_syntax/', className='nav_child') | |
178 | + SitemapEntry('Formatting Help',c.app.url+'markdown_syntax/') | |
179 | 179 | ] |
180 | 180 | return links |
181 | 181 |