## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> <%def name="title()"> ${_('Search')} %if c.repo_name: ${_('in repository: ') + c.repo_name} %else: ${_('in all repositories')} %endif :${c.cur_query} <%def name="breadcrumbs()"> ${c.rhodecode_name} <%def name="page_nav()"> ${self.menu('home')} <%def name="main()">
${_('Search')} %if c.repo_name: ${_('in repository: ') + c.repo_name} %else: ${_('in all repositories')} %endif
%if c.repo_name: ${h.form(h.url('search_repo',search_repo=c.repo_name),method='get')} %else: ${h.form(h.url('search'),method='get')} %endif
${h.text('q',c.cur_query,class_="small")}
${c.runtime}
${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