From 4cd99ee5986ee290f22cd7adeb3e8ed8020bfe7f Mon Sep 17 00:00:00 2001 From: "vit.jonas@gmail.com" Date: Thu, 12 May 2011 07:58:20 +0000 Subject: [PATCH] * organized list entries manipulation icons * organized list styles git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@37 5e329b0b-a2ee-ea63-e329-299493fc886d --- app/views/dmsf/index.html.erb | 88 +++++++++++++++++++++-------------- assets/stylesheets/dmsf.css | 24 ++++++++++ 2 files changed, 76 insertions(+), 36 deletions(-) diff --git a/app/views/dmsf/index.html.erb b/app/views/dmsf/index.html.erb index 75824374..966831dc 100644 --- a/app/views/dmsf/index.html.erb +++ b/app/views/dmsf/index.html.erb @@ -30,10 +30,10 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder - - <%= sort_header_tag("title", :caption => l(:link_title), :style => "width: 50%") %> + <%= sort_header_tag("title", :caption => l(:link_title)) %> <%= sort_header_tag("size", :caption => l(:link_size)) %> <%= sort_header_tag("modified", :caption => l(:link_modified)) %> <%= sort_header_tag("version", :caption => l(:link_ver)) %> @@ -44,8 +44,8 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder <% @subfolders.each do |subfolder| %> - - + <% end %> <% @files.each do |file| %> - - + <% end %> diff --git a/assets/stylesheets/dmsf.css b/assets/stylesheets/dmsf.css index e4a109a7..3d072ed7 100644 --- a/assets/stylesheets/dmsf.css +++ b/assets/stylesheets/dmsf.css @@ -6,6 +6,24 @@ table.entries { margin-bottom: 10px; } +table.entries td.modified { + width: 120px; +} + +table.entries td.actions { + width: 108px; +} + +table.entries td.title { + width: 50%; +} + +table.entries th.check { + width: 17px; + padding: 2px; + text-align: left; +} + #sidebar h3 { border: none; } @@ -66,6 +84,11 @@ div.right_icon_box { padding: 0 5px 0 5px; } +div.right_icon_box img.detail_icon { + padding-top: 2px; +} + + .dmsf_upload textarea { width: 90%; } @@ -129,3 +152,4 @@ input[type="checkbox"] { .ui-resizable-s { bottom: 0px; } +
+
<%= check_box_tag("subfolders[]", subfolder.id, false, :title => l(:title_check_for_zip_download_or_email)) %> + <%= check_box_tag("subfolders[]", subfolder.id, false, :title => l(:title_check_for_zip_download_or_email)) %> <%= link_to(h(subfolder.name), {:action => "index", :folder_id => subfolder}, :class => "icon icon-folder") %> @@ -55,32 +55,42 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder - - -
+ <% if User.current.allowed_to?(:file_approval, @project) %> +
+ <% if subfolder.notification %> + <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), + {:controller => "dmsf_state", :action => "folder_notify_deactivate", :id => @project, + :folder_id => subfolder}, :title => l(:title_notifications_active_deactivate)) %> + <% else %> + <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), + {:controller => "dmsf_state", :action => "folder_notify_activate", :id => @project, + :folder_id => subfolder}, :title => l(:title_notifications_not_active_activate)) %> + <% end %> +
+ <% end %> +
<% if User.current.allowed_to?(:folder_manipulation, @project) %> +
+ <%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf", :class =>"detail_icon"), + {:controller => "dmsf_detail", :action => "folder_detail", :id => @project, :folder_id => subfolder }, + :title => l(:link_details, :title => h(subfolder.name))) %> +
+ <% end %> +
<%= link_to(image_tag("delete.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_detail", :action => "delete_folder", :id => @project, :folder_id => @folder, :delete_folder_id => subfolder}, :class => "delete-link", - :title => l(:title_delete)) %> - <% end %> - <% if User.current.allowed_to?(:file_approval, @project) %> - <% if subfolder.notification %> - <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), - {:controller => "dmsf_state", :action => "folder_notify_deactivate", :id => @project, - :folder_id => subfolder}, :title => l(:title_notifications_active_deactivate)) %> - <% else %> - <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), - {:controller => "dmsf_state", :action => "folder_notify_activate", :id => @project, - :folder_id => subfolder}, :title => l(:title_notifications_not_active_activate)) %> - <% end %> - <% end %> -

+ :title => l(:title_delete)) if User.current.allowed_to?(:folder_manipulation, @project) %> +
+
+
<%= check_box_tag("files[]", file.id, false, :title => l(:title_check_for_zip_download_or_email)) %> + <%= check_box_tag("files[]", file.id, false, :title => l(:title_check_for_zip_download_or_email)) %> <%= link_to(h(file.last_revision.display_title), {:action => "download_file", :id => @project, :file_id => file}, :class => "icon icon-file #{Redmine::MimeType.css_class_of(file.name)}", @@ -112,11 +122,26 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder <%= h(file.last_revision.user) unless file.last_revision.nil? %> -
- <%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf"), + <% if User.current.allowed_to?(:file_approval, @project) %> +
+ <% if file.notification %> + <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), + {:controller => "dmsf_state", :action => "file_notify_deactivate", :id => @project, + :file_id => file}, :title => l(:title_notifications_active_deactivate)) %> + <% else %> + <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), + {:controller => "dmsf_state", :action => "file_notify_activate", :id => @project, + :file_id => file}, :title => l(:title_notifications_not_active_activate)) %> + <% end %> +
+ <% end %> +
+
+ <%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf", :class =>"detail_icon"), {:controller => "dmsf_detail", :action => "file_detail", :id => @project, :file_id => file }, :title => l(:link_details, :title =>h(file.last_revision.title))) %> -   +
+
<% unless file.locked_for_user? && !User.current.allowed_to?(:force_file_unlock, @project)%> <% if file.locked? %> <%= link_to(image_tag("unlock.png", :plugin => "redmine_dmsf"), @@ -134,18 +159,9 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder {:controller => "dmsf_detail", :action => "delete_file", :id => @project, :file_id => file}, :class => "delete-link", :title => l(:title_delete)) %> <% end %> - <% if User.current.allowed_to?(:file_approval, @project) %> - <% if file.notification %> - <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), - {:controller => "dmsf_state", :action => "file_notify_deactivate", :id => @project, - :file_id => file}, :title => l(:title_notifications_active_deactivate)) %> - <% else %> - <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), - {:controller => "dmsf_state", :action => "file_notify_activate", :id => @project, - :file_id => file}, :title => l(:title_notifications_not_active_activate)) %> - <% end %> - <% end %> -

+
+
+