##// END OF EJS Templates
code garden for changeset ranges and comments...
code garden for changeset ranges and comments - disabled (for now) comments on changeset ranges - code reuse by mako namespaces - added flag for enabling comments in diffs

File last commit:

r1787:d4a7b6c8 beta
r1787:d4a7b6c8 beta
Show More
changeset.html
205 lines | 9.2 KiB | text/html | HtmlLexer
fixed some limits in changesets and changelogs
r1130 ## -*- coding: utf-8 -*-
renamed project to rhodecode
r547 <%inherit file="/base/base.html"/>
<%def name="title()">
Fixes for raw_id, needed for git...
r636 ${c.repo_name} ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name}
renamed project to rhodecode
r547 </%def>
<%def name="breadcrumbs_links()">
${h.link_to(u'Home',h.url('/'))}
&raquo;
${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
&raquo;
Fixes for raw_id, needed for git...
r636 ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
renamed project to rhodecode
r547 </%def>
<%def name="page_nav()">
${self.menu('changelog')}
</%def>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
</div>
<div class="table">
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
r977 <div class="diffblock">
renamed project to rhodecode
r547 <div class="code-header">
implements #307, configurable diffs...
r1776 <div class="date">${_('commit')} ${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} ${c.changeset.date}</div>
<div class="diff-menu-wrapper">
<img class="diff-menu-activate" style="cursor: pointer" alt="diff-menu" src="${h.url('/images/icons/script_gear.png')}" />
<div class="diff-menu" style="display:none">
<ul>
<li>${h.link_to(_('raw diff'),h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))}</li>
<li>${h.link_to(_('download diff'),h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))}</li>
<li>${c.ignorews_url()}</li>
<li>${c.context_url()}</li>
</ul>
</div>
</div>
<div class="comments-number" style="float:right;padding-right:5px">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
renamed project to rhodecode
r547 </div>
</div>
<div id="changeset_content">
<div class="container">
<div class="left">
<div class="author">
<div class="gravatar">
<img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
</div>
<span>${h.person(c.changeset.author)}</span><br/>
<span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
</div>
Fixes for raw_id, needed for git...
r636 <div class="message">${h.link_to(h.wrap_paragraphs(c.changeset.message),h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</div>
renamed project to rhodecode
r547 </div>
<div class="right">
<div class="changes">
fixed some limits in changesets and changelogs
r1130 % if len(c.changeset.affected_files) <= c.affected_files_cut_off:
renamed project to rhodecode
r547 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
<span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
<span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
fixed some limits in changesets and changelogs
r1130 % else:
<span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
<span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
<span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
% endif
renamed project to rhodecode
r547 </div>
%if len(c.changeset.parents)>1:
<div class="merge">
fixed some anchor id problems for changeset ranges
r1676 ${_('merge')}<img alt="merge" src="${h.url('/images/icons/arrow_join.png')}"/>
renamed project to rhodecode
r547 </div>
fixed initial commit missing parents div,...
r551 %endif
%if c.changeset.parents:
renamed project to rhodecode
r547 %for p_cs in reversed(c.changeset.parents):
Fixes for raw_id, needed for git...
r636 <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(h.short_id(p_cs.raw_id),
h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
renamed project to rhodecode
r547 </div>
%endfor
fixed initial commit missing parents div,...
r551 %else:
<div class="parent">${_('No parents')}</div>
%endif
renamed project to rhodecode
r547 <span class="logtags">
<span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
Fixes for raw_id, needed for git...
r636 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
renamed project to rhodecode
r547 %for tag in c.changeset.tags:
<span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
Fixes for raw_id, needed for git...
r636 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
renamed project to rhodecode
r547 %endfor
</span>
</div>
</div>
Implemented --stat for changelog
r1257 <span style="font-size:1.1em;font-weight: bold">
${_('%s files affected with %s additions and %s deletions.') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
</span>
renamed project to rhodecode
r547 <div class="cs_files">
Implemented --stat for changelog
r1257 %for change,filenode,diff,cs1,cs2,stat in c.changes:
<div class="cs_${change}">
fixed issue with new files and removed files with using inline comments
r1687 <div class="node">
%if change != 'removed':
implements #307, configurable diffs...
r1776 ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path))}
fixed issue with new files and removed files with using inline comments
r1687 %else:
implements #307, configurable diffs...
r1776 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))}
fixed issue with new files and removed files with using inline comments
r1687 %endif
</div>
Implemented --stat for changelog
r1257 <div class="changes">${h.fancy_file_stats(stat)}</div>
</div>
renamed project to rhodecode
r547 %endfor
fixed some limits in changesets and changelogs
r1130 % if c.cut_off:
Augusto Herrmann
Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
r1472 ${_('Changeset was too big and was cut off...')}
fixed some limits in changesets and changelogs
r1130 % endif
renamed project to rhodecode
r547 </div>
</div>
</div>
code garden for changeset ranges and comments...
r1787
## diff block
<%namespace name="diff_block" file="/changeset/diff_block.html"/>
${diff_block.diff_block(c.changes)}
## template for inline comment form
#77 code review...
r1670 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
code garden for changeset ranges and comments...
r1787 ${comment.comment_inline_form(c.changeset)}
#77 code review...
r1670
code garden for changeset ranges and comments...
r1787 ${comment.comments(c.changeset)}
#71 code review...
r1674 <script type="text/javascript">
var deleteComment = function(comment_id){
var url = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}".replace('__COMMENT_ID__',comment_id);
var postData = '_method=delete';
var success = function(o){
var n = YUD.get('comment-'+comment_id);
n.parentNode.removeChild(n);
}
ajaxPOST(url,postData,success);
#71 code-review...
r1677 }
YUE.onDOMReady(function(){
changed links with diff options into a pop-up menu. Saves space on long filenames and looks better
r1775
code garden for changeset ranges and comments...
r1787 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
changed links with diff options into a pop-up menu. Saves space on long filenames and looks better
r1775 var act = e.currentTarget.nextElementSibling;
if(YUD.hasClass(act,'active')){
code garden for changeset ranges and comments...
r1787 YUD.removeClass(act,'active');
YUD.setStyle(act,'display','none');
changed links with diff options into a pop-up menu. Saves space on long filenames and looks better
r1775 }else{
code garden for changeset ranges and comments...
r1787 YUD.addClass(act,'active');
YUD.setStyle(act,'display','');
changed links with diff options into a pop-up menu. Saves space on long filenames and looks better
r1775 }
});
code garden for changeset ranges and comments...
r1787
YUE.on(YUQ('.show-inline-comments'),'change',function(e){
var show = 'none';
var target = e.currentTarget;
if(target.checked){
var show = ''
}
var boxid = YUD.getAttribute(target,'id_for');
var comments = YUQ('#{0} .inline-comments'.format(boxid));
for(c in comments){
YUD.setStyle(comments[c],'display',show);
}
var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
- diff.css merge to main style.css...
r1772 for(c in btns){
YUD.setStyle(btns[c],'display',show);
code garden for changeset ranges and comments...
r1787 }
})
#71 code-review...
r1677
YUE.on(YUQ('.line'),'click',function(e){
code garden for changeset ranges and comments...
r1787 var tr = e.currentTarget;
injectInlineForm(tr);
#71 code review...
r1682 });
// inject comments into they proper positions
var file_comments = YUQ('.inline-comment-placeholder');
for (f in file_comments){
code garden for changeset ranges and comments...
r1787 var box = file_comments[f];
var inlines = box.children;
for(var i=0; i<inlines.length; i++){
try{
inline comment form is displayed now under all comments.
r1704
code garden for changeset ranges and comments...
r1787 var inline = inlines[i];
var lineno = YUD.getAttribute(inlines[i],'line');
var lineid = "{0}_{1}".format(YUD.getAttribute(inline,'target_id'),lineno);
fixed issue with new files and removed files with using inline comments
r1687 var target_line = YUD.get(lineid);
added reply comment button on top of inline comments...
r1705
var add = createInlineAddButton(target_line.parentNode,'${_("add another comment")}');
YUD.insertAfter(add,target_line.parentNode);
inline comment form is displayed now under all comments.
r1704 var comment = new YAHOO.util.Element(tableTr('inline-comments',inline.innerHTML))
YUD.insertAfter(comment,target_line.parentNode);
code garden for changeset ranges and comments...
r1787 }catch(e){
console.log(e);
}
}
#71 code review...
r1682 }
#71 code-review...
r1677 })
code garden for changeset ranges and comments...
r1787 </script>
</div>
Augusto Herrmann
Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
r1472 </%def>