##// END OF EJS Templates
ui: expose search as a visible option for repositories.
ergo -
r3440:92d2ae7e default
parent child Browse files
Show More
@@ -123,7 +123,7 b' class SearchView(BaseAppView):'
123 class SearchRepoView(RepoAppView):
123 class SearchRepoView(RepoAppView):
124 def load_default_context(self):
124 def load_default_context(self):
125 c = self._get_local_tmpl_context()
125 c = self._get_local_tmpl_context()
126
126 c.active = 'search'
127 return c
127 return c
128
128
129 @LoginRequired()
129 @LoginRequired()
@@ -231,6 +231,8 b''
231 <li class="${is_active('changelog')}"><a class="menulink" href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
231 <li class="${is_active('changelog')}"><a class="menulink" href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
232 <li class="${is_active('files')}"><a class="menulink" href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.rhodecode_db_repo.landing_rev[1], f_path='')}"><div class="menulabel">${_('Files')}</div></a></li>
232 <li class="${is_active('files')}"><a class="menulink" href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.rhodecode_db_repo.landing_rev[1], f_path='')}"><div class="menulabel">${_('Files')}</div></a></li>
233 <li class="${is_active('compare')}"><a class="menulink" href="${h.route_path('repo_compare_select',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a></li>
233 <li class="${is_active('compare')}"><a class="menulink" href="${h.route_path('repo_compare_select',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a></li>
234 <li class="${is_active('search')}"><a class="menulink" href="${h.route_path('search_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Search')}</div></a></li>
235
234 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
236 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
235 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
237 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
236 <li class="${is_active('showpullrequest')}">
238 <li class="${is_active('showpullrequest')}">
@@ -242,6 +244,7 b''
242 </a>
244 </a>
243 </li>
245 </li>
244 %endif
246 %endif
247
245 <li class="${is_active('options')}">
248 <li class="${is_active('options')}">
246 <a class="menulink dropdown">
249 <a class="menulink dropdown">
247 <div class="menulabel">${_('Options')} <div class="show_more"></div></div>
250 <div class="menulabel">${_('Options')} <div class="show_more"></div></div>
@@ -266,8 +269,6 b''
266 </li>
269 </li>
267 %endif
270 %endif
268
271
269 <li><a href="${h.route_path('search_repo',repo_name=c.repo_name)}">${_('Search')}</a></li>
270
271 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
272 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
272 %if c.rhodecode_db_repo.locked[0]:
273 %if c.rhodecode_db_repo.locked[0]:
273 <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
274 <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
@@ -31,7 +31,7 b''
31
31
32 <%def name="menu_bar_subnav()">
32 <%def name="menu_bar_subnav()">
33 %if c.repo_name:
33 %if c.repo_name:
34 ${self.repo_menu(active='options')}
34 ${self.repo_menu(active='search')}
35 %endif
35 %endif
36 </%def>
36 </%def>
37
37
General Comments 0
You need to be logged in to leave comments. Login now