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 <%= lightbox_button('new', _('New article'), :action => 'new', :parent_id => parent_id) %>
18 18 <% end %>
19 19  
20   -<table width='100%'>
  20 +<table class='cms-articles'>
21 21  
22   - <%# folders %>
  22 + <%# header %>
23 23 <tr>
24   - <th colspan='2'>
25   - <%= _('Folders') %>
26   - </th>
  24 + <th><%= _('Name') %></th>
  25 + <th><%= _('Type') %></th>
  26 + <th><%= _('Actions') %></th>
27 27 </tr>
28   - <% if @folders.empty? %>
29   - <tr><td colspan='2' align='center'><em><%= _('None') %></em></td></tr>
30   - <% end %>
  28 +
  29 + <%# folders %>
31 30 <% for folder in @folders %>
32 31 <tr>
33 32 <td>
... ... @@ -35,6 +34,9 @@
35 34 <%= link_to folder.name, :action => 'view', :id => folder.id %>
36 35 </td>
37 36 <td>
  37 + <%= folder.class.short_description %>
  38 + </td>
  39 + <td>
38 40 <%= link_to _('Properties'), :action => 'edit', :id => folder.id %>
39 41 <%= link_to _('View'), folder.url %>
40 42 </td>
... ... @@ -42,11 +44,13 @@
42 44 <% end %>
43 45  
44 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 54 <% if @subitems.empty? %>
51 55 <tr><td colspan='2' align='center'><em><%= _('None') %></em></td></tr>
52 56 <% end %>
... ... @@ -54,7 +58,10 @@
54 58 <tr>
55 59 <td>
56 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 65 </td>
59 66 <td>
60 67 <%= link_to _('Edit'), :action => 'edit', :id => item.id %>
... ...
public/stylesheets/common.css
... ... @@ -217,6 +217,13 @@ th {
217 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 227 /* for fields with auto-completion */
221 228 div.auto-complete {
222 229 background: #729FCF;
... ...