* small UI improvements and fixes

git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@31 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
vit.jonas@gmail.com 2011-05-09 22:55:39 +00:00
parent e20e031731
commit 959b91052d
10 changed files with 29 additions and 28 deletions

View File

@ -1,15 +1,13 @@
<div class="box"> <div class="box">
<% form_tag({:controller => "dmsf_state", :action => "user_pref", :id => @project, :current => URI.escape(request.url)}, <% form_tag({:controller => "dmsf_state", :action => "user_pref", :id => @project, :current => URI.escape(request.url)},
:method=>:post) do %> :method=>:post) do %>
<div style="padding-top: 0px; float: right;">
<%= submit_tag("Save", :title => "Save preferences", :style => "font-size: 0.9em;", :tabindex => 10) %>
</div>
<h3>Your <%= l(:dmsf) %> preferences for project</h3> <h3>Your <%= l(:dmsf) %> preferences for project</h3>
<div> <div>
Notifications: Notifications:
<%= select_tag("email_notify", <%= select_tag("email_notify",
options_for_select([["Default", nil], ["Activated", true], ["Deactivated", false]], options_for_select([["Default", nil], ["Activated", true], ["Deactivated", false]],
:selected => DmsfUserPref.for(@project, User.current).email_notify), :tabindex => 1) %> :selected => DmsfUserPref.for(@project, User.current).email_notify)) %>
<%= submit_tag("Save", :title => "Save preferences") %>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@ -3,8 +3,9 @@
<div class="contextual"> <div class="contextual">
<% if User.current.allowed_to?(:folder_manipulation, @project) %> <% if User.current.allowed_to?(:folder_manipulation, @project) %>
<% unless @folder.nil? %> <% unless @folder.nil? %>
<%= link_to(l(:link_details), <%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf", :style => "vertical-align: text-top;"),
{:controller => "dmsf_detail", :action => "folder_detail", :id => @project, :folder_id => @folder}) %> | {:controller => "dmsf_detail", :action => "folder_detail", :id => @project, :folder_id => @folder },
:title => l(:link_details, :title => h(@folder.name))) %> |
<% end %> <% end %>
<% form_for(DmsfFolder.new, :url => {:controller => "dmsf_detail", :action => "create_folder", :id => @project, :folder_id => @folder}, :html => {:method=>:post}) do |f| %> <% form_for(DmsfFolder.new, :url => {:controller => "dmsf_detail", :action => "create_folder", :id => @project, :folder_id => @folder}, :html => {:method=>:post}) do |f| %>
Title: <%= f.text_field(:name) %><%= f.submit(l(:submit_create_folder)) %> Title: <%= f.text_field(:name) %><%= f.submit(l(:submit_create_folder)) %>
@ -32,7 +33,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
<th style="width: 17px; padding: 2px; text-align: left;"> <th style="width: 17px; padding: 2px; text-align: left;">
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_zip_download_or_email) %>" type="checkbox" /> <input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_zip_download_or_email) %>" type="checkbox" />
</th> </th>
<%= sort_header_tag("title", :caption => l(:link_title)) %> <%= sort_header_tag("title", :caption => l(:link_title), :style => "width: 50%") %>
<%= sort_header_tag("size", :caption => l(:link_size)) %> <%= sort_header_tag("size", :caption => l(:link_size)) %>
<%= sort_header_tag("modified", :caption => l(:link_modified)) %> <%= sort_header_tag("modified", :caption => l(:link_modified)) %>
<%= sort_header_tag("version", :caption => l(:link_ver)) %> <%= sort_header_tag("version", :caption => l(:link_ver)) %>
@ -84,8 +85,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
{:action => "download_file", :id => @project, :file_id => file}, {:action => "download_file", :id => @project, :file_id => file},
:class => "icon icon-file #{Redmine::MimeType.css_class_of(file.name)}", :class => "icon icon-file #{Redmine::MimeType.css_class_of(file.name)}",
:title => l(:title_title_version_version_download, :title => h(file.last_revision.title), :version => file.last_revision.version)) %> :title => l(:title_title_version_version_download, :title => h(file.last_revision.title), :version => file.last_revision.version)) %>
<div class="filename"> <div class="filename"><%= h(file.display_name) %></div><br class="clear" />
(<%= h(file.display_name) %>)</div><br class="clear" />
</td> </td>
<td class="size"><%= number_to_human_size(file.last_revision.size) unless file.last_revision.nil? %></td> <td class="size"><%= number_to_human_size(file.last_revision.size) unless file.last_revision.nil? %></td>
<td class="modified"> <td class="modified">
@ -115,7 +115,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
<div class="right_icon_box"> <div class="right_icon_box">
<%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf"), <%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf"),
{:controller => "dmsf_detail", :action => "file_detail", :id => @project, :file_id => file }, {:controller => "dmsf_detail", :action => "file_detail", :id => @project, :file_id => file },
:title => "#{h(file.last_revision.title)} details") %> :title => l(:link_details, :title =>h(file.last_revision.title))) %>
&nbsp; &nbsp;
<% unless file.locked_for_user? && !User.current.allowed_to?(:force_file_unlock, @project)%> <% unless file.locked_for_user? && !User.current.allowed_to?(:force_file_unlock, @project)%>
<% if file.locked? %> <% if file.locked? %>
@ -156,20 +156,19 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
<!-- <button type="button" id="EntriesDeleteButton" title="Delete checked">Delete</button> --> <!-- <button type="button" id="EntriesDeleteButton" title="Delete checked">Delete</button> -->
<%= submit_tag("Email", :title => "Send checked by email", :name => "email_entries") %> <%= submit_tag("Email", :title => "Send checked by email", :name => "email_entries") %>
</div> </div>
<br style="clear: both"/> <br />
<% end %> <% end %>
<div class="box"> <div class="box">
<h3>File Upload</h3> <% form_tag({:controller => "dmsf_detail", :action => "upload_files", :id => @project, :folder_id => @folder},
<% form_tag({:controller => "dmsf_detail", :action => "upload_files", :id => @project, :folder_id => @folder}, :id => "uploadform", :method=>:post, :multipart => true) do %>
:id => "uploadform", :method=>:post, :multipart => true) do %>
<div style="padding-bottom: 6px; line-height: 1.4em; font-size: 0.9em;">
<% if Setting.attachment_max_size.to_i >= 102400 %> <% if Setting.attachment_max_size.to_i >= 102400 %>
<div class="upload_select"> <div class="upload_select">
File size: <select id="uploader_select"><option value="1">&lt; 100 MB</option><option value="2">> 100 MB</option></select> File size: <select id="uploader_select"><option value="1">&lt; 100 MB</option><option value="2">> 100 MB</option></select>
</div> </div>
<br style="clear: both" />
<% end %> <% end %>
<h3>File Upload</h3>
<div style="padding-bottom: 6px; line-height: 1.4em; font-size: 0.9em;">
<span> <span>
<% if Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i > 0 %>There can be uploaded maximum of <%= Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i %> files at once.<% end %> <% if Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i > 0 %>There can be uploaded maximum of <%= Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i %> files at once.<% end %>
<% if Setting.attachment_max_size.to_i >= 2097151 %>To upload files greater than 2GB you must have 64b browser.<% end %> <% if Setting.attachment_max_size.to_i >= 2097151 %>To upload files greater than 2GB you must have 64b browser.<% end %>
@ -189,6 +188,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
</div> </div>
<% end %> <% end %>
</div> </div>
<br />
<%= render(:partial => 'user_pref') %> <%= render(:partial => 'user_pref') %>
@ -221,10 +221,10 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
jQuery("#check_all_entries").click(function(event) { jQuery("#check_all_entries").click(function(event) {
var $this = jQuery(this); var $this = jQuery(this);
if($this.attr("checked")) { if($this.prop("checked")) {
jQuery("input[type=checkbox]", jQuery("#browser > tbody")).attr("checked", true); jQuery("input[type=checkbox]", jQuery("#browser > tbody")).prop("checked", true);
} else { } else {
jQuery("input[type=checkbox]", jQuery("#browser > tbody")).attr("checked", false); jQuery("input[type=checkbox]", jQuery("#browser > tbody")).prop("checked", false);
} }
}) })

