##// END OF EJS Templates
fix(js-routes): fixed bad urls in jsroutes
fix(js-routes): fixed bad urls in jsroutes

File last commit:

r5294:5bd3eb1a default
r5466:c025bb1a default
Show More
changeset.mako
422 lines | 18.1 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282
<%inherit file="/base/base.mako"/>
ui: new commits page....
r3882 <%namespace name="base" file="/base/base.mako"/>
templating: use .mako as extensions for template files.
r1282 <%namespace name="diff_block" file="/changeset/diff_block.mako"/>
ui: new commits page....
r3882 <%namespace name="file_base" file="/files/base.mako"/>
commits/pr pages various fixes....
r4485 <%namespace name="sidebar" file="/base/sidebar.mako"/>
templating: use .mako as extensions for template files.
r1282
<%def name="title()">
ui: new commits page....
r3882 ${_('{} Commit').format(c.repo_name)} - ${h.show_id(c.commit)}
templating: use .mako as extensions for template files.
r1282 %if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='repositories')}
</%def>
<%def name="menu_bar_subnav()">
changelog: rename changelog to commits pages
r3742 ${self.repo_menu(active='commits')}
templating: use .mako as extensions for template files.
r1282 </%def>
<%def name="main()">
ui: new commits page....
r3882 <script type="text/javascript">
templating: use .mako as extensions for template files.
r1282 templateContext.commit_data.commit_id = "${c.commit.raw_id}";
</script>
ui: new commits page....
r3882
templating: use .mako as extensions for template files.
r1282 <div class="box">
ui: new commits page....
r3882 <div class="summary">
<div class="fieldset">
<div class="left-content">
hovercacrds: added new tooltips and hovercards to expose certain information for objects shown in UI
r4026 <%
rc_user = h.discover_user(c.commit.author_email)
%>
ui: new commits page....
r3882 <div class="left-content-avatar">
fix(changeset): fixed incosistent behaviour of rendering gravatars in commit view. Fixes RCCE-25
r5255 <%
email = h.email_or_none(c.commit.author)
rc_user = h.discover_user(c.commit.author)
%>
${base.gravatar(email, 30, tooltip=(True if rc_user else False), user=rc_user)}
ui: new commits page....
r3882 </div>
<div class="left-content-message">
<div class="fieldset collapsable-content no-hide" data-toggle="summary-details">
<div class="commit truncate-wrap">${h.urlify_commit_message(h.chop_at_smart(c.commit.message, '\n', suffix_if_chopped='...'), c.repo_name)}</div>
</div>
style: optimized <code> element fonts.
r2129
ui: new commits page....
r3882 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none">
fix(changeset): fixed incosistent behaviour of rendering gravatars in commit view. Fixes RCCE-25
r5255
ui: new commits page....
r3882 <div class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div>
</div>
<div class="fieldset" data-toggle="summary-details">
<div class="">
<table>
hovercacrds: added new tooltips and hovercards to expose certain information for objects shown in UI
r4026 <tr class="file_author">
mercurial-evolve: enable evolve setting on repositories.
r1738
ui: new commits page....
r3882 <td>
hovercacrds: added new tooltips and hovercards to expose certain information for objects shown in UI
r4026 <span class="user commit-author">${h.link_to_user(rc_user or c.commit.author)}</span>
ui: new commits page....
r3882 <span class="commit-date">- ${h.age_component(c.commit.date)}</span>
</td>
mercurial-evolve: enable evolve setting on repositories.
r1738
ui: new commits page....
r3882 <td>
## second cell for consistency with files
</td>
</tr>
</table>
Liviu
Changeset view summary box changes and fixed my profile view
r3685 </div>
style: optimized <code> element fonts.
r2129 </div>
Liviu
Changeset view summary box changes and fixed my profile view
r3685
ui: new commits page....
r3882 </div>
</div>
Liviu
Changeset view summary box changes and fixed my profile view
r3685
ui: new commits page....
r3882 <div class="right-content">
<div data-toggle="summary-details">
<div class="tags tags-main">
<code><a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a></code>
<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.commit.raw_id}" title="${_('Copy the full commit id')}"></i>
${file_base.refs(c.commit)}
diffs: add button to browse files at current commit
r4839
ui: new commits page....
r3882 ## phase
% if hasattr(c.commit, 'phase') and getattr(c.commit, 'phase') != 'public':
<span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">
<i class="icon-info"></i>${c.commit.phase}
</span>
% endif
templating: use .mako as extensions for template files.
r1282
ui: new commits page....
r3882 ## obsolete commits
% if getattr(c.commit, 'obsolete', False):
<span class="tag obsolete-${c.commit.obsolete} tooltip" title="${_('Evolve State')}">
${_('obsolete')}
</span>
% endif
## hidden commits
% if getattr(c.commit, 'hidden', False):
<span class="tag hidden-${c.commit.hidden} tooltip" title="${_('Evolve State')}">
${_('hidden')}
</span>
% endif
</div>
<span id="parent_link" class="tag tagtag">
<a href="#parentCommit" title="${_('Parent Commit')}"><i class="icon-left icon-no-margin"></i>${_('parent')}</a>
</span>
<span id="child_link" class="tag tagtag">
<a href="#childCommit" title="${_('Child Commit')}">${_('child')}<i class="icon-right icon-no-margin"></i></a>
</span>
diffs: add button to browse files at current commit
r4839 <span class="tag tooltip" title="${_('Browse files at this commit')}">
<i class="icon-code"></i>
<a href="${h.route_path('repo_files', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path='')}">${_('Browse files')}</a>
</span>
commits/pr pages various fixes....
r4485
templating: use .mako as extensions for template files.
r1282 </div>
commits/pr pages various fixes....
r4485
templating: use .mako as extensions for template files.
r1282 </div>
</div>
ui: new commits page....
r3882 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
templating: use .mako as extensions for template files.
r1282 </div>
ui: new commits page....
r3882 <div class="clear-fix"></div>
<div class="btn-collapse" data-toggle="summary-details">
${_('Show More')}
templating: use .mako as extensions for template files.
r1282 </div>
ui: new commits page....
r3882 </div>
commit-page: show unresolved TODOs on commit page below comments.
r1385
templating: use .mako as extensions for template files.
r1282 <div class="cs_files">
<%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/>
diff-navigation: small improvements on text and display of navigation menu.
r4446 ${cbdiffs.render_diffset_menu(c.changes[c.commit.raw_id], commit=c.commit)}
templating: use .mako as extensions for template files.
r1282 ${cbdiffs.render_diffset(
commits/pr pages various fixes....
r4485 c.changes[c.commit.raw_id], commit=c.commit, use_comments=True,
inline_comments=c.inline_comments,
show_todos=False)}
templating: use .mako as extensions for template files.
r1282 </div>
comments: re-implemented diff and comments/todos in pull-requests.
r3884 ## template for inline comment form
<%namespace name="comment" file="/changeset/changeset_file_comment.mako"/>
## comments heading with count
ui: new commits page....
r3882 <div class="comments-heading">
<i class="icon-comment"></i>
commits/pr pages various fixes....
r4485 ${_('General Comments')} ${len(c.comments)}
ui: new commits page....
r3882 </div>
templating: use .mako as extensions for template files.
r1282 ## render comments
comments: use unified aggregation of comments counters....
r1332 ${comment.generate_comments(c.comments)}
templating: use .mako as extensions for template files.
r1282
## main comment form and it status
repo-commits: ported changeset code into pyramid views....
r1951 ${comment.comments(h.route_path('repo_commit_comment_create', repo_name=c.repo_name, commit_id=c.commit.raw_id),
templating: use .mako as extensions for template files.
r1282 h.commit_status(c.rhodecode_db_repo, c.commit.raw_id))}
</div>
commits/pr pages various fixes....
r4485 ### NAV SIDEBAR
<aside class="right-sidebar right-sidebar-expanded" id="commit-nav-sticky" style="display: none">
<div class="sidenav navbar__inner" >
## TOGGLE
<div class="sidebar-toggle" onclick="toggleSidebar(); return false">
<a href="#toggleSidebar" class="grey-link-action">
</a>
</div>
## CONTENT
<div class="sidebar-content">
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 ## RULES SUMMARY/RULES
<div class="sidebar-element clear-both">
<% vote_title = _ungettext(
'Status calculated based on votes from {} reviewer',
reviewers: added observers as another way to define reviewers....
r4500 'Status calculated based on votes from {} reviewers', c.reviewers_count).format(c.reviewers_count)
commits/pr pages various fixes....
r4485 %>
<div class="tooltip right-sidebar-collapsed-state" style="display: none" onclick="toggleSidebar(); return false" title="${vote_title}">
<i class="icon-circle review-status-${c.commit_review_status}"></i>
reviewers: added observers as another way to define reviewers....
r4500 ${c.reviewers_count}
commits/pr pages various fixes....
r4485 </div>
</div>
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 ## REVIEWERS
<div class="right-sidebar-expanded-state pr-details-title">
<span class="tooltip sidebar-heading" title="${vote_title}">
<i class="icon-circle review-status-${c.commit_review_status}"></i>
${_('Reviewers')}
</span>
</div>
<div id="reviewers" class="right-sidebar-expanded-state pr-details-content reviewers">
<table id="review_members" class="group_members">
## This content is loaded via JS and ReviewersPanel
</table>
</div>
## TODOs
<div class="sidebar-element clear-both">
<div class="tooltip right-sidebar-collapsed-state" style="display: none" onclick="toggleSidebar(); return false" title="TODOs">
<i class="icon-flag-filled"></i>
<span id="todos-count">${len(c.unresolved_comments)}</span>
</div>
<div class="right-sidebar-expanded-state pr-details-title">
## Only show unresolved, that is only what matters
<span class="sidebar-heading noselect" onclick="refreshTODOs(); return false">
<i class="icon-flag-filled"></i>
TODOs
</span>
% if c.resolved_comments:
<span class="block-right action_button last-item noselect" onclick="$('.unresolved-todo-text').toggle(); return toggleElement(this, '.resolved-todo');" data-toggle-on="Show resolved" data-toggle-off="Hide resolved">Show resolved</span>
% else:
<span class="block-right last-item noselect">Show resolved</span>
% endif
</div>
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 <div class="right-sidebar-expanded-state pr-details-content">
% if c.unresolved_comments + c.resolved_comments:
${sidebar.comments_table(c.unresolved_comments + c.resolved_comments, len(c.unresolved_comments), todo_comments=True, is_pr=False)}
% else:
<table>
<tr>
<td>
${_('No TODOs yet')}
</td>
</tr>
</table>
% endif
</div>
</div>
## COMMENTS
<div class="sidebar-element clear-both">
<div class="tooltip right-sidebar-collapsed-state" style="display: none" onclick="toggleSidebar(); return false" title="${_('Comments')}">
<i class="icon-comment" style="color: #949494"></i>
<span id="comments-count">${len(c.inline_comments_flat+c.comments)}</span>
<span class="display-none" id="general-comments-count">${len(c.comments)}</span>
<span class="display-none" id="inline-comments-count">${len(c.inline_comments_flat)}</span>
</div>
<div class="right-sidebar-expanded-state pr-details-title">
<span class="sidebar-heading noselect" onclick="refreshComments(); return false">
<i class="icon-comment" style="color: #949494"></i>
${_('Comments')}
</span>
</div>
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 <div class="right-sidebar-expanded-state pr-details-content">
% if c.inline_comments_flat + c.comments:
${sidebar.comments_table(c.inline_comments_flat + c.comments, len(c.inline_comments_flat+c.comments), is_pr=False)}
% else:
<table>
<tr>
<td>
${_('No Comments yet')}
</td>
</tr>
</table>
% endif
</div>
</div>
</div>
</div>
</aside>
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
<script type="text/javascript">
window.setReviewersData = ${c.commit_set_reviewers_data_json | n};
$(document).ready(function () {
var boxmax = parseInt($('#trimmed_message_box').css('max-height'), 10);
if ($('#trimmed_message_box').height() === boxmax) {
$('#message_expand').show();
}
$('#message_expand').on('click', function (e) {
$('#trimmed_message_box').css('max-height', 'none');
$(this).hide();
});
$('.show-inline-comments').on('click', function (e) {
var boxid = $(this).attr('data-comment-id');
var button = $(this);
if (button.hasClass("comments-visible")) {
$('#{0} .inline-comments'.format(boxid)).each(function (index) {
$(this).hide();
templating: use .mako as extensions for template files.
r1282 });
button.removeClass("comments-visible");
commits/pr pages various fixes....
r4485 } else {
$('#{0} .inline-comments'.format(boxid)).each(function (index) {
$(this).show();
templating: use .mako as extensions for template files.
r1282 });
button.addClass("comments-visible");
commits/pr pages various fixes....
r4485 }
});
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 // next links
$('#child_link').on('click', function (e) {
// fetch via ajax what is going to be the next link, if we have
// >1 links show them to user to choose
if (!$('#child_link').hasClass('disabled')) {
$.ajax({
repo-commits: ported changeset code into pyramid views....
r1951 url: '${h.route_path('repo_commit_children',repo_name=c.repo_name, commit_id=c.commit.raw_id)}',
commits/pr pages various fixes....
r4485 success: function (data) {
if (data.results.length === 0) {
$('#child_link').html("${_('No Child Commits')}").addClass('disabled');
}
if (data.results.length === 1) {
var commit = data.results[0];
window.location = pyroutes.url('repo_commit', {
'repo_name': '${c.repo_name}',
'commit_id': commit.raw_id
});
} else if (data.results.length === 2) {
$('#child_link').addClass('disabled');
$('#child_link').addClass('double');
commits: skip hidden/obsolete commits (on vcsserver) and display branch when DAG diverges on child/parent links
r3852
commits/pr pages various fixes....
r4485 var _html = '';
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a> '
.replace('__branch__', data.results[0].branch)
.replace('__rev__', 'r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0, 6)))
.replace('__title__', data.results[0].message)
.replace('__url__', pyroutes.url('repo_commit', {
'repo_name': '${c.repo_name}',
'commit_id': data.results[0].raw_id
}));
_html += ' | ';
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a> '
.replace('__branch__', data.results[1].branch)
.replace('__rev__', 'r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0, 6)))
.replace('__title__', data.results[1].message)
.replace('__url__', pyroutes.url('repo_commit', {
'repo_name': '${c.repo_name}',
'commit_id': data.results[1].raw_id
}));
$('#child_link').html(_html);
}
templating: use .mako as extensions for template files.
r1282 }
commits/pr pages various fixes....
r4485 });
e.preventDefault();
}
});
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 // prev links
$('#parent_link').on('click', function (e) {
// fetch via ajax what is going to be the next link, if we have
// >1 links show them to user to choose
if (!$('#parent_link').hasClass('disabled')) {
$.ajax({
repo-commits: ported changeset code into pyramid views....
r1951 url: '${h.route_path("repo_commit_parents",repo_name=c.repo_name, commit_id=c.commit.raw_id)}',
commits/pr pages various fixes....
r4485 success: function (data) {
if (data.results.length === 0) {
$('#parent_link').html('${_('No Parent Commits')}').addClass('disabled');
}
if (data.results.length === 1) {
var commit = data.results[0];
window.location = pyroutes.url('repo_commit', {
'repo_name': '${c.repo_name}',
'commit_id': commit.raw_id
});
} else if (data.results.length === 2) {
$('#parent_link').addClass('disabled');
$('#parent_link').addClass('double');
commits: skip hidden/obsolete commits (on vcsserver) and display branch when DAG diverges on child/parent links
r3852
commits/pr pages various fixes....
r4485 var _html = '';
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a>'
.replace('__branch__', data.results[0].branch)
.replace('__rev__', 'r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0, 6)))
.replace('__title__', data.results[0].message)
.replace('__url__', pyroutes.url('repo_commit', {
'repo_name': '${c.repo_name}',
'commit_id': data.results[0].raw_id
}));
_html += ' | ';
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a>'
.replace('__branch__', data.results[1].branch)
.replace('__rev__', 'r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0, 6)))
.replace('__title__', data.results[1].message)
.replace('__url__', pyroutes.url('repo_commit', {
'repo_name': '${c.repo_name}',
'commit_id': data.results[1].raw_id
}));
$('#parent_link').html(_html);
}
templating: use .mako as extensions for template files.
r1282 }
commits/pr pages various fixes....
r4485 });
e.preventDefault();
}
});
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 // browse tree @ revision
$('#files_link').on('click', function (e) {
window.location = '${h.route_path('repo_files:default_path',repo_name=c.repo_name, commit_id=c.commit.raw_id)}';
e.preventDefault();
});
templating: use .mako as extensions for template files.
r1282
sidebar: few fixes for panel rendering of reviewers/observers for both commits and PRS.
r4503 reviewersController = new ReviewersController();
ReviewersPanel.init(reviewersController, null, setReviewersData);
commits/pr pages various fixes....
r4485
var channel = '${c.commit_broadcast_channel}';
new ReviewerPresenceController(channel)
})
</script>
templating: use .mako as extensions for template files.
r1282
</%def>