diff --git a/rhodecode/templates/search/search.html b/rhodecode/templates/search/search.html --- a/rhodecode/templates/search/search.html +++ b/rhodecode/templates/search/search.html @@ -36,52 +36,43 @@ %endif
- -
-
- +
+
+ +
+
${h.text('q',c.cur_query,class_="small")}
+
+
-
- ${h.text('q',c.cur_query,class_="small")} -
- -
-
${c.runtime}
-
+
${c.runtime}
+ +
+
+ +
+
+ ${h.select('type',c.cur_type,[('content',_('Source codes')), + ##('commit',_('Commit messages')), + ('path',_('File names')), + ##('repository',_('Repository names')), + ])} +
+
+
${h.end_form()} - %for cnt,sr in enumerate(c.formated_results): - %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'): -
-
-
-
${h.link_to(h.literal('%s » %s' % (sr['repository'],sr['f_path'])), - h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))}
-
-
-
${h.literal(sr['content_short_hl'])}
-
-
-
- %else: - %if cnt == 0: -
-
-
${_('Permission denied')}
-
-
- %endif - - %endif - %endfor - %if c.cur_query: -
- ${c.formated_results.pager('$link_previous ~2~ $link_next')} -
- %endif + %if c.cur_search == 'content': + <%include file='search_content.html'/> + %elif c.cur_search == 'path': + <%include file='search_path.html'/> + %elif c.cur_search == 'commit': + <%include file='search_commit.html'/> + %elif c.cur_search == 'repository': + <%include file='search_repository.html'/> + %endif