Changeset - 1f28cf5384bf
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 15 years ago 2011-01-14 12:24:57
marcin@python-works.com
Implemented dynamic download links in summary page
2 files changed with 20 insertions and 4 deletions:
0 comments (0 inline, 0 general)
docs/changelog.rst
Show inline comments
 
@@ -19,6 +19,7 @@ news
 
  into clone url
 
- fixed #90 whoosh indexer can index chooses repositories passed in command 
 
  line
 
- added dynamic download links in summary. With quick branch/tag selection
 

	
 
fixes
 
-----
rhodecode/templates/summary/summary.html
Show inline comments
 
@@ -130,14 +130,14 @@
 
			  <div class="input-short">
 
		        
 
		        ${h.select('download_options','tip',c.download_options)}
 

	
 
		        %for cnt,archive in enumerate(c.repo_info._get_archives()):
 
		             %if cnt >=1:
 
		             |
 
		             %endif
 
		             ${h.link_to(archive['type'],
 
		             <span class="tooltip" title="${_('Download %s as %s') %('tip',archive['type'])}" 
 
		                  id="${archive['type']+'_link'}">${h.link_to(archive['type'],
 
		                h.url('files_archive_home',repo_name=c.repo_info.name,
 
		                fname='tip'+archive['extension']),class_="archive_icon")}
 
		                fname='tip'+archive['extension']),class_="archive_icon")}</span>
 
		        %endfor
 
			  </div>
 
			 </div>
 
@@ -240,7 +240,22 @@
 
			  	
 
                
 
                YUE.on('download_options','change',function(e){
 
                    var new_cs = e.target.options[e.target.selectedIndex].value;
 
                 var new_cs = e.target.options[e.target.selectedIndex];
 
                 var tmpl_links = {}
 
                 %for cnt,archive in enumerate(c.repo_info._get_archives()):
 
                	 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
 
                        h.url('files_archive_home',repo_name=c.repo_info.name,
 
                        fname='__CS__'+archive['extension']),class_="archive_icon")}';
 
                 %endfor
 
                
 
                 
 
                 for(k in tmpl_links){
 
                	 var s = YUD.get(k+'_link')
 
                	 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__',archive['type'])}";
 
                	 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text)
 
                	 s.innerHTML = tmpl_links[k].replace('__CS__',new_cs.value);
 
                 }
 
                 
 
                })
 
                	
 
			  	</script>    				
0 comments (0 inline, 0 general)