myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2386] trunk/app: improved the content type index


From: noreply
Subject: [myexperiment-hackers] [2386] trunk/app: improved the content type index appearance
Date: Fri, 23 Apr 2010 06:05:21 -0400 (EDT)

Revision
2386
Author
dgc
Date
2010-04-23 06:05:20 -0400 (Fri, 23 Apr 2010)

Log Message

improved the content type index appearance

Modified Paths

Diff

Modified: trunk/app/controllers/content_types_controller.rb (2385 => 2386)


--- trunk/app/controllers/content_types_controller.rb	2010-04-23 09:07:02 UTC (rev 2385)
+++ trunk/app/controllers/content_types_controller.rb	2010-04-23 10:05:20 UTC (rev 2386)
@@ -12,7 +12,7 @@
 
     params[:num] = 25 unless params[:num]
 
-    @content_types = ContentType.find(:all,
+    @content_types = ContentType.find(:all, :order => 'title ASC',
         :page => { :size => params[:num], :current => params[:page] })
   end
 

Modified: trunk/app/views/content_types/index.rhtml (2385 => 2386)


--- trunk/app/views/content_types/index.rhtml	2010-04-23 09:07:02 UTC (rev 2385)
+++ trunk/app/views/content_types/index.rhtml	2010-04-23 10:05:20 UTC (rev 2386)
@@ -10,10 +10,25 @@
 
   <%= render :partial => "layouts/paginate", :locals => { :collection => @content_types } %>
 
+  <center>
+    <table class="simple">
+      <thead>
+        <tr>
+          <td>Title</td>
+          <td>Category</td>
+        </tr>
+      </thead>
+      <tbody>
+        <% @content_types.each do |ct| %>
+          <tr>
+            <td><%= link_to(h(ct.title), content_type_path(ct)) %></td>
+            <td><%= visible_name(ct.category) %></td>
+        <% end %>
+      </tbody>
+    </table>
+  </center>
+          
   <ul>
-    <% @content_types.each do |ct| %>
-      <li><%= link_to(h(ct.title), content_type_path(ct)) %></li>
-    <% end %>
   </ul>
 
   <%= render :partial => "layouts/paginate", :locals => { :collection => @content_types } %>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]