diff options
| author | hukl <contact@smyck.org> | 2009-03-21 15:00:50 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-21 15:00:50 +0100 |
| commit | 40bdc8384a33019c1771fbad888525505f61aa7c (patch) | |
| tree | 2fcb3593548c42f1a34b0b659d7ca7de09222ecc | |
| parent | cc39dc70e4c03e72bb9d72f3cb0d49ea165e303c (diff) | |
cleaned up the node index view
| -rw-r--r-- | app/views/nodes/index.html.erb | 27 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 80 |
2 files changed, 84 insertions, 23 deletions
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index ad60498..103617c 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb | |||
| @@ -6,33 +6,32 @@ | |||
| 6 | <%= will_paginate @nodes %> | 6 | <%= will_paginate @nodes %> |
| 7 | <p> | 7 | <p> |
| 8 | <table id="node_table"> | 8 | <table id="node_table"> |
| 9 | <tr> | 9 | <tr class="table_headers"> |
| 10 | <th class="node_id">ID</th> | ||
| 10 | <th class="title">Title</th> | 11 | <th class="title">Title</th> |
| 11 | <th class="path">Path</th> | ||
| 12 | <th class="actions">Actions</th> | 12 | <th class="actions">Actions</th> |
| 13 | <th class="editor">Locked by</th> | 13 | <th class="editor">Locked by</th> |
| 14 | <th class="revision">Rev.</th> | 14 | <th class="revision">Rev.</th> |
| 15 | </tr> | 15 | </tr> |
| 16 | <% @nodes.each do |node| %> | 16 | <% @nodes.each do |node| %> |
| 17 | <tr class="<%= cycle("even", "odd") %>"> | 17 | <tr class="<%= cycle("even", "odd") %>"> |
| 18 | <td> | 18 | <td><%= node.id %></td> |
| 19 | <strong> | 19 | <td class="title"> |
| 20 | <%= title_for_node node %> | 20 | <h4><%= title_for_node node %></h4> |
| 21 | </strong> | 21 | <p><%= node.unique_name %></p> |
| 22 | </td> | 22 | </td> |
| 23 | <td><%= node.unique_name %></td> | 23 | <td class="actions"> |
| 24 | <td> | 24 | <%= link_to 'Show', node_path(node) %> |
| 25 | <%= link_to 'Show', node_path(node) %> | 25 | <%= link_to 'Edit', edit_node_path(node) %> |
| 26 | <%= link_to 'Edit', edit_node_path(node) %> | 26 | <%= link_to 'Revisions', :controller => :revisions, :action => :show, :id => node.id %> |
| 27 | <%= link_to 'Revision', :controller => :revisions, :action => :show, :id => node.id %> | 27 | <%# link_to 'Destroy', node, :method => :delete, :confirm => "Are you sure you want to delete this node?" %> |
| 28 | <%# link_to 'Destroy', node, :method => :delete, :confirm => "Are you sure you want to delete this node?" %> | 28 | <%= link_to 'Unlock', unlock_node_path(node), :method => :put, :confirm => "Are you sure you want to unlock?" %> |
| 29 | <%= link_to 'Unlock', unlock_node_path(node), :method => :put, :confirm => "Are you sure you want to unlock?" %> | ||
| 30 | </td> | 29 | </td> |
| 31 | <td> | 30 | <td> |
| 32 | <%= "#{node.draft.user.login}" if node.draft && node.draft.user %> | 31 | <%= "#{node.draft.user.login}" if node.draft && node.draft.user %> |
| 33 | </td> | 32 | </td> |
| 34 | <td> | 33 | <td> |
| 35 | <%= node.pages.length %> | 34 | <%= node.draft ? node.draft.revision : node.head.revision %> |
| 36 | </td> | 35 | </td> |
| 37 | </tr> | 36 | </tr> |
| 38 | <% end %> | 37 | <% end %> |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 49578f0..d2d966f 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | body { | 1 | body { |
| 2 | font-family: Arial, sans-serif; | 2 | font-family: 'Lucida Grande', Arial, sans-serif; |
| 3 | font-size: 10pt; | 3 | font-size: 11px; |
| 4 | } | 4 | } |
| 5 | 5 | ||
| 6 | a { | 6 | a { |
| @@ -10,31 +10,75 @@ a { | |||
| 10 | table {} | 10 | table {} |
| 11 | 11 | ||
| 12 | table#node_table { | 12 | table#node_table { |
| 13 | width: 1000px; | 13 | border-collapse: collapse; |
| 14 | width: 880px; | ||
| 15 | } | ||
| 16 | |||
| 17 | table#node_table tr.table_headers { | ||
| 18 | height: 20px; | ||
| 19 | } | ||
| 20 | |||
| 21 | table#node_table th { | ||
| 22 | padding-left: 15px; | ||
| 23 | } | ||
| 24 | |||
| 25 | table#node_table tr { | ||
| 26 | height: 65px; | ||
| 27 | } | ||
| 28 | |||
| 29 | table#node_table tr.odd:hover, table#node_table tr.even:hover { | ||
| 30 | background-color: #E4F2FD; | ||
| 31 | } | ||
| 32 | |||
| 33 | table#node_table td h4 { | ||
| 34 | margin-top: 0px; | ||
| 35 | margin-bottom: 5px; | ||
| 36 | } | ||
| 37 | |||
| 38 | table#node_table td p { | ||
| 39 | margin-top: 0px; | ||
| 40 | margin-bottom: 0px; | ||
| 41 | } | ||
| 42 | |||
| 43 | table#node_table td a { | ||
| 44 | text-decoration: none; | ||
| 45 | } | ||
| 46 | |||
| 47 | table#node_table td a:hover { | ||
| 48 | text-decoration: underline; | ||
| 49 | } | ||
| 50 | |||
| 51 | tr.even { | ||
| 52 | border: 1px solid #808080; | ||
| 14 | } | 53 | } |
| 15 | 54 | ||
| 16 | tr.odd { | 55 | tr.odd { |
| 17 | background-color: #f1f1f1; | 56 | border: 1px solid #808080; |
| 57 | background-color: #f5f5f5; | ||
| 18 | } | 58 | } |
| 19 | 59 | ||
| 20 | th { | 60 | th { |
| 21 | text-align: left; | 61 | text-align: left; |
| 22 | } | 62 | } |
| 23 | 63 | ||
| 64 | th.node_id { | ||
| 65 | width: 30px; | ||
| 66 | } | ||
| 67 | |||
| 24 | th.title { | 68 | th.title { |
| 25 | width: 370px; | 69 | width: 450px; |
| 26 | } | 70 | } |
| 27 | 71 | ||
| 72 | |||
| 28 | th.path { | 73 | th.path { |
| 29 | width: 300px; | ||
| 30 | } | 74 | } |
| 31 | 75 | ||
| 32 | th.actions { | 76 | th.actions { |
| 33 | width: 180px; | 77 | width: 150px; |
| 34 | } | 78 | } |
| 35 | 79 | ||
| 36 | th.editor { | 80 | th.editor { |
| 37 | width: 120px; | 81 | width: 150px; |
| 38 | } | 82 | } |
| 39 | 83 | ||
| 40 | th.revision { | 84 | th.revision { |
| @@ -42,7 +86,25 @@ th.revision { | |||
| 42 | } | 86 | } |
| 43 | 87 | ||
| 44 | td { | 88 | td { |
| 45 | padding: 3px; | 89 | padding-left: 15px; |
| 90 | padding-right: 0px; | ||
| 91 | } | ||
| 92 | |||
| 93 | td.title { | ||
| 94 | font-size: 11px; | ||
| 95 | } | ||
| 96 | |||
| 97 | td.path { | ||
| 98 | font-size: 11px; | ||
| 99 | } | ||
| 100 | |||
| 101 | td.actions { | ||
| 102 | font-size: 11px; | ||
| 103 | } | ||
| 104 | |||
| 105 | |||
| 106 | td div.actions { | ||
| 107 | padding-top: 5px; | ||
| 46 | } | 108 | } |
| 47 | 109 | ||
| 48 | input[type=text] { | 110 | input[type=text] { |
