[116852] branches/gsoc11-statistics/stats-server/app/views/layouts/ application.html.erb

cal at macports.org cal at macports.org
Sat Feb 8 08:18:19 PST 2014


Revision: 116852
          https://trac.macports.org/changeset/116852
Author:   cal at macports.org
Date:     2014-02-08 08:18:19 -0800 (Sat, 08 Feb 2014)
Log Message:
-----------
macports stats: add .selected to navigation, add FAQ, Credits

Modified Paths:
--------------
    branches/gsoc11-statistics/stats-server/app/views/layouts/application.html.erb

Modified: branches/gsoc11-statistics/stats-server/app/views/layouts/application.html.erb
===================================================================
--- branches/gsoc11-statistics/stats-server/app/views/layouts/application.html.erb	2014-02-08 16:17:48 UTC (rev 116851)
+++ branches/gsoc11-statistics/stats-server/app/views/layouts/application.html.erb	2014-02-08 16:18:19 UTC (rev 116852)
@@ -25,18 +25,39 @@
 				<dt>Statistics</dt>
 				<dd>
 					<ul>
-						<li><%= link_to "Home", root_path %></li>
-						<li><%= link_to "System", os_statistics_path %></li>
-						<li><%= link_to "Installed Ports", installed_ports_path %></li>
+						<li class="<%= 'selected' if current_page?(root_path) %>">
+							<%= link_to "Home", root_path %>
+						</li>
+						<li class="<%= 'selected' if current_page?(:controller => 'os_statistics') %>">
+							<%= link_to "System Statistics", os_statistics_path %>
+						</li>
+						<li class="<%= 'selected' if current_page?(:controller => 'installed_ports') %>">
+							<%= link_to "Port Statistics", installed_ports_path %>
+						</li>
 					</ul>
 				</dd>
 				<dt>Browse Ports</dt>
 				<dd>
 					<ul>
-						<li><%= link_to "By Category", categories_path %></li>
-						<li><%= link_to "Complete List", ports_path %></li>
+						<li class="<%= 'selected' if current_page?(:controller => 'categories') %>">
+							<%= link_to "By Category", categories_path %>
+						</li>
+						<li class="<%= 'selected' if current_page?(:controller => 'ports') %>">
+							<%= link_to "Complete List", ports_path %>
+						</li>
 					</ul>
 				</dd>
+				<dt>About</dt>
+				<dd>
+					<ul>
+						<li class="<%= 'selected' if current_page?(:controller => 'static', :action => 'faq') %>">
+							<%= link_to "FAQ", :controller => 'static', :action => 'faq'  %>
+						</li>
+						<li class="<%= 'selected' if current_page?(:controller => 'static', :action => 'credits') %>">
+							<%= link_to "Credits", :controller => 'static', :action => 'credits'  %>
+						</li>
+					</ul>
+				</dd>
 			</dl>
 		</div>
 		<div id="content">
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140208/d5bc8a10/attachment-0001.html>


More information about the macports-changes mailing list