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