View File

@ -1,7 +1,11 @@
table.list tbody td, table.list tbody tr:hover td { table.entries tbody td, table.entries tbody tr:hover td {
border: solid 1px #D7D7D7; border: solid 1px #D7D7D7;
} }
table.entries {
margin-bottom: 10px;
}
#sidebar h3 { #sidebar h3 {
border: none; border: none;
} }
@ -18,7 +22,6 @@ form.dmfs_entries {
} }
form.dmfs_entries div.controls { form.dmfs_entries div.controls {
float: right;
font-size: 0.9em; font-size: 0.9em;
} }

View File

@ -36,7 +36,7 @@ cs:
:notice_file_notifications_activated: "File notifications activated" :notice_file_notifications_activated: "File notifications activated"
:warning_file_notifications_already_deactivated: "File notifications already deactivated" :warning_file_notifications_already_deactivated: "File notifications already deactivated"
:notice_file_notifications_deactivated: "File notifications deactivated" :notice_file_notifications_deactivated: "File notifications deactivated"
:link_details: "Details" :link_details: "%{title} details"
:submit_create_folder: "Create folder" :submit_create_folder: "Create folder"
:title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email"
:link_title: "Title" :link_title: "Title"

View File

@ -36,7 +36,7 @@ de:
:notice_file_notifications_activated: "File notifications activated" :notice_file_notifications_activated: "File notifications activated"
:warning_file_notifications_already_deactivated: "File notifications already deactivated" :warning_file_notifications_already_deactivated: "File notifications already deactivated"
:notice_file_notifications_deactivated: "File notifications deactivated" :notice_file_notifications_deactivated: "File notifications deactivated"
:link_details: "Details" :link_details: "%{title} details"
:submit_create_folder: "Create folder" :submit_create_folder: "Create folder"
:title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email"
:link_title: "Title" :link_title: "Title"

