From e6eb2fbb0aceb9103e31d502a0cc1798d9daa875 Mon Sep 17 00:00:00 2001 From: "vit.jonas@gmail.com" Date: Wed, 1 Jun 2011 22:04:46 +0000 Subject: [PATCH] * finished Issue 67: Show number of files stored in each folder * fixed IE icon layout problem git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@116 5e329b0b-a2ee-ea63-e329-299493fc886d --- app/views/dmsf/show.html.erb | 21 +++++++++++---------- assets/stylesheets/dmsf.css | 4 ++++ config/locales/en.yml | 5 +++++ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb index 58061782..565e6d9e 100644 --- a/app/views/dmsf/show.html.erb +++ b/app/views/dmsf/show.html.erb @@ -3,17 +3,14 @@
<% if User.current.allowed_to?(:folder_manipulation, @project) %> <% if @folder.nil? %> - <%= link_to(image_tag("edit.png", :style => "vertical-align: text-top;"), - {:action => "edit_root", :id => @project}, - :title => l(:link_edit, :title => l(:link_documents))) %>   + <%= link_to("", {:action => "edit_root", :id => @project}, + :title => l(:link_edit, :title => l(:link_documents)), :class => "icon icon-edit") %>   <% else @folder.nil? %> - <%= link_to(image_tag("edit.png", :style => "vertical-align: text-top;"), - {:action => "edit", :id => @project, :folder_id => @folder }, - :title => l(:link_edit, :title => h(@folder.title))) %>   + <%= link_to("", {:action => "edit", :id => @project, :folder_id => @folder }, + :title => l(:link_edit, :title => h(@folder.title)), :class => "icon icon-edit") %>   <% end %> - <%= link_to(image_tag("add.png", :style => "vertical-align: text-top;"), - {:action => "new", :id => @project, :parent_id => @folder }, - :title => l(:link_create_folder)) %> + <%= link_to("", {:action => "new", :id => @project, :parent_id => @folder }, + :title => l(:link_create_folder), :class => "icon icon-add") %> <% end %>
@@ -53,6 +50,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder <%= link_to(h(subfolder.title), {:action => "show", :id => @project, :folder_id => subfolder}, :class => "icon icon-folder") %> +
[<%= subfolder.files.count %>]
- - @@ -99,7 +97,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder {:controller => :dmsf_files, :action => "show", :id => file, :download => ""}, :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}", :title => l(:title_title_version_version_download, :title => h(file.title), :version => file.version)) %> -
<%= h(file.display_name) %>
+
<%= h(file.display_name) %>
<%= number_to_human_size(file.last_revision.size) unless file.last_revision.nil? %> @@ -176,6 +174,9 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder <% if User.current.allowed_to?(:file_manipulation, @project) %> <% end %> +
+ <%= l(:label_number_of_folders)%>: <%= @subfolders.count %>, <%= l(:label_number_of_files)%>: <%= @files.count %> +

<% end %> diff --git a/assets/stylesheets/dmsf.css b/assets/stylesheets/dmsf.css index 97f49bb5..87a0c0bf 100644 --- a/assets/stylesheets/dmsf.css +++ b/assets/stylesheets/dmsf.css @@ -4,6 +4,10 @@ button { margin-bottom: 1px; } +.contextual img { + line-height: 0; +} + /* DMSF entries list */ table.entries tbody td, table.entries tbody tr:hover td { border: solid 1px #D7D7D7; diff --git a/config/locales/en.yml b/config/locales/en.yml index d956207d..e5dc78f2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -147,4 +147,9 @@ en: :warning_some_entries_were_not_deleted: "Some entries weren't deleted: %{entries}" :question_do_you_really_want_to_delete_entries: "Do you really want to delete checked entries?" :title_delete_checked: "Delete checked" + + :title_number_of_files_in_directory: "Number of files in directory" + :title_filename_for_download: "Filename used for download or in Zip archive" + :label_number_of_folders: "Folders" + :label_number_of_files: "Files" \ No newline at end of file