##// END OF EJS Templates
Fixed empty git commit message issue...
marcink -
r2231:2cfaf199 beta
parent child Browse files
Show More
@@ -1,161 +1,164 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 <%inherit file="/base/base.html"/>
3 <%inherit file="/base/base.html"/>
4
4
5 <%def name="title()">
5 <%def name="title()">
6 ${c.repo_name} ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name}
6 ${c.repo_name} ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name}
7 </%def>
7 </%def>
8
8
9 <%def name="breadcrumbs_links()">
9 <%def name="breadcrumbs_links()">
10 ${h.link_to(u'Home',h.url('/'))}
10 ${h.link_to(u'Home',h.url('/'))}
11 &raquo;
11 &raquo;
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
13 &raquo;
13 &raquo;
14 ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span>
14 ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span>
15 </%def>
15 </%def>
16
16
17 <%def name="page_nav()">
17 <%def name="page_nav()">
18 ${self.menu('changelog')}
18 ${self.menu('changelog')}
19 </%def>
19 </%def>
20
20
21 <%def name="main()">
21 <%def name="main()">
22 <div class="box">
22 <div class="box">
23 <!-- box / title -->
23 <!-- box / title -->
24 <div class="title">
24 <div class="title">
25 ${self.breadcrumbs()}
25 ${self.breadcrumbs()}
26 </div>
26 </div>
27 <div class="table">
27 <div class="table">
28 <div class="diffblock">
28 <div class="diffblock">
29 <div class="code-header">
29 <div class="code-header">
30 <div class="hash">
30 <div class="hash">
31 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
31 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
32 </div>
32 </div>
33 <div class="date">
33 <div class="date">
34 ${c.changeset.date}
34 ${c.changeset.date}
35 </div>
35 </div>
36 <div class="diff-actions">
36 <div class="diff-actions">
37 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
37 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
38 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" title="${_('download diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></a>
38 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" title="${_('download diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></a>
39 ${c.ignorews_url(request.GET)}
39 ${c.ignorews_url(request.GET)}
40 ${c.context_url(request.GET)}
40 ${c.context_url(request.GET)}
41 </div>
41 </div>
42 <div class="comments-number" style="float:right;padding-right:5px">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
42 <div class="comments-number" style="float:right;padding-right:5px">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
43 </div>
43 </div>
44 </div>
44 </div>
45 <div id="changeset_content">
45 <div id="changeset_content">
46 <div class="container">
46 <div class="container">
47 <div class="left">
47 <div class="left">
48 <div class="author">
48 <div class="author">
49 <div class="gravatar">
49 <div class="gravatar">
50 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
50 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
51 </div>
51 </div>
52 <span>${h.person(c.changeset.author)}</span><br/>
52 <span>${h.person(c.changeset.author)}</span><br/>
53 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
53 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
54 </div>
54 </div>
55 <div class="message">${h.urlify_commit(h.wrap_paragraphs(c.changeset.message),c.repo_name)}</div>
55 <div class="message">${h.urlify_commit(h.wrap_paragraphs(c.changeset.message),c.repo_name)}</div>
56 </div>
56 </div>
57 <div class="right">
57 <div class="right">
58 <div class="changes">
58 <div class="changes">
59 % if len(c.changeset.affected_files) <= c.affected_files_cut_off:
59 % if len(c.changeset.affected_files) <= c.affected_files_cut_off:
60 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
60 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
61 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
61 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
62 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
62 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
63 % else:
63 % else:
64 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
64 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
65 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
65 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
66 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
66 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
67 % endif
67 % endif
68 </div>
68 </div>
69
69
70 %if c.changeset.parents:
70 %if c.changeset.parents:
71 %for p_cs in reversed(c.changeset.parents):
71 %for p_cs in reversed(c.changeset.parents):
72 <div class="parent">${_('Parent')}
72 <div class="parent">${_('Parent')}
73 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
73 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
74 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
74 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
75 </div>
75 </div>
76 %endfor
76 %endfor
77 %else:
77 %else:
78 <div class="parent">${_('No parents')}</div>
78 <div class="parent">${_('No parents')}</div>
79 %endif
79 %endif
80 <span class="logtags">
80 <span class="logtags">
81 %if len(c.changeset.parents)>1:
81 %if len(c.changeset.parents)>1:
82 <span class="merge">${_('merge')}</span>
82 <span class="merge">${_('merge')}</span>
83 %endif
83 %endif
84 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
84 %if c.changeset.branch:
85 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
85 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
86 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
87 </span>
88 %endif
86 %for tag in c.changeset.tags:
89 %for tag in c.changeset.tags:
87 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
90 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
88 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
91 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
89 %endfor
92 %endfor
90 </span>
93 </span>
91 </div>
94 </div>
92 </div>
95 </div>
93 <span>
96 <span>
94 ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
97 ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
95 </span>
98 </span>
96 <div class="cs_files">
99 <div class="cs_files">
97 %for change,filenode,diff,cs1,cs2,stat in c.changes:
100 %for change,filenode,diff,cs1,cs2,stat in c.changes:
98 <div class="cs_${change}">
101 <div class="cs_${change}">
99 <div class="node">
102 <div class="node">
100 %if change != 'removed':
103 %if change != 'removed':
101 ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path,request.GET)+"_target")}
104 ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path,request.GET)+"_target")}
102 %else:
105 %else:
103 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))}
106 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))}
104 %endif
107 %endif
105 </div>
108 </div>
106 <div class="changes">${h.fancy_file_stats(stat)}</div>
109 <div class="changes">${h.fancy_file_stats(stat)}</div>
107 </div>
110 </div>
108 %endfor
111 %endfor
109 % if c.cut_off:
112 % if c.cut_off:
110 ${_('Changeset was too big and was cut off...')}
113 ${_('Changeset was too big and was cut off...')}
111 % endif
114 % endif
112 </div>
115 </div>
113 </div>
116 </div>
114
117
115 </div>
118 </div>
116
119
117 ## diff block
120 ## diff block
118 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
121 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
119 ${diff_block.diff_block(c.changes)}
122 ${diff_block.diff_block(c.changes)}
120
123
121 ## template for inline comment form
124 ## template for inline comment form
122 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
125 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
123 ${comment.comment_inline_form(c.changeset)}
126 ${comment.comment_inline_form(c.changeset)}
124
127
125 ## render comments
128 ## render comments
126 ${comment.comments(c.changeset)}
129 ${comment.comments(c.changeset)}
127 <script type="text/javascript">
130 <script type="text/javascript">
128 YUE.onDOMReady(function(){
131 YUE.onDOMReady(function(){
129 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
132 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
130 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"
133 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"
131 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
134 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
132 var show = 'none';
135 var show = 'none';
133 var target = e.currentTarget;
136 var target = e.currentTarget;
134 if(target.checked){
137 if(target.checked){
135 var show = ''
138 var show = ''
136 }
139 }
137 var boxid = YUD.getAttribute(target,'id_for');
140 var boxid = YUD.getAttribute(target,'id_for');
138 var comments = YUQ('#{0} .inline-comments'.format(boxid));
141 var comments = YUQ('#{0} .inline-comments'.format(boxid));
139 for(c in comments){
142 for(c in comments){
140 YUD.setStyle(comments[c],'display',show);
143 YUD.setStyle(comments[c],'display',show);
141 }
144 }
142 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
145 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
143 for(c in btns){
146 for(c in btns){
144 YUD.setStyle(btns[c],'display',show);
147 YUD.setStyle(btns[c],'display',show);
145 }
148 }
146 })
149 })
147
150
148 YUE.on(YUQ('.line'),'click',function(e){
151 YUE.on(YUQ('.line'),'click',function(e){
149 var tr = e.currentTarget;
152 var tr = e.currentTarget;
150 injectInlineForm(tr);
153 injectInlineForm(tr);
151 });
154 });
152
155
153 // inject comments into they proper positions
156 // inject comments into they proper positions
154 var file_comments = YUQ('.inline-comment-placeholder');
157 var file_comments = YUQ('.inline-comment-placeholder');
155 renderInlineComments(file_comments);
158 renderInlineComments(file_comments);
156 })
159 })
157
160
158 </script>
161 </script>
159
162
160 </div>
163 </div>
161 </%def>
164 </%def>
@@ -1,81 +1,83 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 %if c.repo_changesets:
2 %if c.repo_changesets:
3 <table class="table_disp">
3 <table class="table_disp">
4 <tr>
4 <tr>
5 <th class="left">${_('revision')}</th>
5 <th class="left">${_('revision')}</th>
6 <th class="left">${_('commit message')}</th>
6 <th class="left">${_('commit message')}</th>
7 <th class="left">${_('age')}</th>
7 <th class="left">${_('age')}</th>
8 <th class="left">${_('author')}</th>
8 <th class="left">${_('author')}</th>
9 <th class="left">${_('branch')}</th>
9 <th class="left">${_('branch')}</th>
10 <th class="left">${_('tags')}</th>
10 <th class="left">${_('tags')}</th>
11 </tr>
11 </tr>
12 %for cnt,cs in enumerate(c.repo_changesets):
12 %for cnt,cs in enumerate(c.repo_changesets):
13 <tr class="parity${cnt%2}">
13 <tr class="parity${cnt%2}">
14 <td>
14 <td>
15 <div><pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}">r${cs.revision}:${h.short_id(cs.raw_id)}</a></pre></div>
15 <div><pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}">r${cs.revision}:${h.short_id(cs.raw_id)}</a></pre></div>
16 </td>
16 </td>
17 <td>
17 <td>
18 ${h.link_to(h.truncate(cs.message,50),
18 ${h.link_to(h.truncate(cs.message,50) or _('No commit message'),
19 h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id),
19 h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id),
20 title=cs.message)}
20 title=cs.message)}
21 </td>
21 </td>
22 <td><span class="tooltip" title="${cs.date}">
22 <td><span class="tooltip" title="${cs.date}">
23 ${h.age(cs.date)}</span>
23 ${h.age(cs.date)}</span>
24 </td>
24 </td>
25 <td title="${cs.author}">${h.person(cs.author)}</td>
25 <td title="${cs.author}">${h.person(cs.author)}</td>
26 <td>
26 <td>
27 <span class="logtags">
27 <span class="logtags">
28 %if cs.branch:
28 <span class="branchtag">
29 <span class="branchtag">
29 ${cs.branch}
30 ${cs.branch}
30 </span>
31 </span>
32 %endif
31 </span>
33 </span>
32 </td>
34 </td>
33 <td>
35 <td>
34 <span class="logtags">
36 <span class="logtags">
35 %for tag in cs.tags:
37 %for tag in cs.tags:
36 <span class="tagtag">${tag}</span>
38 <span class="tagtag">${tag}</span>
37 %endfor
39 %endfor
38 </span>
40 </span>
39 </td>
41 </td>
40 </tr>
42 </tr>
41 %endfor
43 %endfor
42
44
43 </table>
45 </table>
44
46
45 <script type="text/javascript">
47 <script type="text/javascript">
46 YUE.onDOMReady(function(){
48 YUE.onDOMReady(function(){
47 YUE.delegate("shortlog_data","click",function(e, matchedEl, container){
49 YUE.delegate("shortlog_data","click",function(e, matchedEl, container){
48 ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();});
50 ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();});
49 YUE.preventDefault(e);
51 YUE.preventDefault(e);
50 },'.pager_link');
52 },'.pager_link');
51 });
53 });
52 </script>
54 </script>
53
55
54 <div class="pagination-wh pagination-left">
56 <div class="pagination-wh pagination-left">
55 ${c.repo_changesets.pager('$link_previous ~2~ $link_next')}
57 ${c.repo_changesets.pager('$link_previous ~2~ $link_next')}
56 </div>
58 </div>
57 %else:
59 %else:
58
60
59 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
61 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
60 <h4>${_('Add or upload files directly via RhodeCode')}</h4>
62 <h4>${_('Add or upload files directly via RhodeCode')}</h4>
61 <div style="margin: 20px 30px;">
63 <div style="margin: 20px 30px;">
62 <div id="add_node_id" class="add_node">
64 <div id="add_node_id" class="add_node">
63 <a class="ui-btn" href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='')}">${_('add new file')}</a>
65 <a class="ui-btn" href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='')}">${_('add new file')}</a>
64 </div>
66 </div>
65 </div>
67 </div>
66 %endif
68 %endif
67
69
68
70
69 <h4>${_('Push new repo')}</h4>
71 <h4>${_('Push new repo')}</h4>
70 <pre>
72 <pre>
71 ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
73 ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
72 ${c.rhodecode_repo.alias} add README # add first file
74 ${c.rhodecode_repo.alias} add README # add first file
73 ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
75 ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
74 ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
76 ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
75 </pre>
77 </pre>
76
78
77 <h4>${_('Existing repository?')}</h4>
79 <h4>${_('Existing repository?')}</h4>
78 <pre>
80 <pre>
79 ${c.rhodecode_repo.alias} push ${c.clone_repo_url}
81 ${c.rhodecode_repo.alias} push ${c.clone_repo_url}
80 </pre>
82 </pre>
81 %endif
83 %endif
General Comments 0
You need to be logged in to leave comments. Login now