##// END OF EJS Templates
Changed affected to changed, sounds better, and added ungettext translations for this
marcink -
r3014:02bbd574 beta
parent child Browse files
Show More
@@ -1,191 +1,191
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 <%inherit file="/base/base.html"/>
4 4
5 5 <%def name="title()">
6 6 ${_('%s Changeset') % c.repo_name} - 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 <script>
28 28 var _USERS_AC_DATA = ${c.users_array|n};
29 29 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
30 30 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
31 31 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
32 32 </script>
33 33 <div class="table">
34 34 <div class="diffblock">
35 35 <div class="code-header">
36 36 <div class="hash">
37 37 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
38 38 </div>
39 39 <div class="date">
40 40 ${h.fmt_date(c.changeset.date)}
41 41 </div>
42 42 <div class="changeset-status-container">
43 43 %if c.statuses:
44 44 <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div>
45 45 <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div>
46 46 %endif
47 47 </div>
48 48 <div class="diff-actions">
49 49 <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
50 50 <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a>
51 51 <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a>
52 52 ${c.ignorews_url(request.GET)}
53 53 ${c.context_url(request.GET)}
54 54 </div>
55 55 <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div>
56 56 </div>
57 57 </div>
58 58 <div id="changeset_content">
59 59 <div class="container">
60 60 <div class="left">
61 61 <div class="author">
62 62 <div class="gravatar">
63 63 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/>
64 64 </div>
65 65 <span>${h.person(c.changeset.author)}</span><br/>
66 66 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
67 67 </div>
68 68 <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div>
69 69 </div>
70 70 <div class="right">
71 71 <div class="changes">
72 72 % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff:
73 73 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
74 74 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
75 75 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
76 76 % else:
77 77 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
78 78 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
79 79 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
80 80 % endif
81 81 </div>
82 82
83 83 %if c.changeset.parents:
84 84 %for p_cs in reversed(c.changeset.parents):
85 85 <div class="parent">${_('Parent')}
86 86 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
87 87 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
88 88 </div>
89 89 %endfor
90 90 %else:
91 91 <div class="parent">${_('No parents')}</div>
92 92 %endif
93 93 <span class="logtags">
94 94 %if len(c.changeset.parents)>1:
95 95 <span class="merge">${_('merge')}</span>
96 96 %endif
97 97 %if c.changeset.branch:
98 98 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
99 99 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
100 100 </span>
101 101 %endif
102 102 %for tag in c.changeset.tags:
103 103 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
104 104 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
105 105 %endfor
106 106 </span>
107 107 </div>
108 108 </div>
109 109 <span>
110 110 % if c.limited_diff:
111 ${_('%s files affected:') % (len(c.changeset.affected_files))}
111 ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}:
112 112 % else:
113 ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
113 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}:
114 114 %endif
115 115 </span>
116 116 <div class="cs_files">
117 117 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems():
118 118 <div class="cs_${change}">
119 119 <div class="node">
120 120 <a href="#${FID}">${h.safe_unicode(path)}</a>
121 121 </div>
122 122 <div class="changes">${h.fancy_file_stats(stats)}</div>
123 123 </div>
124 124 %endfor
125 125 % if c.limited_diff:
126 126 <h5>${_('Changeset was too big and was cut off...')}</h5>
127 127 % endif
128 128 </div>
129 129 </div>
130 130
131 131 </div>
132 132
133 133 ## diff block
134 134 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
135 135 ${diff_block.diff_block(c.changes[c.changeset.raw_id])}
136 136
137 137 % if c.limited_diff:
138 138 <h4>${_('Changeset was too big and was cut off...')}</h4>
139 139 % endif
140 140
141 141 ## template for inline comment form
142 142 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
143 143 ${comment.comment_inline_form()}
144 144
145 145 ## render comments and inlines
146 146 ${comment.generate_comments()}
147 147
148 148 ## main comment form and it status
149 149 ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id),
150 150 h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))}
151 151
152 152 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
153 153 <script type="text/javascript">
154 154 YUE.onDOMReady(function(){
155 155 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
156 156 var show = 'none';
157 157 var target = e.currentTarget;
158 158 if(target == null){
159 159 target = this;
160 160 }
161 161 if(target.checked){
162 162 var show = ''
163 163 }
164 164 var boxid = YUD.getAttribute(target,'id_for');
165 165 var comments = YUQ('#{0} .inline-comments'.format(boxid));
166 166 for(c in comments){
167 167 YUD.setStyle(comments[c],'display',show);
168 168 }
169 169 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
170 170 for(c in btns){
171 171 YUD.setStyle(btns[c],'display',show);
172 172 }
173 173 })
174 174
175 175 YUE.on(YUQ('.line'),'click',function(e){
176 176 var tr = e.currentTarget;
177 177 if(tr == null){
178 178 tr = this;
179 179 }
180 180 injectInlineForm(tr);
181 181 });
182 182
183 183 // inject comments into they proper positions
184 184 var file_comments = YUQ('.inline-comment-placeholder');
185 185 renderInlineComments(file_comments);
186 186 })
187 187
188 188 </script>
189 189
190 190 </div>
191 191 </%def>
General Comments 0
You need to be logged in to leave comments. Login now