|
@@ -106,34 +106,32 @@ ${WIDGETS.BREADCRUMB('current-page-breadcrumb', fake_api.breadcrumb)}
|
106
|
106
|
% else:
|
107
|
107
|
<hr class="tracim-panel-separator"/>
|
108
|
108
|
${WIDGETS.SECURED_SECTION_TITLE(fake_api.current_user, result.file.workspace, 'file-revisions', _('File revisions'), 'new-file-revision', _('upload a new revision and/or comment...'))}
|
109
|
|
- <p>${_('This file contains {} revision(s)').format(sum(1 for revision in result.file.revisions if revision.action.id=='revision'))}</p>
|
|
109
|
+ <p>${_('This file contains {} revision(s)').format(sum(1 for revision in result.file.revisions if revision.action.id in ('creation', 'revision')))}</p>
|
110
|
110
|
${FORMS.NEW_FILE_REVISION_WITH_COMMENT_FORM('new-file-revision', result.file.workspace.id, result.file.parent.id, result.file.id)}
|
111
|
111
|
% endif
|
112
|
112
|
% endif
|
113
|
113
|
|
114
|
114
|
<div>
|
115
|
115
|
<table class="table table-striped table-hover">
|
116
|
|
- % for revid, revision in reversed(list(enumerate(reversed(result.file.revisions)))):
|
117
|
|
- % if revision.action.id in ('creation', 'revision'):
|
118
|
|
- ## INFO - D.A. - 2014-10-22
|
119
|
|
- ## We do not show status update and other editions that are not revisions
|
120
|
|
- ## (at least in this revision list table)
|
121
|
|
- <% warning_or_not = ('', 'warning')[result.file.selected_revision==revision.id] %>
|
122
|
|
- <tr class="${warning_or_not}">
|
123
|
|
- <td><span class="label label-default">v${revid}</span></td>
|
124
|
|
- <td>${revision.owner.name}</td>
|
125
|
|
- <td><a href="${tg.url('/workspaces/{}/folders/{}/files/{}?revision_id={}').format(result.file.workspace.id, result.file.parent.id, result.file.id, revision.id)}">${revision.label}</a></td>
|
126
|
|
- <% rev_download_url = tg.url('/workspaces/{}/folders/{}/files/{}/download?revision_id={}'.format(result.file.workspace.id, result.file.parent.id, result.file.id, revision.id)) %>
|
127
|
|
- <td><a href="${rev_download_url}">${TIM.ICO(16, 'actions/go-bottom', _('Download this particular revision'))}</a></td>
|
128
|
|
- <td>${h.date_time_in_long_format(revision.created, _('%Y-%m-%d at %H:%M'))}</td>
|
129
|
|
- <td>${TIM.ICO_TOOLTIP(16, revision.action.icon, revision.action.label)}</td>
|
130
|
|
- <td>
|
131
|
|
- % if warning_or_not:
|
132
|
|
- ${TIM.ICO(16, 'actions/go-previous')} <strong>${_('Revision r{}').format(result.file.selected_revision)}</strong>
|
133
|
|
- % endif
|
134
|
|
- </td>
|
135
|
|
- </tr>
|
136
|
|
- % endif
|
|
116
|
+ % for revid, revision in reversed(list(enumerate(reversed([revision for revision in result.file.revisions if revision.action.id in ('creation', 'revision')])))):
|
|
117
|
+ ## INFO - D.A. - 2014-10-22
|
|
118
|
+ ## We do not show status update and other editions that are not revisions
|
|
119
|
+ ## (at least in this revision list table)
|
|
120
|
+ <% warning_or_not = ('', 'warning')[result.file.selected_revision==revision.id] %>
|
|
121
|
+ <tr class="${warning_or_not}">
|
|
122
|
+ <td><span class="label label-default">v${revid}</span></td>
|
|
123
|
+ <td>${revision.owner.name}</td>
|
|
124
|
+ <td><a href="${tg.url('/workspaces/{}/folders/{}/files/{}?revision_id={}').format(result.file.workspace.id, result.file.parent.id, result.file.id, revision.id)}">${revision.label}</a></td>
|
|
125
|
+ <% rev_download_url = tg.url('/workspaces/{}/folders/{}/files/{}/download?revision_id={}'.format(result.file.workspace.id, result.file.parent.id, result.file.id, revision.id)) %>
|
|
126
|
+ <td><a href="${rev_download_url}">${TIM.ICO(16, 'actions/go-bottom', _('Download this particular revision'))}</a></td>
|
|
127
|
+ <td>${h.date_time_in_long_format(revision.created, _('%Y-%m-%d at %H:%M'))}</td>
|
|
128
|
+ <td>${TIM.ICO_TOOLTIP(16, revision.action.icon, revision.action.label)}</td>
|
|
129
|
+ <td>
|
|
130
|
+ % if warning_or_not:
|
|
131
|
+ ${TIM.ICO(16, 'actions/go-previous')} <strong>${_('Revision r{}').format(result.file.selected_revision)}</strong>
|
|
132
|
+ % endif
|
|
133
|
+ </td>
|
|
134
|
+ </tr>
|
137
|
135
|
% endfor
|
138
|
136
|
</table>
|
139
|
137
|
</div>
|