• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

Revisionddd3892eda49c6d2fa4fc39c29c767f26a50f3d5 (tree)
Zeit2012-04-19 03:08:54
AutorDave Brondsema <dbrondsema@geek...>
CommiterJenny Steele

Log Message

[#4063] remove all useless className='nav_child' (from an old theme)

Ändern Zusammenfassung

Diff

--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -241,7 +241,7 @@ class Application(object):
241241 admin_url = c.project.url()+'admin/'+self.config.options.mount_point+'/'
242242 links = []
243243 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'))
245245 if force_options or len(self.config_options) > 3:
246246 links.append(SitemapEntry('Options', admin_url + 'options', className='admin_modal'))
247247 links.append(SitemapEntry('Label', admin_url + 'edit_label', className='admin_modal'))
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -112,7 +112,7 @@ class NeighborhoodController(object):
112112 SitemapEntry('')
113113 ]
114114 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
116116 ]
117117 return dict(neighborhood=self.neighborhood,
118118 title="Welcome to "+self.neighborhood.name,
@@ -393,8 +393,8 @@ def set_nav(neighborhood):
393393 else:
394394 admin_url = neighborhood.url() + '_admin/'
395395 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')]
398398
399399 class NeighborhoodAdminController(object):
400400 def __init__(self, neighborhood):
--- a/Allura/allura/controllers/root.py
+++ b/Allura/allura/controllers/root.py
@@ -90,7 +90,7 @@ class RootController(WsgiDispatchController):
9090 for n in neighborhoods ]
9191 categories = M.ProjectCategory.query.find({'parent_id':None}).sort('name').all()
9292 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
9494 ]
9595 return dict(projects=psort,title="All Projects",text=None)
9696
--- a/Allura/allura/controllers/search.py
+++ b/Allura/allura/controllers/search.py
@@ -61,14 +61,14 @@ class ProjectBrowseController(BaseController):
6161 nav.append(SitemapEntry(
6262 cat.label,
6363 self.nav_stub+cat.name,
64- className='nav_child'))
64+ ))
6565 if (self.category and self.category._id == cat._id and cat.subcategories) or (
6666 self.parent_category and self.parent_category._id == cat._id):
6767 for subcat in cat.subcategories:
6868 nav.append(SitemapEntry(
6969 subcat.label,
7070 self.nav_stub+cat.name+'/'+subcat.name,
71- className='nav_child2'))
71+ ))
7272 return nav
7373
7474 def _find_projects(self,sort='alpha', limit=None, start=0):
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -121,25 +121,25 @@ class AdminApp(Application):
121121 nbhd_admin_url = c.project.neighborhood.url()+'_admin/'
122122 links = links + [
123123 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')]
126126 else:
127127 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')
131131 ]
132132 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'))
135135 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/'))
137137 if len(c.project.neighborhood_invitations):
138138 links.append(SitemapEntry('Invitation(s)', admin_url+'invitations'))
139139 links.append(SitemapEntry('Audit Trail', admin_url+ 'audit/'))
140140 if c.project.shortname == '--init--':
141141 links.append(None)
142- links.append(SitemapEntry('Help', nbhd_admin_url+ 'help/', className='nav_child'))
142+ links.append(SitemapEntry('Help', nbhd_admin_url+ 'help/'))
143143 return links
144144
145145 def admin_menu(self):
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -71,7 +71,7 @@ class RepositoryApp(Application):
7171 links = [SitemapEntry('Viewable Files', admin_url + 'extensions', className='admin_modal')]
7272 links.append(SitemapEntry('Refresh Repository',
7373 c.project.url() + self.config.options.mount_point + '/refresh',
74- className='nav_child'))
74+ ))
7575 links += super(RepositoryApp, self).admin_menu()
7676 [links.remove(l) for l in links[:] if l.label == 'Options']
7777 return links
@@ -96,7 +96,6 @@ class RepositoryApp(Application):
9696 links += [
9797 SitemapEntry(
9898 'Merge Requests', c.app.url + 'merge-requests/',
99- className='nav_child',
10099 small=merge_request_count) ]
101100 if self.repo.upstream_repo.name:
102101 repo_path_parts = self.repo.upstream_repo.name.strip('/').split('/')
@@ -104,26 +103,23 @@ class RepositoryApp(Application):
104103 SitemapEntry('Clone of'),
105104 SitemapEntry('%s / <strong>%s</strong>' %
106105 (repo_path_parts[1], repo_path_parts[-1]),
107- self.repo.upstream_repo.name,
108- className='nav_child')
106+ self.repo.upstream_repo.name)
109107 ]
110108 if len(c.app.repo.branches) and has_access(c.app.repo, 'admin'):
111109 links.append(SitemapEntry('Request Merge', c.app.url + 'request_merge',
112110 ui_icon=g.icons['merge'],
113- className='nav_child'))
111+ ))
114112 pending_upstream_merges = self.repo.pending_upstream_merges()
115113 if pending_upstream_merges:
116114 links.append(SitemapEntry(
117115 'Pending Merges',
118116 self.repo.upstream_repo.name + 'merge-requests/',
119- className='nav_child',
120117 small=pending_upstream_merges))
121118 if self.repo.branches:
122119 links.append(SitemapEntry('Branches'))
123120 for b in self.repo.branches:
124121 links.append(SitemapEntry(
125122 b.name, url(c.app.url, dict(branch='ref/' + b.name)),
126- className='nav_child',
127123 small=b.count))
128124 if self.repo.repo_tags:
129125 links.append(SitemapEntry('Tags'))
@@ -132,14 +128,13 @@ class RepositoryApp(Application):
132128 if i < max_tags:
133129 links.append(SitemapEntry(
134130 b.name, url(c.app.url, dict(branch='ref/' + b.name)),
135- className='nav_child',
136131 small=b.count))
137132 elif i == max_tags:
138133 links.append(
139134 SitemapEntry(
140135 'More Tags',
141136 default_branch_url+'tags/',
142- className='nav_child'))
137+ ))
143138 break
144139 if self.repo.forks:
145140 links.append(SitemapEntry('Forks'))
@@ -148,7 +143,7 @@ class RepositoryApp(Application):
148143 links.append(SitemapEntry(
149144 '%s / <strong>%s</strong>' %
150145 (repo_path_parts[1], repo_path_parts[-1]),
151- f.url(), className='nav_child'))
146+ f.url()))
152147 return links
153148
154149 def install(self, project):
--- a/Allura/allura/tests/functional/test_root.py
+++ b/Allura/allura/tests/functional/test_root.py
@@ -37,7 +37,6 @@ class TestRootController(TestController):
3737 cat_links = response.html.find('div',{'id':'sidebar'}).findAll('li')
3838 assert len(cat_links) == 4
3939 assert cat_links[0].find('a').get('href') == '/browse/clustering'
40- assert cat_links[0].find('a').get('class') == 'nav_child'
4140 assert cat_links[0].find('a').find('span').string == 'Clustering'
4241
4342 def test_strange_accept_headers(self):
@@ -70,7 +69,6 @@ class TestRootController(TestController):
7069 cat_links = response.html.find('div',{'id':'sidebar'}).findAll('ul')[1].findAll('li')
7170 assert len(cat_links) == 3, cat_links
7271 assert cat_links[0].find('a').get('href') == '/adobe/browse/clustering'
73- assert cat_links[0].find('a').get('class') == 'nav_child'
7472 assert cat_links[0].find('a').find('span').string == 'Clustering'
7573
7674 def test_neighborhood_project_browse(self):
--- a/ForgeDiscussion/forgediscussion/forum_main.py
+++ b/ForgeDiscussion/forgediscussion/forum_main.py
@@ -130,7 +130,7 @@ class ForgeDiscussionApp(Application):
130130 if f.url() in request.url and h.has_access(f, 'moderate')():
131131 moderate_link = SitemapEntry('Moderate', "%smoderate/" % f.url(), ui_icon=g.icons['pencil'],
132132 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))
134134 l.append(SitemapEntry('Create Topic', c.app.url + 'create_topic', ui_icon=g.icons['plus']))
135135 if has_access(c.app, 'configure')():
136136 l.append(SitemapEntry('Add Forum', c.app.url + 'new_forum', ui_icon=g.icons['conversation']))
@@ -146,7 +146,7 @@ class ForgeDiscussionApp(Application):
146146 l.append(SitemapEntry('Forums'))
147147 l = l + forum_links
148148 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'))
150150 return l
151151 except: # pragma no cover
152152 log.exception('sidebar_menu')
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
@@ -636,7 +636,7 @@ class TestForum(TestController):
636636 assert '<a href="/p/test/discussion/create_topic"><b data-icon="+" class="ico ico-plus"></b> <span>Create Topic</span></a>' in sidebarmenu
637637 assert '<a href="/p/test/discussion/new_forum"><b data-icon="q" class="ico ico-conversation"></b> <span>Add Forum</span></a>' in sidebarmenu
638638 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
640640 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
641641 r = self.app.get('/discussion/create_topic/')
642642 f = r.html.find('form',{'action':'/p/test/discussion/save_new_topic'})
@@ -658,7 +658,7 @@ class TestForum(TestController):
658658 assert '<a href="/p/test/discussion/create_topic"><b data-icon="+" class="ico ico-plus"></b> <span>Create Topic</span></a>' in sidebarmenu
659659 assert '<a href="/p/test/discussion/new_forum"><b data-icon="q" class="ico ico-conversation"></b> <span>Add Forum</span></a>' in sidebarmenu
660660 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
662662 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
663663 r = self.app.get('/discussion/create_topic/')
664664 f = r.html.find('form',{'action':'/p/test/discussion/save_new_topic'})
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -163,9 +163,6 @@ class ForgeTrackerApp(Application):
163163 links = [SitemapEntry('Field Management', admin_url + 'fields'),
164164 SitemapEntry('Edit Searches', admin_url + 'bins/')]
165165 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'
169166 return links
170167
171168 @h.exceptionless([], log)
@@ -176,7 +173,7 @@ class ForgeTrackerApp(Application):
176173 for bin in self.bins:
177174 label = bin.shorthand_id()
178175 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'))
180177 for fld in c.app.globals.milestone_fields:
181178 milestones.append(SitemapEntry(h.text.truncate(fld.label, 72)))
182179 for m in getattr(fld, "milestones", []):
@@ -185,7 +182,6 @@ class ForgeTrackerApp(Application):
185182 SitemapEntry(
186183 h.text.truncate(m.name, 72),
187184 self.url + fld.name[1:] + '/' + h.urlquote(m.name) + '/',
188- className='nav_child',
189185 small=c.app.globals.milestone_count('%s:%s' % (fld.name, m.name))['hits']))
190186 if ticket.isdigit():
191187 ticket = TM.Ticket.query.find(dict(app_config_id=self.config._id,ticket_num=int(ticket))).first()
@@ -209,13 +205,13 @@ class ForgeTrackerApp(Application):
209205 if ticket.super_id:
210206 links.append(SitemapEntry('Supertask'))
211207 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()))
213209 if ticket.sub_ids:
214210 links.append(SitemapEntry('Subtasks'))
215211 for sub_id in ticket.sub_ids or []:
216212 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)))
219215
220216 links += milestones
221217
@@ -223,7 +219,7 @@ class ForgeTrackerApp(Application):
223219 links.append(SitemapEntry('Searches'))
224220 links = links + search_bins
225221 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'))
227223 return links
228224
229225 def sidebar_menu_js(self):
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -175,7 +175,7 @@ class ForgeWikiApp(Application):
175175 links.append(SitemapEntry('Moderate', discussion.url() + 'moderate', ui_icon=g.icons['pencil'],
176176 small = pending_mod_count))
177177 links += [SitemapEntry(''),
178- SitemapEntry('Formatting Help',c.app.url+'markdown_syntax/', className='nav_child')
178+ SitemapEntry('Formatting Help',c.app.url+'markdown_syntax/')
179179 ]
180180 return links
181181