Show More
@@ -154,9 +154,14 b' class FilesController(BaseRepoController' | |||
|
154 | 154 | c.file = c.changeset.get_node(f_path) |
|
155 | 155 | |
|
156 | 156 | if c.file.is_file(): |
|
157 | c.file_history = self._get_node_history(c.changeset, f_path) | |
|
157 | _hist = c.changeset.get_file_history(f_path) | |
|
158 | c.file_history = self._get_node_history(c.changeset, f_path, | |
|
159 | _hist) | |
|
160 | c.authors = [] | |
|
161 | for a in set([x.author for x in _hist]): | |
|
162 | c.authors.append((h.email(a), h.person(a))) | |
|
158 | 163 | else: |
|
159 | c.file_history = [] | |
|
164 | c.authors = c.file_history = [] | |
|
160 | 165 | except RepositoryError, e: |
|
161 | 166 | h.flash(str(e), category='warning') |
|
162 | 167 | redirect(h.url('files_home', repo_name=repo_name, |
@@ -454,8 +459,9 b' class FilesController(BaseRepoController' | |||
|
454 | 459 | |
|
455 | 460 | return render('files/file_diff.html') |
|
456 | 461 | |
|
457 | def _get_node_history(self, cs, f_path): | |
|
458 | changesets = cs.get_file_history(f_path) | |
|
462 | def _get_node_history(self, cs, f_path, changesets=None): | |
|
463 | if changesets is None: | |
|
464 | changesets = cs.get_file_history(f_path) | |
|
459 | 465 | hist_l = [] |
|
460 | 466 | |
|
461 | 467 | changesets_group = ([], _("Changesets")) |
@@ -2252,6 +2252,20 b' h3.files_location {' | |||
|
2252 | 2252 | padding: 5px !important; |
|
2253 | 2253 | } |
|
2254 | 2254 | |
|
2255 | .file_history{ | |
|
2256 | padding-top:10px; | |
|
2257 | font-size:16px; | |
|
2258 | } | |
|
2259 | .file_author{ | |
|
2260 | float: left; | |
|
2261 | } | |
|
2262 | ||
|
2263 | .file_author .item{ | |
|
2264 | float:left; | |
|
2265 | padding:5px; | |
|
2266 | color: #888; | |
|
2267 | } | |
|
2268 | ||
|
2255 | 2269 | .tablerow0 { |
|
2256 | 2270 | background-color: #F8F8F8; |
|
2257 | 2271 | } |
@@ -1,15 +1,27 b'' | |||
|
1 | 1 | <dl> |
|
2 | <dt style="padding-top:10px;font-size:16px">${_('History')}</dt> | |
|
2 | <dt class="file_history">${_('History')}</dt> | |
|
3 | 3 | <dd> |
|
4 | <div> | |
|
5 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | |
|
6 | ${h.hidden('diff2',c.file.changeset.raw_id)} | |
|
7 |
${h. |
|
|
8 | ${h.submit('diff',_('diff to revision'),class_="ui-btn")} | |
|
9 |
${h.submit(' |
|
|
10 | ${h.end_form()} | |
|
11 | </div> | |
|
4 | <div> | |
|
5 | <div style="float:left"> | |
|
6 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | |
|
7 | ${h.hidden('diff2',c.file.changeset.raw_id)} | |
|
8 | ${h.select('diff1',c.file.changeset.raw_id,c.file_history)} | |
|
9 | ${h.submit('diff',_('diff to revision'),class_="ui-btn")} | |
|
10 | ${h.submit('show_rev',_('show at revision'),class_="ui-btn")} | |
|
11 | ${h.end_form()} | |
|
12 | </div> | |
|
13 | <div class="file_author"> | |
|
14 | <div class="item">${h.literal(ungettext(u'%s author',u'%s authors',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }</div> | |
|
15 | %for email, user in c.authors: | |
|
16 | <div class="contributor tooltip" style="float:left" title="${h.tooltip(user)}"> | |
|
17 | <div class="gravatar" style="margin:1px"><img alt="gravatar" src="${h.gravatar_url(email, 20)}"/> </div> | |
|
18 | </div> | |
|
19 | %endfor | |
|
20 | </div> | |
|
21 | </div> | |
|
22 | <div style="clear:both"></div> | |
|
12 | 23 | </dd> |
|
24 | ||
|
13 | 25 | </dl> |
|
14 | 26 | |
|
15 | 27 | <div id="body" class="codeblock"> |
General Comments 0
You need to be logged in to leave comments.
Login now