[38295] branches/gsoc08-mpwa/app/views/tags
digx at macports.org
digx at macports.org
Mon Jul 14 21:45:01 PDT 2008
Revision: 38295
http://trac.macosforge.org/projects/macports/changeset/38295
Author: digx at macports.org
Date: 2008-07-14 21:45:01 -0700 (Mon, 14 Jul 2008)
Log Message:
-----------
Update to tags pages for new acts_as_taggable_on plugin
Modified Paths:
--------------
branches/gsoc08-mpwa/app/views/tags/index.html.erb
branches/gsoc08-mpwa/app/views/tags/show.html.erb
Modified: branches/gsoc08-mpwa/app/views/tags/index.html.erb
===================================================================
--- branches/gsoc08-mpwa/app/views/tags/index.html.erb 2008-07-15 04:44:42 UTC (rev 38294)
+++ branches/gsoc08-mpwa/app/views/tags/index.html.erb 2008-07-15 04:45:01 UTC (rev 38295)
@@ -6,7 +6,7 @@
<% for row in columnize(@tags, 6) %>
<tr>
<% for tag in row %>
- <td><%= link_to tag.name, tag %></td>
+ <td><%= link_to tag.name, tag if tag %></td>
<% end %>
</tr>
<% end %>
Modified: branches/gsoc08-mpwa/app/views/tags/show.html.erb
===================================================================
--- branches/gsoc08-mpwa/app/views/tags/show.html.erb 2008-07-15 04:44:42 UTC (rev 38294)
+++ branches/gsoc08-mpwa/app/views/tags/show.html.erb 2008-07-15 04:45:01 UTC (rev 38295)
@@ -1,25 +1,29 @@
-<% @page_title = "tag #{@tag.name}" %>
+<% @page_title = "tag #{h @tag.name}" %>
<h2>Tag: <%= h @tag.name %></h2>
<h4>Ports with this tag</h4>
<table>
- <% for row in columnize(@tag.ports.sort, 4) %>
+ <% for row in columnize(@ports, 4) %>
<tr>
<% for port in row %>
- <td><%= link_to port.name, :controller => 'port', :action => 'show', :id => port if port %></td>
+ <td><%= link_to port.name, port if port %></td>
<% end %>
</tr>
<% end %>
</table>
+<p><%= will_paginate @ports, :param_name => 'ports_page' %></p>
+
<h4>Port Packages with this tag</h4>
<table>
- <% for row in columnize(@tag.port_pkgs, 4) %>
+ <% for row in columnize(@port_pkgs, 4) %>
<tr>
<% for pkg in row %>
- <td><%= link_to "#{pkg.name} #{pkg.id}", :controller => 'port_pkg', :action => 'show', :id => pkg if pkg %></td>
+ <td><%= link_to "#{pkg.name}", [pkg.port, pkg] if pkg %></td>
<% end %>
</tr>
<% end %>
</table>
+
+<p><%= will_paginate @port_pkgs, :param_name => 'pkgs_page' %></p>
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080714/6f40fb9a/attachment.html
More information about the macports-changes
mailing list