diff options
| -rw-r--r-- | app/views/nodes/index.html.erb | 16 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 53 |
2 files changed, 59 insertions, 10 deletions
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index be63de3..b29b65d 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | <div id="subnavigation"> | 1 | <% content_for :subnavigation do %> |
| 2 | <%= link_to 'Create', new_node_path %> | 2 | <%= link_to 'Create', new_node_path %> |
| 3 | </div> | 3 | <% end %> |
| 4 | <h1>Nodes</h1> | 4 | <h1>Nodes</h1> |
| 5 | 5 | ||
| 6 | <%= will_paginate @nodes %> | 6 | <%= will_paginate @nodes %> |
| 7 | <p> | 7 | <p> |
| 8 | <table id="node_table"> | 8 | <table id="node_table"> |
| 9 | <tr class="table_headers"> | 9 | <tr class="header"> |
| 10 | <th class="node_id">ID</th> | 10 | <th class="node_id">ID</th> |
| 11 | <th class="title">Title</th> | 11 | <th class="title">Title</th> |
| 12 | <th class="actions">Actions</th> | 12 | <th class="actions">Actions</th> |
| @@ -17,12 +17,11 @@ | |||
| 17 | <tr class="<%= cycle("even", "odd") %>"> | 17 | <tr class="<%= cycle("even", "odd") %>"> |
| 18 | <td><%= node.id %></td> | 18 | <td><%= node.id %></td> |
| 19 | <td class="title"> | 19 | <td class="title"> |
| 20 | <h4><%= title_for_node node %></h4> | 20 | <h4><%= link_to title_for_node(node), edit_node_path(node) %></h4> |
| 21 | <p><%= node.unique_name %></p> | 21 | <p><%= link_to_path(node.unique_name, node.unique_path) %></p> |
| 22 | </td> | 22 | </td> |
| 23 | <td class="actions"> | 23 | <td class="actions"> |
| 24 | <%= link_to 'Show', node_path(node) %> | 24 | <%= link_to 'Preview', node_path(node) %> |
| 25 | <%= link_to 'Edit', edit_node_path(node) %> | ||
| 26 | <%= link_to 'Revisions', :controller => :revisions, :action => :show, :id => node.id %> | 25 | <%= link_to 'Revisions', :controller => :revisions, :action => :show, :id => node.id %> |
| 27 | <%# link_to 'Destroy', node, :method => :delete, :confirm => "Are you sure you want to delete this node?" %> | 26 | <%# 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?" %> | 27 | <%= link_to 'Unlock', unlock_node_path(node), :method => :put, :confirm => "Are you sure you want to unlock?" %> |
| @@ -39,6 +38,3 @@ | |||
| 39 | </p> | 38 | </p> |
| 40 | <%= will_paginate @nodes %> | 39 | <%= will_paginate @nodes %> |
| 41 | 40 | ||
| 42 | <% content_for :menu do %> | ||
| 43 | <%= link_to 'Create', new_node_path %> | ||
| 44 | <% end %> \ No newline at end of file | ||
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index a23eea5..802ad31 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | /* Layout */ | ||
| 2 | |||
| 1 | body { | 3 | body { |
| 2 | font-family: Helvetica, Arial, sans-serif; | 4 | font-family: Helvetica, Arial, sans-serif; |
| 3 | font-size: 12px; | 5 | font-size: 12px; |
| @@ -8,6 +10,10 @@ a { | |||
| 8 | text-decoration: none; | 10 | text-decoration: none; |
| 9 | } | 11 | } |
| 10 | 12 | ||
| 13 | a:hover { | ||
| 14 | color: #ff9600; | ||
| 15 | } | ||
| 16 | |||
| 11 | th { | 17 | th { |
| 12 | text-transform: lowercase; | 18 | text-transform: lowercase; |
| 13 | } | 19 | } |
| @@ -17,6 +23,14 @@ th { | |||
| 17 | width: 899px; | 23 | width: 899px; |
| 18 | } | 24 | } |
| 19 | 25 | ||
| 26 | /* Pagination */ | ||
| 27 | |||
| 28 | div.pagination span.current, div.pagination a:hover { | ||
| 29 | color: #ff9600; | ||
| 30 | } | ||
| 31 | |||
| 32 | /* Styles */ | ||
| 33 | |||
| 20 | .right { | 34 | .right { |
| 21 | text-align: right; | 35 | text-align: right; |
| 22 | } | 36 | } |
| @@ -57,6 +71,45 @@ th { | |||
| 57 | background-color: #000000; | 71 | background-color: #000000; |
| 58 | } | 72 | } |
| 59 | 73 | ||
| 74 | /* Nodes */ | ||
| 75 | |||
| 76 | table#node_table { | ||
| 77 | width: 899px; | ||
| 78 | border-collapse: collapse; | ||
| 79 | } | ||
| 80 | |||
| 81 | table#node_table tr { | ||
| 82 | height: 65px; | ||
| 83 | } | ||
| 84 | |||
| 85 | table#node_table th.title { | ||
| 86 | width: 450px; | ||
| 87 | } | ||
| 88 | |||
| 89 | table#node_table tr.header { | ||
| 90 | height: 20px; | ||
| 91 | text-align: left; | ||
| 92 | } | ||
| 93 | |||
| 94 | table#node_table td { | ||
| 95 | padding-top: 0px; | ||
| 96 | padding-bottom: 0px; | ||
| 97 | padding-right: 25px; | ||
| 98 | padding-left: 0px; | ||
| 99 | } | ||
| 100 | |||
| 101 | table#node_table tr.header:hover { | ||
| 102 | background-color: #ffffff; | ||
| 103 | } | ||
| 104 | |||
| 105 | table#node_table tr:hover { | ||
| 106 | background-color: #f1f1f1; | ||
| 107 | } | ||
| 108 | |||
| 109 | table#node_table .actions { | ||
| 110 | text-transform: lowercase; | ||
| 111 | } | ||
| 112 | |||
| 60 | /* Revisions */ | 113 | /* Revisions */ |
| 61 | 114 | ||
| 62 | table#revisions { | 115 | table#revisions { |
