Changeset - 664cc7341278
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 16 years ago 2010-05-21 02:10:33
marcin@python-works.com
fixed repo switcher for easier switches. And took repo list from general cache
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
pylons_app/templates/base/base.html
Show inline comments
 
@@ -62,27 +62,27 @@
 
			YAHOO.util.Event.addListener('repos_list','change',function(e){
 
	            var wa = YAHOO.util.Dom.get('repos_list').value;
 
	        	
 
	            var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
 
		        window.location = url;
 
			})
 
           });
 
       	</script>
 
        <ul class="page-nav">
 
			<li>
 
				<a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
 
				<div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px">
 
					<select id="repos_list">
 
					%for repo in c.repo_list:
 
						<option value="${repo}">${repo}</option>
 
					<select id="repos_list" size="=10">
 
					%for repo in c.cached_repo_list:
 
						<option value="${repo['name']}">${repo['name']}</option>
 
					%endfor
 
					</select>
 
				</div>			
 
			</li>
 
			<%def name="is_current(selected)">
 
				<%
 
					if selected == current:
 
						return 'class="current"'
 
				%>
 
			</%def>
 
            <li ${is_current('summary')|n}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
 
            <li ${is_current('shortlog')|n}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
0 comments (0 inline, 0 general)