View File

@ -36,7 +36,7 @@ en-GB:
:notice_file_notifications_activated: "File notifications activated" :notice_file_notifications_activated: "File notifications activated"
:warning_file_notifications_already_deactivated: "File notifications already deactivated" :warning_file_notifications_already_deactivated: "File notifications already deactivated"
:notice_file_notifications_deactivated: "File notifications deactivated" :notice_file_notifications_deactivated: "File notifications deactivated"
:link_details: "Details" :link_details: "%{title} details"
:submit_create_folder: "Create folder" :submit_create_folder: "Create folder"
:title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email"
:link_title: "Title" :link_title: "Title"

View File

@ -36,7 +36,7 @@ en:
:notice_file_notifications_activated: "File notifications activated" :notice_file_notifications_activated: "File notifications activated"
:warning_file_notifications_already_deactivated: "File notifications already deactivated" :warning_file_notifications_already_deactivated: "File notifications already deactivated"
:notice_file_notifications_deactivated: "File notifications deactivated" :notice_file_notifications_deactivated: "File notifications deactivated"
:link_details: "Details" :link_details: "%{title} details"
:submit_create_folder: "Create folder" :submit_create_folder: "Create folder"
:title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email"
:link_title: "Title" :link_title: "Title"

View File

@ -36,7 +36,7 @@ es:
:notice_file_notifications_activated: "File notifications activated" :notice_file_notifications_activated: "File notifications activated"
:warning_file_notifications_already_deactivated: "File notifications already deactivated" :warning_file_notifications_already_deactivated: "File notifications already deactivated"
:notice_file_notifications_deactivated: "File notifications deactivated" :notice_file_notifications_deactivated: "File notifications deactivated"
:link_details: "Details" :link_details: "%{title} details"
:submit_create_folder: "Create folder" :submit_create_folder: "Create folder"
:title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email"
:link_title: "Title" :link_title: "Title"

View File

@ -36,7 +36,7 @@ fr:
:notice_file_notifications_activated: "File notifications activated" :notice_file_notifications_activated: "File notifications activated"
:warning_file_notifications_already_deactivated: "File notifications already deactivated" :warning_file_notifications_already_deactivated: "File notifications already deactivated"
:notice_file_notifications_deactivated: "File notifications deactivated" :notice_file_notifications_deactivated: "File notifications deactivated"
:link_details: "Details" :link_details: "%{title} details"
:submit_create_folder: "Create folder" :submit_create_folder: "Create folder"
:title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email"
:link_title: "Title" :link_title: "Title"

View File

@ -36,7 +36,7 @@ ru:
:notice_file_notifications_activated: "File notifications activated" :notice_file_notifications_activated: "File notifications activated"
:warning_file_notifications_already_deactivated: "File notifications already deactivated" :warning_file_notifications_already_deactivated: "File notifications already deactivated"
:notice_file_notifications_deactivated: "File notifications deactivated" :notice_file_notifications_deactivated: "File notifications deactivated"
:link_details: "Details" :link_details: "%{title} details"
:submit_create_folder: "Create folder" :submit_create_folder: "Create folder"
:title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email"
:link_title: "Title" :link_title: "Title"