##// END OF EJS Templates
download: make use of default landing revision for downloads too.
marcink -
r4412:a05a39ec default
parent child Browse files
Show More
@@ -185,8 +185,10 b''
185 % endif
185 % endif
186 % else:
186 % else:
187 <span class="enabled">
187 <span class="enabled">
188 <a id="archive_link" class="btn btn-small" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}">
188
189 tip.zip
189 <a id="archive_link" class="btn btn-small" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+'.zip')}">
190 <i class="icon-download"></i>
191 ${c.rhodecode_db_repo.landing_ref_name}.zip
190 ## replaced by some JS on select
192 ## replaced by some JS on select
191 </a>
193 </a>
192 </span>
194 </span>
@@ -76,8 +76,8 b''
76
76
77 var initialCommitData = {
77 var initialCommitData = {
78 id: null,
78 id: null,
79 text: 'tip',
79 text: '${c.rhodecode_db_repo.landing_ref_name}',
80 type: 'tag',
80 type: '${c.rhodecode_db_repo.landing_ref_type}',
81 raw_id: null,
81 raw_id: null,
82 files_url: null
82 files_url: null
83 };
83 };
@@ -92,7 +92,8 b''
92 var fname = e.added.raw_id + ext;
92 var fname = e.added.raw_id + ext;
93 var href = pyroutes.url('repo_archivefile', {'repo_name': templateContext.repo_name, 'fname':fname});
93 var href = pyroutes.url('repo_archivefile', {'repo_name': templateContext.repo_name, 'fname':fname});
94 // set new label
94 // set new label
95 $('#archive_link').html('{0}{1}'.format(escapeHtml(e.added.text), ext));
95 var ico = '<i class="icon-download"></i>';
96 $('#archive_link').html(ico+' {0}{1}'.format(escapeHtml(e.added.text), ext));
96
97
97 // set new url to button,
98 // set new url to button,
98 $('#archive_link').attr('href', href)
99 $('#archive_link').attr('href', href)
General Comments 0
You need to be logged in to leave comments. Login now