changeset 154:085a937368d9

updated erros found in base.html
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 16 May 2010 15:33:21 +0200
parents a5a3bcc5ee89
children 42d916306766
files pylons_app/templates/base/base.html
diffstat 1 files changed, 30 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/templates/base/base.html	Sun May 16 15:06:20 2010 +0200
+++ b/pylons_app/templates/base/base.html	Sun May 16 15:33:21 2010 +0200
@@ -51,29 +51,29 @@
 
 
 <%def name="menu(current)">
+       <script type="text/javascript">
+       	YAHOO.util.Event.onDOMReady(function(){
+			YAHOO.util.Event.addListener('repo_switcher','click',function(){
+				if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
+					YAHOO.util.Dom.setStyle('switch_repos','display','none');
+					YAHOO.util.Dom.setStyle('repo_switcher','background','');
+					YAHOO.util.Dom.removeClass('repo_switcher','selected');
+				}
+				else{
+					YAHOO.util.Dom.setStyle('switch_repos','display','');
+					YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
+					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);
+		        window.location = url;
+			})
+           });
+       	</script>
         <ul class="page-nav">
-        	<script>
-        	YAHOO.util.Event.onDOMReady(function(){
-				YAHOO.util.Event.addListener('repo_switcher','click',function(){
-					if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
-						YAHOO.util.Dom.setStyle('switch_repos','display','none');
-						YAHOO.util.Dom.setStyle('repo_switcher','background','');
-						YAHOO.util.Dom.removeClass('repo_switcher','selected');
-					}
-					else{
-						YAHOO.util.Dom.setStyle('switch_repos','display','');
-						YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
-						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);
-			        window.location = url;
-				})
-            });
-        	</script>
 			<li>
 				<a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
 				<div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px">
@@ -86,18 +86,16 @@
 			</li>
 			<%def name="is_current(selected)">
 				<%
-				if selected == current:
-					return 'current'
-				else:
-					return ''
+					if selected == current:
+						return 'class="current"'
 				%>
 			</%def>
-            <li class="${is_current('summary')}">${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
-            <li class="${is_current('shortlog')}">${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
-			<li class="${is_current('changelog')}">${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>            
-            <li class="${is_current('branches')}">${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
-            <li class="${is_current('tags')}">${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
-            <li class="${is_current('files')}">${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
+            <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>
+			<li ${is_current('changelog')|n}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>            
+            <li ${is_current('branches')|n}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
+            <li ${is_current('tags')|n}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
+            <li ${is_current('files')|n}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
         </ul>
 </%def>