From 10b4e2578fcfe1e5deab3271988211144fe3d9cb Mon Sep 17 00:00:00 2001 From: Brian R Zaik Date: Sat, 24 Apr 2010 15:01:37 -0400 Subject: [PATCH] Cleaned up the Table View a lot --- app/views/categories/show.html.erb | 111 +++++++++++++++------------- app/views/documents/_grid.html.erb | 2 +- app/views/documents/_table.html.erb | 26 +++---- app/views/documents/show.html.erb | 2 + public/stylesheets/base.css | 56 ++++++++------ 5 files changed, 106 insertions(+), 91 deletions(-) diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb index fa97071..d9a09c2 100644 --- a/app/views/categories/show.html.erb +++ b/app/views/categories/show.html.erb @@ -2,62 +2,71 @@ <% content_for :meta_tags, meta_tags(@category.name, @category.description, "icons/icon_folder.png", auto_discovery_link_tag(:rss, {:format => :rss})) %> <% content_for :background_img, background_img(@category) %> <% my_ancestors = @category.ancestors %> + +

-
-

-<% if !@category.private %> -<%= image_tag("icons/eye_icon.png", :alt => "Public", :title => "This category is visible to everyone") %> -<% else %> -<%= image_tag("icons/noeye_icon.png", :alt => "Private", :title => "This category is invisible to others") %> -<% end %> -<% if @category.writable %> -<%= image_tag("icons/write_icon.png", :alt => "Editable", :title => "Anyone can edit this category or add docs") %> -<% else %> -<%= image_tag("icons/nowrite_icon.png", :alt => "Not Editable", :title => "Nobody else can edit this category or add docs") %> -<% end %> -

-
-<%=h @category.name %> - -<%=h @category.description %> -
-<% if admin_logged_in? || (logged_in? && @category.allowed_to_save) %> -<%= link_to 'Edit', edit_category_path(@category), :class => 'edit-link' %> -  -<%= link_to 'Remove', category_path(@category), :confirm => 'Are you sure you want to remove this category?', :method => :delete, :class => 'cancel-link' %> -<% end %> -
+
+

+ <% if !@category.private %> + <%= image_tag("icons/eye_icon.png", :alt => "Public", :title => "This category is visible to everyone") %> + <% else %> + <%= image_tag("icons/noeye_icon.png", :alt => "Private", :title => "This category is invisible to others") %> + <% end %> + <% if @category.writable %> + <%= image_tag("icons/write_icon.png", :alt => "Editable", :title => "Anyone can edit this category or add docs") %> + <% else %> + <%= image_tag("icons/nowrite_icon.png", :alt => "Not Editable", :title => "Nobody else can edit this category or add docs") %> + <% end %> +

+
+ + <%=h @category.name %> + + + <%=h @category.description %> +
+ <% if admin_logged_in? || (logged_in? && @category.allowed_to_save) %> + <%= link_to 'Edit', edit_category_path(@category), :class => 'edit-link' %> +   + <%= link_to 'Remove', category_path(@category), :confirm => 'Are you sure you want to remove this category?', :method => :delete, :class => 'cancel-link' %> + <% end %> +

+
<%= image_tag("bl.png", :alt => "") %>
+
+
-<% if !@category.children.empty? || (logged_in? && @category.allowed_to_save) %> -

Sub-Categories <%= link_to 'Add', new_category_path(:parent_id => @category.id), :class => "link-button" if (logged_in? && @category.allowed_to_save) %>

- -
-<% end %> -
-

Documents<%= link_to 'Add', new_document_path(:category_id => @category.id), :class => "link-button" if (logged_in? && @category.allowed_to_save) %>

-
- <%= render :partial => 'documents/' + @doc_display, :locals => {:documents => @docs} %> -
-
+ <% if !@category.children.empty? || (logged_in? && @category.allowed_to_save) %> +

Sub-Categories <%= link_to 'Add', new_category_path(:parent_id => @category.id), :class => "link-button" if (logged_in? && @category.allowed_to_save) %>

+ +
+ <% end %> + +
+ +

Documents<%= link_to 'Add', new_document_path(:category_id => @category.id), :class => "link-button" if (logged_in? && @category.allowed_to_save) %>

+
+ <%= render :partial => 'documents/' + @doc_display, :locals => {:documents => @docs} %> +
+
diff --git a/app/views/documents/_grid.html.erb b/app/views/documents/_grid.html.erb index 49b4adc..53d3b06 100644 --- a/app/views/documents/_grid.html.erb +++ b/app/views/documents/_grid.html.erb @@ -1,4 +1,4 @@ -<%= link_to 'View Table', category_path(:type => 'table'), :class => "link-button update_holder" %> +<%= link_to 'View Table', category_path(:type => 'table', :anchor => "doclist"), :class => "link-button update_holder" %>