Skip to content

Commit

Permalink
Standardize the resource index views
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfrench committed Jun 28, 2009
1 parent 63e7f5d commit d7fd64b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
7 changes: 3 additions & 4 deletions app/views/admin/layouts/index.html.haml
Expand Up @@ -3,8 +3,7 @@
- top.help_text do
%p
Use layouts to apply a visual look to a Web page. Layouts can contain special tags to include
page content and other elements such as the header or footer. Click on a layout name below to
edit it or click <code>Remove</code> to delete it.
page content and other elements such as the header or footer.

%table#layouts.index{:cellspacing=>"0", :border=>"0", :cellpadding=>"0" }
%thead
Expand All @@ -17,7 +16,7 @@
%th.modify
Modify
%tbody
- unless @layouts.empty?
- if @layouts.any?
- @layouts.each do |layout|
%tr.node.level-1
- render_region :tbody do |tbody|
Expand All @@ -30,7 +29,7 @@
= link_to image('remove', :alt => 'Remove Layout'), remove_admin_layout_url(layout)
- else
%tr
%td.note{:colspan => 2} No layouts exist.
%td.note{:colspan => admin.layout.index.tbody.length} No Layouts

- render_region :bottom do |bottom|
- bottom.new_button do
Expand Down
24 changes: 14 additions & 10 deletions app/views/admin/snippets/index.html.haml
Expand Up @@ -13,16 +13,20 @@
- thead.modify_header do
%th.modify Modify
%tbody
- @snippets.each do |snippet|
%tr.node.level-1
- render_region :tbody do |tbody|
- tbody.title_cell do
%td.snippet
= image('snippet', :alt => 'snippet-icon')
%span= link_to snippet.name, edit_admin_snippet_url(snippet)
- tbody.modify_cell do
%td.remove
= link_to image('remove', :alt => 'Remove Snippet'), remove_admin_snippet_url(snippet)
- if @snippets.any?
- @snippets.each do |snippet|
%tr.node.level-1
- render_region :tbody do |tbody|
- tbody.title_cell do
%td.snippet
= image('snippet', :alt => 'snippet-icon')
%span= link_to snippet.name, edit_admin_snippet_url(snippet)
- tbody.modify_cell do
%td.remove
= link_to image('remove', :alt => 'Remove Snippet'), remove_admin_snippet_url(snippet)
- else
%tr
%td.note{:colspan => admin.snippet.index.tbody.length} No Snippets

- render_region :bottom do |bottom|
- bottom.new_button do
Expand Down

0 comments on commit d7fd64b

Please sign in to comment.