Commit 6be53feb791a9afb90c22ee6937be47592e629bc

Authored by AntonioTerceiro
1 parent b2833502

ActionItem158: making CMS look better


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1791 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/views/cms/view.rhtml
@@ -17,17 +17,16 @@ @@ -17,17 +17,16 @@
17 <%= lightbox_button('new', _('New article'), :action => 'new', :parent_id => parent_id) %> 17 <%= lightbox_button('new', _('New article'), :action => 'new', :parent_id => parent_id) %>
18 <% end %> 18 <% end %>
19 19
20 -<table width='100%'> 20 +<table class='cms-articles'>
21 21
22 - <%# folders %> 22 + <%# header %>
23 <tr> 23 <tr>
24 - <th colspan='2'>  
25 - <%= _('Folders') %>  
26 - </th> 24 + <th><%= _('Name') %></th>
  25 + <th><%= _('Type') %></th>
  26 + <th><%= _('Actions') %></th>
27 </tr> 27 </tr>
28 - <% if @folders.empty? %>  
29 - <tr><td colspan='2' align='center'><em><%= _('None') %></em></td></tr>  
30 - <% end %> 28 +
  29 + <%# folders %>
31 <% for folder in @folders %> 30 <% for folder in @folders %>
32 <tr> 31 <tr>
33 <td> 32 <td>
@@ -35,6 +34,9 @@ @@ -35,6 +34,9 @@
35 <%= link_to folder.name, :action => 'view', :id => folder.id %> 34 <%= link_to folder.name, :action => 'view', :id => folder.id %>
36 </td> 35 </td>
37 <td> 36 <td>
  37 + <%= folder.class.short_description %>
  38 + </td>
  39 + <td>
38 <%= link_to _('Properties'), :action => 'edit', :id => folder.id %> 40 <%= link_to _('Properties'), :action => 'edit', :id => folder.id %>
39 <%= link_to _('View'), folder.url %> 41 <%= link_to _('View'), folder.url %>
40 </td> 42 </td>
@@ -42,11 +44,13 @@ @@ -42,11 +44,13 @@
42 <% end %> 44 <% end %>
43 45
44 <%# non-folder subitems %> 46 <%# non-folder subitems %>
45 - <tr>  
46 - <th colspan='2'>  
47 - <%= _('Articles') %>  
48 - </th>  
49 - </tr> 47 + <% unless @folders.empty? %>
  48 + <tr>
  49 + <td colspan='3'>
  50 + &nbsp;
  51 + </td>
  52 + </tr>
  53 + <% end %>
50 <% if @subitems.empty? %> 54 <% if @subitems.empty? %>
51 <tr><td colspan='2' align='center'><em><%= _('None') %></em></td></tr> 55 <tr><td colspan='2' align='center'><em><%= _('None') %></em></td></tr>
52 <% end %> 56 <% end %>
@@ -54,7 +58,10 @@ @@ -54,7 +58,10 @@
54 <tr> 58 <tr>
55 <td> 59 <td>
56 <%= image_tag(icon_for_article(item)) %> 60 <%= image_tag(icon_for_article(item)) %>
57 - <%= link_to item.name, :id => item.id %> 61 + <%= link_to item.name, :action => 'edit', :id => item.id %>
  62 + </td>
  63 + <td>
  64 + <%= item.class.short_description %>
58 </td> 65 </td>
59 <td> 66 <td>
60 <%= link_to _('Edit'), :action => 'edit', :id => item.id %> 67 <%= link_to _('Edit'), :action => 'edit', :id => item.id %>
public/stylesheets/common.css
@@ -217,6 +217,13 @@ th { @@ -217,6 +217,13 @@ th {
217 font-weight: bold; 217 font-weight: bold;
218 } 218 }
219 219
  220 +table.cms-articles {
  221 + width: 100%;
  222 +}
  223 +table.cms-articles th, table.cms-articles td {
  224 + border: 1px solid #e0e0e0;
  225 +}
  226 +
220 /* for fields with auto-completion */ 227 /* for fields with auto-completion */
221 div.auto-complete { 228 div.auto-complete {
222 background: #729FCF; 229 background: #729FCF;