diff pylons_app/templates/base/base.html @ 373:3171614c0067

Added permissions check on repo switcher, and cached that for super short cache. repo switcher css updates
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 28 Jul 2010 02:25:47 +0200
parents 5cd6616b8673
children ca54622e39a1
line wrap: on
line diff
--- a/pylons_app/templates/base/base.html	Wed Jul 28 01:52:12 2010 +0200
+++ b/pylons_app/templates/base/base.html	Wed Jul 28 02:25:47 2010 +0200
@@ -91,15 +91,13 @@
                     }
                     else{
                         YAHOO.util.Dom.setStyle('switch_repos','display','');
-                        //YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
-                        //YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5');
                         YAHOO.util.Dom.addClass('repo_switcher','selected');
                     }
                     });
                 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);
+                    var url = "${h.url('summary_home',repo_name='__REPO__')}".replace('__REPO__',wa);
                     window.location = url;
                 })
                });
@@ -115,9 +113,9 @@
                     </span>
                     <span>&darr;</span>					
 					</a>
-					<div id="switch_repos" style="display:none;position: absolute;height: 25px;z-index: 1">
-						<select id="repos_list" size="=10" style="min-width: 150px">
-						%for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()):
+					<div id="switch_repos" style="display:none;">
+						<select id="repos_list" size="10">
+						%for repo in c.repo_switcher_list:
 							<option value="${repo}">${repo}</option>
 						%endfor
 						</select>