##// END OF EJS Templates
files: restructure the files views for easier restyling
marcink -
r3648:4b120ff6 new-ui
parent child Browse files
Show More
@@ -1,42 +1,31 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <div class="summary-detail-header">
4 <h4 class="item">
5 % if c.file_author:
6 ${_('Last Author')}
7 % else:
8 ${h.literal(_ungettext(u'File Author (%s)',u'File Authors (%s)',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }
9 % endif
10 </h4>
11 <a href="#" id="show_authors" class="action_link">${_('Show All')}</a>
12 </div>
13
14 % if c.authors:
3 % if c.authors:
15 <ul class="sidebar-right-content">
4 <ul class="sidebar-right-content">
16 % for email, user, commits in sorted(c.authors, key=lambda e: c.file_last_commit.author_email!=e[0]):
5 % for email, user, commits in sorted(c.authors, key=lambda e: c.file_last_commit.author_email!=e[0]):
17 <li class="file_author">
6 <li class="file_author">
18 <div class="tooltip" title="${h.tooltip(h.author_string(email))}">
7 <div class="tooltip" title="${h.tooltip(h.author_string(email))}">
19 ${base.gravatar(email, 16)}
8 ${base.gravatar(email, 16)}
20 <div class="user">${h.link_to_user(user)}</div>
9 <div class="user">${h.link_to_user(user)}</div>
21
10
22 % if c.file_author:
11 % if c.file_author:
23 <span>- ${h.age_component(c.file_last_commit.date)}</span>
12 <span>- ${h.age_component(c.file_last_commit.date)}</span>
24 % elif c.file_last_commit.author_email==email:
13 % elif c.file_last_commit.author_email==email:
25 <span> (${_('last author')})</span>
14 <span> (${_('last author')})</span>
26 % endif
15 % endif
27
16
28 % if not c.file_author:
17 % if not c.file_author:
29 <span>
18 <span>
30 % if commits == 1:
19 % if commits == 1:
31 ${commits} ${_('Commit')}
20 ${commits} ${_('Commit')}
32 % else:
21 % else:
33 ${commits} ${_('Commits')}
22 ${commits} ${_('Commits')}
34 % endif
23 % endif
35 </span>
24 </span>
36 % endif
25 % endif
37
26
38 </div>
27 </div>
39 </li>
28 </li>
40 % endfor
29 % endfor
41 </ul>
30 </ul>
42 % endif
31 % endif
@@ -1,320 +1,321 b''
1 <%inherit file="/base/base.mako"/>
1 <%inherit file="/base/base.mako"/>
2
2
3 <%def name="title(*args)">
3 <%def name="title(*args)">
4 ${_('%s Files') % c.repo_name}
4 ${_('%s Files') % c.repo_name}
5 %if hasattr(c,'file'):
5 %if hasattr(c,'file'):
6 &middot; ${h.safe_unicode(c.file.path) or '\\'}
6 &middot; ${h.safe_unicode(c.file.path) or '\\'}
7 %endif
7 %endif
8
8
9 %if c.rhodecode_name:
9 %if c.rhodecode_name:
10 &middot; ${h.branding(c.rhodecode_name)}
10 &middot; ${h.branding(c.rhodecode_name)}
11 %endif
11 %endif
12 </%def>
12 </%def>
13
13
14 <%def name="breadcrumbs_links()">
14 <%def name="breadcrumbs_links()">
15 ${_('Files')}
15 ${_('Files')}
16 %if c.file:
16 %if c.file:
17 @ ${h.show_id(c.commit)}
17 @ ${h.show_id(c.commit)}
18 %endif
18 %endif
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_nav()">
21 <%def name="menu_bar_nav()">
22 ${self.menu_items(active='repositories')}
22 ${self.menu_items(active='repositories')}
23 </%def>
23 </%def>
24
24
25 <%def name="menu_bar_subnav()">
25 <%def name="menu_bar_subnav()">
26 ${self.repo_menu(active='files')}
26 ${self.repo_menu(active='files')}
27 </%def>
27 </%def>
28
28
29 <%def name="main()">
29 <%def name="main()">
30 <div id="pjax-container" class="summary">
30 <div id="pjax-container" class="summary">
31 <div id="files_data">
31 <div id="files_data">
32 <%include file='files_pjax.mako'/>
32 <%include file='files_pjax.mako'/>
33 </div>
33 </div>
34 </div>
34 </div>
35 <script>
35 <script>
36 var curState = {
36 var curState = {
37 commit_id: "${c.commit.raw_id}"
37 commit_id: "${c.commit.raw_id}"
38 };
38 };
39
39
40 var getState = function(context) {
40 var getState = function(context) {
41 var url = $(location).attr('href');
41 var url = $(location).attr('href');
42 var _base_url = '${h.route_path("repo_files",repo_name=c.repo_name,commit_id='',f_path='')}';
42 var _base_url = '${h.route_path("repo_files",repo_name=c.repo_name,commit_id='',f_path='')}';
43 var _annotate_url = '${h.route_path("repo_files:annotated",repo_name=c.repo_name,commit_id='',f_path='')}';
43 var _annotate_url = '${h.route_path("repo_files:annotated",repo_name=c.repo_name,commit_id='',f_path='')}';
44 _base_url = _base_url.replace('//', '/');
44 _base_url = _base_url.replace('//', '/');
45 _annotate_url = _annotate_url.replace('//', '/');
45 _annotate_url = _annotate_url.replace('//', '/');
46
46
47 //extract f_path from url.
47 //extract f_path from url.
48 var parts = url.split(_base_url);
48 var parts = url.split(_base_url);
49 if (parts.length != 2) {
49 if (parts.length != 2) {
50 parts = url.split(_annotate_url);
50 parts = url.split(_annotate_url);
51 if (parts.length != 2) {
51 if (parts.length != 2) {
52 var rev = "tip";
52 var rev = "tip";
53 var f_path = "";
53 var f_path = "";
54 } else {
54 } else {
55 var parts2 = parts[1].split('/');
55 var parts2 = parts[1].split('/');
56 var rev = parts2.shift(); // pop the first element which is the revision
56 var rev = parts2.shift(); // pop the first element which is the revision
57 var f_path = parts2.join('/');
57 var f_path = parts2.join('/');
58 }
58 }
59
59
60 } else {
60 } else {
61 var parts2 = parts[1].split('/');
61 var parts2 = parts[1].split('/');
62 var rev = parts2.shift(); // pop the first element which is the revision
62 var rev = parts2.shift(); // pop the first element which is the revision
63 var f_path = parts2.join('/');
63 var f_path = parts2.join('/');
64 }
64 }
65
65
66 var _node_list_url = pyroutes.url('repo_files_nodelist',
66 var _node_list_url = pyroutes.url('repo_files_nodelist',
67 {repo_name: templateContext.repo_name,
67 {repo_name: templateContext.repo_name,
68 commit_id: rev, f_path: f_path});
68 commit_id: rev, f_path: f_path});
69 var _url_base = pyroutes.url('repo_files',
69 var _url_base = pyroutes.url('repo_files',
70 {repo_name: templateContext.repo_name,
70 {repo_name: templateContext.repo_name,
71 commit_id: rev, f_path:'__FPATH__'});
71 commit_id: rev, f_path:'__FPATH__'});
72 return {
72 return {
73 url: url,
73 url: url,
74 f_path: f_path,
74 f_path: f_path,
75 rev: rev,
75 rev: rev,
76 commit_id: curState.commit_id,
76 commit_id: curState.commit_id,
77 node_list_url: _node_list_url,
77 node_list_url: _node_list_url,
78 url_base: _url_base
78 url_base: _url_base
79 };
79 };
80 };
80 };
81
81
82 var metadataRequest = null;
82 var metadataRequest = null;
83 var getFilesMetadata = function() {
83 var getFilesMetadata = function() {
84 if (metadataRequest && metadataRequest.readyState != 4) {
84 if (metadataRequest && metadataRequest.readyState != 4) {
85 metadataRequest.abort();
85 metadataRequest.abort();
86 }
86 }
87 if (fileSourcePage) {
87 if (fileSourcePage) {
88 return false;
88 return false;
89 }
89 }
90
90
91 if ($('#file-tree-wrapper').hasClass('full-load')) {
91 if ($('#file-tree-wrapper').hasClass('full-load')) {
92 // in case our HTML wrapper has full-load class we don't
92 // in case our HTML wrapper has full-load class we don't
93 // trigger the async load of metadata
93 // trigger the async load of metadata
94 return false;
94 return false;
95 }
95 }
96
96
97 var state = getState('metadata');
97 var state = getState('metadata');
98 var url_data = {
98 var url_data = {
99 'repo_name': templateContext.repo_name,
99 'repo_name': templateContext.repo_name,
100 'commit_id': state.commit_id,
100 'commit_id': state.commit_id,
101 'f_path': state.f_path
101 'f_path': state.f_path
102 };
102 };
103
103
104 var url = pyroutes.url('repo_nodetree_full', url_data);
104 var url = pyroutes.url('repo_nodetree_full', url_data);
105
105
106 metadataRequest = $.ajax({url: url});
106 metadataRequest = $.ajax({url: url});
107
107
108 metadataRequest.done(function(data) {
108 metadataRequest.done(function(data) {
109 $('#file-tree').html(data);
109 $('#file-tree').html(data);
110 timeagoActivate();
110 timeagoActivate();
111 });
111 });
112 metadataRequest.fail(function (data, textStatus, errorThrown) {
112 metadataRequest.fail(function (data, textStatus, errorThrown) {
113 console.log(data);
113 console.log(data);
114 if (data.status != 0) {
114 if (data.status != 0) {
115 alert("Error while fetching metadata.\nError code {0} ({1}).Please consider reloading the page".format(data.status,data.statusText));
115 alert("Error while fetching metadata.\nError code {0} ({1}).Please consider reloading the page".format(data.status,data.statusText));
116 }
116 }
117 });
117 });
118 };
118 };
119
119
120 var callbacks = function() {
120 var callbacks = function() {
121 var state = getState('callbacks');
121 var state = getState('callbacks');
122 timeagoActivate();
122 timeagoActivate();
123
123
124 // used for history, and switch to
124 // used for history, and switch to
125 var initialCommitData = {
125 var initialCommitData = {
126 id: null,
126 id: null,
127 text: '${_("Pick Commit")}',
127 text: '${_("Pick Commit")}',
128 type: 'sha',
128 type: 'sha',
129 raw_id: null,
129 raw_id: null,
130 files_url: null
130 files_url: null
131 };
131 };
132
132
133 if ($('#trimmed_message_box').height() < 50) {
133 if ($('#trimmed_message_box').height() < 50) {
134 $('#message_expand').hide();
134 $('#message_expand').hide();
135 }
135 }
136
136
137 $('#message_expand').on('click', function(e) {
137 $('#message_expand').on('click', function(e) {
138 $('#trimmed_message_box').css('max-height', 'none');
138 $('#trimmed_message_box').css('max-height', 'none');
139 $(this).hide();
139 $(this).hide();
140 });
140 });
141
141
142 if (fileSourcePage) {
142 if (fileSourcePage) {
143 // variants for with source code, not tree view
143 // variants for with source code, not tree view
144
144
145 // select code link event
145 // select code link event
146 $("#hlcode").mouseup(getSelectionLink);
146 $("#hlcode").mouseup(getSelectionLink);
147
147
148 // file history select2
148 // file history select2
149 select2FileHistorySwitcher('#diff1', initialCommitData, state);
149 select2FileHistorySwitcher('#diff1', initialCommitData, state);
150
150
151 // show at, diff to actions handlers
151 // show at, diff to actions handlers
152 $('#diff1').on('change', function(e) {
152 $('#diff1').on('change', function(e) {
153 $('#diff_to_commit').removeClass('disabled').removeAttr("disabled");
153 $('#diff_to_commit').removeClass('disabled').removeAttr("disabled");
154 $('#diff_to_commit').val(_gettext('Diff to Commit ') + e.val.truncateAfter(8, '...'));
154 $('#diff_to_commit').val(_gettext('Diff to Commit ') + e.val.truncateAfter(8, '...'));
155
155
156 $('#show_at_commit').removeClass('disabled').removeAttr("disabled");
156 $('#show_at_commit').removeClass('disabled').removeAttr("disabled");
157 $('#show_at_commit').val(_gettext('Show at Commit ') + e.val.truncateAfter(8, '...'));
157 $('#show_at_commit').val(_gettext('Show at Commit ') + e.val.truncateAfter(8, '...'));
158 });
158 });
159
159
160 $('#diff_to_commit').on('click', function(e) {
160 $('#diff_to_commit').on('click', function(e) {
161 var diff1 = $('#diff1').val();
161 var diff1 = $('#diff1').val();
162 var diff2 = $('#diff2').val();
162 var diff2 = $('#diff2').val();
163
163
164 var url_data = {
164 var url_data = {
165 repo_name: templateContext.repo_name,
165 repo_name: templateContext.repo_name,
166 source_ref: diff1,
166 source_ref: diff1,
167 source_ref_type: 'rev',
167 source_ref_type: 'rev',
168 target_ref: diff2,
168 target_ref: diff2,
169 target_ref_type: 'rev',
169 target_ref_type: 'rev',
170 merge: 1,
170 merge: 1,
171 f_path: state.f_path
171 f_path: state.f_path
172 };
172 };
173 window.location = pyroutes.url('repo_compare', url_data);
173 window.location = pyroutes.url('repo_compare', url_data);
174 });
174 });
175
175
176 $('#show_at_commit').on('click', function(e) {
176 $('#show_at_commit').on('click', function(e) {
177 var diff1 = $('#diff1').val();
177 var diff1 = $('#diff1').val();
178
178
179 var annotate = $('#annotate').val();
179 var annotate = $('#annotate').val();
180 if (annotate === "True") {
180 if (annotate === "True") {
181 var url = pyroutes.url('repo_files:annotated',
181 var url = pyroutes.url('repo_files:annotated',
182 {'repo_name': templateContext.repo_name,
182 {'repo_name': templateContext.repo_name,
183 'commit_id': diff1, 'f_path': state.f_path});
183 'commit_id': diff1, 'f_path': state.f_path});
184 } else {
184 } else {
185 var url = pyroutes.url('repo_files',
185 var url = pyroutes.url('repo_files',
186 {'repo_name': templateContext.repo_name,
186 {'repo_name': templateContext.repo_name,
187 'commit_id': diff1, 'f_path': state.f_path});
187 'commit_id': diff1, 'f_path': state.f_path});
188 }
188 }
189 window.location = url;
189 window.location = url;
190
190
191 });
191 });
192
192
193 // show more authors
193 // show more authors
194 $('#show_authors').on('click', function(e) {
194 $('#show_authors').on('click', function(e) {
195 e.preventDefault();
195 e.preventDefault();
196 var url = pyroutes.url('repo_file_authors',
196 var url = pyroutes.url('repo_file_authors',
197 {'repo_name': templateContext.repo_name,
197 {'repo_name': templateContext.repo_name,
198 'commit_id': state.rev, 'f_path': state.f_path});
198 'commit_id': state.rev, 'f_path': state.f_path});
199
199
200 $.pjax({
200 $.pjax({
201 url: url,
201 url: url,
202 data: 'annotate=${"1" if c.annotate else "0"}',
202 data: 'annotate=${"1" if c.annotate else "0"}',
203 container: '#file_authors',
203 container: '#file_authors',
204 push: false,
204 push: false,
205 timeout: pjaxTimeout
205 timeout: pjaxTimeout
206 }).complete(function(){
206 }).complete(function(){
207 $('#show_authors').hide();
207 $('#show_authors').hide();
208 $('#file_authors_title').html(_gettext('All Authors'))
208 })
209 })
209 });
210 });
210
211
211 // load file short history
212 // load file short history
212 $('#file_history_overview').on('click', function(e) {
213 $('#file_history_overview').on('click', function(e) {
213 e.preventDefault();
214 e.preventDefault();
214 path = state.f_path;
215 path = state.f_path;
215 if (path.indexOf("#") >= 0) {
216 if (path.indexOf("#") >= 0) {
216 path = path.slice(0, path.indexOf("#"));
217 path = path.slice(0, path.indexOf("#"));
217 }
218 }
218 var url = pyroutes.url('repo_changelog_file',
219 var url = pyroutes.url('repo_changelog_file',
219 {'repo_name': templateContext.repo_name,
220 {'repo_name': templateContext.repo_name,
220 'commit_id': state.rev, 'f_path': path, 'limit': 6});
221 'commit_id': state.rev, 'f_path': path, 'limit': 6});
221 $('#file_history_container').show();
222 $('#file_history_container').show();
222 $('#file_history_container').html('<div class="file-history-inner">{0}</div>'.format(_gettext('Loading ...')));
223 $('#file_history_container').html('<div class="file-history-inner">{0}</div>'.format(_gettext('Loading ...')));
223
224
224 $.pjax({
225 $.pjax({
225 url: url,
226 url: url,
226 container: '#file_history_container',
227 container: '#file_history_container',
227 push: false,
228 push: false,
228 timeout: pjaxTimeout
229 timeout: pjaxTimeout
229 })
230 })
230 });
231 });
231
232
232 }
233 }
233 else {
234 else {
234 getFilesMetadata();
235 getFilesMetadata();
235
236
236 // fuzzy file filter
237 // fuzzy file filter
237 fileBrowserListeners(state.node_list_url, state.url_base);
238 fileBrowserListeners(state.node_list_url, state.url_base);
238
239
239 // switch to widget
240 // switch to widget
240 select2RefSwitcher('#refs_filter', initialCommitData);
241 select2RefSwitcher('#refs_filter', initialCommitData);
241 $('#refs_filter').on('change', function(e) {
242 $('#refs_filter').on('change', function(e) {
242 var data = $('#refs_filter').select2('data');
243 var data = $('#refs_filter').select2('data');
243 curState.commit_id = data.raw_id;
244 curState.commit_id = data.raw_id;
244 $.pjax({url: data.files_url, container: '#pjax-container', timeout: pjaxTimeout});
245 $.pjax({url: data.files_url, container: '#pjax-container', timeout: pjaxTimeout});
245 });
246 });
246
247
247 $("#prev_commit_link").on('click', function(e) {
248 $("#prev_commit_link").on('click', function(e) {
248 var data = $(this).data();
249 var data = $(this).data();
249 curState.commit_id = data.commitId;
250 curState.commit_id = data.commitId;
250 });
251 });
251
252
252 $("#next_commit_link").on('click', function(e) {
253 $("#next_commit_link").on('click', function(e) {
253 var data = $(this).data();
254 var data = $(this).data();
254 curState.commit_id = data.commitId;
255 curState.commit_id = data.commitId;
255 });
256 });
256
257
257 $('#at_rev').on("keypress", function(e) {
258 $('#at_rev').on("keypress", function(e) {
258 /* ENTER PRESSED */
259 /* ENTER PRESSED */
259 if (e.keyCode === 13) {
260 if (e.keyCode === 13) {
260 var rev = $('#at_rev').val();
261 var rev = $('#at_rev').val();
261 // explicit reload page here. with pjax entering bad input
262 // explicit reload page here. with pjax entering bad input
262 // produces not so nice results
263 // produces not so nice results
263 window.location = pyroutes.url('repo_files',
264 window.location = pyroutes.url('repo_files',
264 {'repo_name': templateContext.repo_name,
265 {'repo_name': templateContext.repo_name,
265 'commit_id': rev, 'f_path': state.f_path});
266 'commit_id': rev, 'f_path': state.f_path});
266 }
267 }
267 });
268 });
268 }
269 }
269 };
270 };
270
271
271 var pjaxTimeout = 5000;
272 var pjaxTimeout = 5000;
272
273
273 $(document).pjax(".pjax-link", "#pjax-container", {
274 $(document).pjax(".pjax-link", "#pjax-container", {
274 "fragment": "#pjax-content",
275 "fragment": "#pjax-content",
275 "maxCacheLength": 1000,
276 "maxCacheLength": 1000,
276 "timeout": pjaxTimeout
277 "timeout": pjaxTimeout
277 });
278 });
278
279
279 // define global back/forward states
280 // define global back/forward states
280 var isPjaxPopState = false;
281 var isPjaxPopState = false;
281 $(document).on('pjax:popstate', function() {
282 $(document).on('pjax:popstate', function() {
282 isPjaxPopState = true;
283 isPjaxPopState = true;
283 });
284 });
284
285
285 $(document).on('pjax:end', function(xhr, options) {
286 $(document).on('pjax:end', function(xhr, options) {
286 if (isPjaxPopState) {
287 if (isPjaxPopState) {
287 isPjaxPopState = false;
288 isPjaxPopState = false;
288 callbacks();
289 callbacks();
289 _NODEFILTER.resetFilter();
290 _NODEFILTER.resetFilter();
290 }
291 }
291
292
292 // run callback for tracking if defined for google analytics etc.
293 // run callback for tracking if defined for google analytics etc.
293 // this is used to trigger tracking on pjax
294 // this is used to trigger tracking on pjax
294 if (typeof window.rhodecode_statechange_callback !== 'undefined') {
295 if (typeof window.rhodecode_statechange_callback !== 'undefined') {
295 var state = getState('statechange');
296 var state = getState('statechange');
296 rhodecode_statechange_callback(state.url, null)
297 rhodecode_statechange_callback(state.url, null)
297 }
298 }
298 });
299 });
299
300
300 $(document).on('pjax:success', function(event, xhr, options) {
301 $(document).on('pjax:success', function(event, xhr, options) {
301 if (event.target.id == "file_history_container") {
302 if (event.target.id == "file_history_container") {
302 $('#file_history_overview').hide();
303 $('#file_history_overview').hide();
303 $('#file_history_overview_full').show();
304 $('#file_history_overview_full').show();
304 timeagoActivate();
305 timeagoActivate();
305 } else {
306 } else {
306 callbacks();
307 callbacks();
307 }
308 }
308 });
309 });
309
310
310 $(document).ready(function() {
311 $(document).ready(function() {
311 callbacks();
312 callbacks();
312 var search_GET = "${request.GET.get('search','')}";
313 var search_GET = "${request.GET.get('search','')}";
313 if (search_GET === "1") {
314 if (search_GET === "1") {
314 _NODEFILTER.initFilter();
315 _NODEFILTER.initFilter();
315 }
316 }
316 });
317 });
317
318
318 </script>
319 </script>
319
320
320 </%def>
321 </%def>
@@ -1,55 +1,49 b''
1 <%def name="title(*args)">
1 <%def name="title(*args)">
2 ${_('%s Files') % c.repo_name}
2 ${_('{} Files').format(c.repo_name)}
3 %if hasattr(c,'file'):
3 %if hasattr(c,'file'):
4 &middot; ${h.safe_unicode(c.file.path) or '\\'}
4 &middot; ${(h.safe_unicode(c.file.path) or '\\')}
5 %endif
5 %endif
6
6
7 %if c.rhodecode_name:
7 %if c.rhodecode_name:
8 &middot; ${h.branding(c.rhodecode_name)}
8 &middot; ${h.branding(c.rhodecode_name)}
9 %endif
9 %endif
10 </%def>
10 </%def>
11
11
12 <div id="pjax-content" data-title="${self.title()}">
12 <div id="pjax-content" data-title="${self.title()}">
13 <script>
14 // set the pageSource variable
15 var fileSourcePage = ${c.file_source_page};
16 </script>
17
13 <div class="summary-detail">
18 <div class="summary-detail">
14 <div class="summary-detail-header">
19 <div class="summary-detail-header">
15 <div class="breadcrumbs files_location">
20 <div class="breadcrumbs files_location">
16 <h4>
21 <h4>
17 ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path)}
22 ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path)}
18 %if c.annotate:
23 %if c.annotate:
19 - ${_('annotation')}
24 - ${_('annotation')}
20 %endif
25 %endif
21 </h4>
26 </h4>
22 </div>
27 </div>
23 <div class="btn-collapse" data-toggle="summary-details">
28 <div class="btn-collapse" data-toggle="summary-details">
24 ${_('Show More')}
29 ${_('Show More')}
25 </div>
30 </div>
26 </div><!--end summary-detail-header-->
31 </div><!--end summary-detail-header-->
27
32
28 % if c.file.is_submodule():
33 % if c.file.is_submodule():
29 <span class="submodule-dir">Submodule ${h.escape(c.file.name)}</span>
34 <span class="submodule-dir">Submodule ${h.escape(c.file.name)}</span>
30 % elif c.file.is_dir():
35 % elif c.file.is_dir():
31 <%include file='file_tree_detail.mako'/>
36 <%include file='files_tree_header.mako'/>
32 % else:
37 % else:
33 <%include file='files_detail.mako'/>
38 <%include file='files_source_header.mako'/>
34 % endif
39 % endif
35
40
36 </div> <!--end summary-detail-->
41 </div> <!--end summary-detail-->
37 <script>
42
38 // set the pageSource variable
39 var fileSourcePage = ${c.file_source_page};
40 </script>
41 % if c.file.is_dir():
43 % if c.file.is_dir():
42 <div id="commit-stats" class="sidebar-right">
43 <%include file='file_tree_author_box.mako'/>
44 </div>
45
46 <%include file='files_browser.mako'/>
44 <%include file='files_browser.mako'/>
47 % else:
45 % else:
48 <div id="file_authors" class="sidebar-right">
49 <%include file='file_authors_box.mako'/>
50 </div>
51
52 <%include file='files_source.mako'/>
46 <%include file='files_source.mako'/>
53 % endif
47 % endif
54
48
55 </div> No newline at end of file
49 </div>
@@ -1,69 +1,85 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="file_base" file="/files/base.mako"/>
2 <%namespace name="file_base" file="/files/base.mako"/>
2
3
3 <div class="fieldset collapsable-content no-hide" data-toggle="summary-details">
4 <div class="fieldset collapsable-content no-hide" data-toggle="summary-details">
4 <div class="left-label">
5 <div class="left-label">
5 ${_('Commit Description')}:
6 ${_('Commit Description')}:
6 </div>
7 </div>
7 <div class="commit right-content truncate-wrap">${h.urlify_commit_message(h.chop_at_smart(c.commit.message, '\n', suffix_if_chopped='...'), c.repo_name)}</div>
8 <div class="commit right-content truncate-wrap">${h.urlify_commit_message(h.chop_at_smart(c.commit.message, '\n', suffix_if_chopped='...'), c.repo_name)}</div>
8 </div>
9 </div>
9
10
10 <div class="fieldset collapsable-content" data-toggle="summary-details">
11 <div class="fieldset collapsable-content" data-toggle="summary-details">
11 <div class="left-label">
12 <div class="left-label">
12 ${_('Commit Description')}:
13 ${_('Commit Description')}:
13 </div>
14 </div>
14 <div class="commit right-content">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div>
15 <div class="commit right-content">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div>
15 </div>
16 </div>
16
17
17
18
18 <div class="fieldset " data-toggle="summary-details">
19 <div class="fieldset " data-toggle="summary-details">
19 <div class="left-label">
20 <div class="left-label">
20 ${_('References')}:
21 ${_('References')}:
21 </div>
22 </div>
22 <div class="right-content">
23 <div class="right-content">
23 <div class="tags tags-main">
24 <div class="tags tags-main">
24 <code><a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a></code>
25 <code><a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a></code>
25 ${file_base.refs(c.commit)}
26 ${file_base.refs(c.commit)}
26 </div>
27 </div>
27 </div>
28 </div>
28 </div>
29 </div>
29
30
30 <div class="fieldset collapsable-content" data-toggle="summary-details">
31 <div class="fieldset collapsable-content" data-toggle="summary-details">
31 <div class="left-label">
32 <div class="left-label">
32 ${_('File last commit')}:
33 ${_('File last commit')}:
33 </div>
34 </div>
34 <div class="right-content">
35 <div class="right-content">
35 <div class="tags">
36 <div class="tags">
36 <code><a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.file_last_commit.raw_id)}">${h.show_id(c.file_last_commit)}</a></code>
37 <code><a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.file_last_commit.raw_id)}">${h.show_id(c.file_last_commit)}</a></code>
37
38
38 ${file_base.refs(c.file_last_commit)}
39 ${file_base.refs(c.file_last_commit)}
39 </div>
40 </div>
40 </div>
41 </div>
41 </div>
42 </div>
42
43
43
44
44 <div class="fieldset collapsable-content" data-toggle="summary-details">
45 <div class="fieldset collapsable-content" data-toggle="summary-details">
45 <div class="left-label">
46 <div class="left-label">
46 ${_('Show/Diff file')}:
47 ${_('Show/Diff file')}:
47 </div>
48 </div>
48 <div class="right-content">
49 <div class="right-content">
49 ${h.hidden('diff1')}
50 ${h.hidden('diff1')}
50 ${h.hidden('diff2',c.commit.raw_id)}
51 ${h.hidden('diff2',c.commit.raw_id)}
51 ${h.hidden('annotate', c.annotate)}
52 ${h.hidden('annotate', c.annotate)}
52 </div>
53 </div>
53 </div>
54 </div>
54
55
55
56
56 <div class="fieldset collapsable-content" data-toggle="summary-details">
57 <div class="fieldset collapsable-content" data-toggle="summary-details">
57 <div class="left-label">
58 <div class="left-label">
58 ${_('Action')}:
59 ${_('Action')}:
59 </div>
60 </div>
60 <div class="right-content">
61 <div class="right-content">
61 ${h.submit('diff_to_commit',_('Diff to Commit'),class_="btn disabled",disabled="true")}
62 ${h.submit('diff_to_commit',_('Diff to Commit'),class_="btn disabled",disabled="true")}
62 ${h.submit('show_at_commit',_('Show at Commit'),class_="btn disabled",disabled="true")}
63 ${h.submit('show_at_commit',_('Show at Commit'),class_="btn disabled",disabled="true")}
63 </div>
64 </div>
64 </div>
65 </div>
65
66
67 <div class="fieldset collapsable-content" data-toggle="summary-details">
68 <div class="left-label" id="file_authors_title">
69 % if c.file_author:
70 ${_('Last Author')}
71 % else:
72 ${h.literal(_ungettext(u'File Author (%s)',u'File Authors (%s)',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }
73 % endif
74 <a href="#" id="show_authors" class="action_link">${_('Show All')}</a>
75 </div>
76 <div class="right-content" id="file_authors">
77 ## loads single author, or ALL
78 <%include file='file_authors_box.mako'/>
79 </div>
80 </div>
81
66
82
67 <script>
83 <script>
68 collapsableContent();
84 collapsableContent();
69 </script> No newline at end of file
85 </script>
@@ -1,37 +1,45 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="file_base" file="/files/base.mako"/>
2 <%namespace name="file_base" file="/files/base.mako"/>
2
3
3 <div class="fieldset collapsable-content no-hide" data-toggle="summary-details">
4 <div class="fieldset collapsable-content no-hide" data-toggle="summary-details">
4 <div class="left-label">
5 <div class="left-label">
5 ${_('Description')}:
6 ${_('Description')}:
6 </div>
7 </div>
7 <div class="commit right-content truncate-wrap">${h.urlify_commit_message(h.chop_at_smart(c.commit.message, '\n', suffix_if_chopped='...'), c.repo_name)}</div>
8 <div class="commit right-content truncate-wrap">${h.urlify_commit_message(h.chop_at_smart(c.commit.message, '\n', suffix_if_chopped='...'), c.repo_name)}</div>
8 </div>
9 </div>
9
10
10 <div class="fieldset collapsable-content" data-toggle="summary-details">
11 <div class="fieldset collapsable-content" data-toggle="summary-details">
11 <div class="left-label">
12 <div class="left-label">
12 ${_('Description')}:
13 ${_('Description')}:
13 </div>
14 </div>
14 <div class="commit right-content">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div>
15 <div class="commit right-content">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div>
15 </div>
16 </div>
16
17
17
18
19 <div class="fieldset">
18 <div class="fieldset">
20 <div class="left-label">
19 <div class="left-label">
21 ${_('References')}:
20 ${_('References')}:
22 </div>
21 </div>
23 <div class="right-content">
22 <div class="right-content">
24 <div class="tags">
23 <div class="tags">
25 <code>
24 <code>
26 <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a>
25 <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a>
27 </code>
26 </code>
28
27
29 ${file_base.refs(c.commit)}
28 ${file_base.refs(c.commit)}
30 </div>
29 </div>
31 </div>
30 </div>
32 </div>
31 </div>
33
32
33 <div class="fieldset">
34 <div class="left-label">
35 ${_('Commit Author')}:
36 </div>
37 <div class="right-content">
38 ${base.gravatar_with_user(c.commit.author)}
39 <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div>
40 </div>
41 </div>
34
42
35 <script>
43 <script>
36 collapsableContent();
44 collapsableContent();
37 </script>
45 </script>
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now