##// END OF EJS Templates
docs: added newline
docs: added newline

File last commit:

r4091:4e2f3dca default
r5656:629f48be default
Show More
search_commit.mako
98 lines | 4.0 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 <%namespace name="base" file="/base/base.mako"/>
search: added narrow result links for global search.
r3467 <%namespace name="search" file="/search/search.mako"/>
templating: use .mako as extensions for template files.
r1282
dan
search: add support for elastic search 6...
r3319 % if c.formatted_results:
templating: use .mako as extensions for template files.
r1282 <table class="rctable search-results">
<tr>
<th>${_('Repository')}</th>
<th>${_('Commit')}</th>
<th></th>
search: allow result sorting for elasticsearch6
r3963 <th>
dan
search: added per-backend sorting fields....
r3968 <a href="${search.field_sort('message')}">${_('Commit message')}</a>
search: allow result sorting for elasticsearch6
r3963 </th>
templating: use .mako as extensions for template files.
r1282 <th>
dan
search: added per-backend sorting fields....
r3968 <a href="${search.field_sort('date')}">${_('Commit date')}</a>
templating: use .mako as extensions for template files.
r1282 </th>
search: allow result sorting for elasticsearch6
r3963 <th>
dan
search: added per-backend sorting fields....
r3968 <a href="${search.field_sort('author_email')}">${_('Author')}</a>
search: allow result sorting for elasticsearch6
r3963 </th>
templating: use .mako as extensions for template files.
r1282 </tr>
%for entry in c.formatted_results:
## search results are additionally filtered, and this check is just a safe gate
search: show all results for super-admin, and get repo type from index it if exists.
r3376 % if c.rhodecode_user.is_admin or h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results commit check'):
templating: use .mako as extensions for template files.
r1282 <tr class="body">
<td class="td-componentname">
search: show all results for super-admin, and get repo type from index it if exists.
r3376 <% repo_type = entry.get('repo_type') or h.get_repo_type_by_name(entry.get('repository')) %>
search: added narrow result links for global search.
r3467 ${search.repo_icon(repo_type)}
repo-summary: re-implemented summary view as pyramid....
r1785 ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))}
templating: use .mako as extensions for template files.
r1282 </td>
commits: use no-wrap version of commit td in commits/summary grids.
r3903 <td class="td-hash">
templating: use .mako as extensions for template files.
r1282 ${h.link_to(h._shorten_commit_id(entry['commit_id']),
repo-commits: ported changeset code into pyramid views....
r1951 h.route_path('repo_commit',repo_name=entry['repository'],commit_id=entry['commit_id']))}
templating: use .mako as extensions for template files.
r1282 </td>
<td class="td-message expand_commit search open" data-commit-id="${h.md5_safe(entry['repository'])+entry['commit_id']}" id="t-${h.md5_safe(entry['repository'])+entry['commit_id']}" title="${_('Expand commit message')}">
commits: unified expand commit logic and UI....
r3187 <div>
icons: make expand icon same as before
r3168 <i class="icon-expand-linked"></i>&nbsp;
templating: use .mako as extensions for template files.
r1282 </div>
</td>
<td data-commit-id="${h.md5_safe(entry['repository'])+entry['commit_id']}" id="c-${h.md5_safe(entry['repository'])+entry['commit_id']}" class="message td-description open">
%if entry.get('message_hl'):
${h.literal(entry['message_hl'])}
%else:
${h.urlify_commit_message(entry['message'], entry['repository'])}
%endif
</td>
<td class="td-time">
${h.age_component(h.time_to_utcdatetime(entry['date']))}
</td>
<td class="td-user author">
dan
search: add support for elastic search 6...
r3319 <%
## es6 stores this as object
author = entry['author']
if isinstance(author, dict):
author = author['email']
%>
hovercacrds: added new tooltips and hovercards to expose certain information for objects shown in UI
r4026 ${base.gravatar_with_user(author, tooltip=True)}
templating: use .mako as extensions for template files.
r1282 </td>
</tr>
% endif
%endfor
</table>
dan
search: add support for elastic search 6...
r3319 %if c.cur_query:
templating: use .mako as extensions for template files.
r1282 <div class="pagination-wh pagination-left">
dan
webhelpers: replaced paginate library with custom lib
r4091 ${c.formatted_results.render()}
templating: use .mako as extensions for template files.
r1282 </div>
%endif
<script>
$('.expand_commit').on('click',function(e){
var target_expand = $(this);
var cid = target_expand.data('commit-id');
if (target_expand.hasClass('open')){
search: show all results for super-admin, and get repo type from index it if exists.
r3376 $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'});
$('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden'});
templating: use .mako as extensions for template files.
r1282 target_expand.removeClass('open');
}
else {
search: show all results for super-admin, and get repo type from index it if exists.
r3376 $('#c-'+cid).css({'height': 'auto', 'white-space': 'normal', 'text-overflow': 'initial', 'overflow':'visible'});
$('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible'});
templating: use .mako as extensions for template files.
r1282 target_expand.addClass('open');
}
});
dan
search: add support for elastic search 6...
r3319
$(".message.td-description").mark(
"${c.searcher.query_to_mark(c.cur_query, 'message')}",
{
"className": 'match',
"accuracy": "complementary",
"ignorePunctuation": ":._(){}[]!'+=".split("")
}
);
templating: use .mako as extensions for template files.
r1282 </script>
dan
search: add support for elastic search 6...
r3319
% endif