diff --git a/app/controllers/dmsf_detail_controller.rb b/app/controllers/dmsf_detail_controller.rb index 7da30302..4715ddcf 100644 --- a/app/controllers/dmsf_detail_controller.rb +++ b/app/controllers/dmsf_detail_controller.rb @@ -82,7 +82,6 @@ class DmsfDetailController < ApplicationController def file_detail @revision = @file.last_revision.clone - @revision.comment = "" end #TODO: separate control for approval diff --git a/app/views/dmsf_detail/_file_new_revision.html.erb b/app/views/dmsf_detail/_file_new_revision.html.erb index d2fafc60..6aaf05a8 100644 --- a/app/views/dmsf_detail/_file_new_revision.html.erb +++ b/app/views/dmsf_detail/_file_new_revision.html.erb @@ -1,5 +1,5 @@ -
- New Revision [-] +
+ <%= l(:heading_new_revision) %> [-]
<% if @file.locked_for_user? %>

<%= l(:info_file_locked) %>

@@ -24,47 +24,50 @@ form_for(:dmsf_file_revision, @revision, :url => {:action => "save_file", :id =>

- <%= label_tag("dmsf_file_revision_title", "Title:") %> + <%= label_tag("dmsf_file_revision_title", l(:label_title) + ":") %> <%= f.text_field(:title, :size => "32") %>

- <%= label_tag("", "Filename:") %> + <%= label_tag("", l(:label_filename) + ":") %> <%= h(@revision.name) %>

- <%= label_tag("dmsf_file_revision_description", "Description:") %> + <%= label_tag("dmsf_file_revision_description", l(:label_description) + ":") %>

<%= f.text_area(:description, :rows=> "6", :class => "wiki-edit") %>

- <%= label_tag("fileMinorVersionRadio", "Version:") %> + <%= label_tag("fileMinorVersionRadio", l(:label_version) + ":") %>

<%= radio_button_tag("dmsf_file_revision[version]", "same", @revision.version == @file.last_revision.version, :id => "fileSameVersionRadio") %> - <%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version %> Same
+ <%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version %> <%= l(:option_version_same) %>
<%= radio_button_tag("dmsf_file_revision[version]", "minor", @revision.major_version == @file.last_revision.major_version && @revision.minor_version != @file.last_revision.minor_version, :id => "fileMinorVersionRadio") %> - <%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version + 1 %> Minor
+ <%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version + 1 %> <%= l(:option_version_minor) %>
<%= radio_button_tag("dmsf_file_revision[version]", "major", @revision.major_version != @file.last_revision.major_version) %> - <%= @file.last_revision.major_version + 1 %>.0 Major
+ <%= @file.last_revision.major_version + 1 %>.0 <%= l(:option_version_major) %>

- <%= label_tag("dmsf_file_revision_workflow", "Workflow:") %> + <%= label_tag("dmsf_file_revision_workflow", l(:label_workflow) + ":") %> <%= f.select(:workflow, - options_for_select([["None", nil], ["Waiting for approval", 1], ["Approved", 2]], + options_for_select([ + [l(:option_workflow_none), nil], + [l(:option_workflow_waiting_for_approval), 1], + [l(:option_workflow_approved), 2]], :selected => selected_workflow, :disabled => disabled_workflow)) %>

- <%= label_tag("fileFileUpload", "New content:") %> + <%= label_tag("fileFileUpload", l(:label_new_content) + ":") %>

<%= file_field_tag("dmsf_file_revision[file]", :size => 30, :id => "fileFileUpload") %>
@@ -76,13 +79,13 @@ form_for(:dmsf_file_revision, @revision, :url => {:action => "save_file", :id =>

- <%= label_tag("dmsf_file_revision_comment", "Comment:") %> + <%= label_tag("dmsf_file_revision_comment", l(:label_comment) + ":") %>

<%= f.text_area(:comment, :rows=> "2", :style => "width: 99%;") %>


- <%= submit_tag("Create") %> + <%= submit_tag(l(:submit_create)) %> <% end %> <% end %>
diff --git a/app/views/dmsf_detail/file_detail.html.erb b/app/views/dmsf_detail/file_detail.html.erb index 0cb35fcd..950b5f83 100644 --- a/app/views/dmsf_detail/file_detail.html.erb +++ b/app/views/dmsf_detail/file_detail.html.erb @@ -9,8 +9,8 @@ / <%= h(@file.last_revision.title) %>
<%= h(@file.name) %>
<% if @file.notification %> - <%= image_tag("notify.png", :plugin => "redmine_dmsf", :alt => "Not. act.", - :title => "Notifications active") %> + <%= image_tag("notify.png", :plugin => "redmine_dmsf", + :title => l(:title_notifications_active)) %> <% end %> @@ -18,38 +18,38 @@ <%= render(:partial => 'file_new_revision') %> <% end %> -

Revisions

+

<%= l(:heading_revisions) %>

<% @file.revisions.each do |revision| %> -
+
- <%= link_to("Download", + <%= link_to(l(:title_download), {:controller=>"dmsf", :action => "download_revision", :id => @project, :revision_id => revision}) %> <% if User.current.allowed_to?(:file_approval, @project) %> - | <%= link_to("Delete", + | <%= link_to(l(:title_delete), {:action => "delete_revision", :id => @project, :revision_id => revision}, - :class => "delete-link", :title => "Delete revision") %> + :class => "delete-link", :title => l(:title_delete_revision)) %> <% end %>

- <%= label_tag("", revision.source_revision.nil? ? "Created:" : "Changed:") %> - <%= revision.updated_at.strftime("%Y-%m-%d %H:%M:%S") %> by <%= h(revision.user) %> + <%= label_tag("", (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)) + ":") %> + <%= l(:info_changed_by_user, :changed => revision.updated_at.strftime("%Y-%m-%d %H:%M:%S"), :user => h(revision.user)) %>

- <%= label_tag("", "Title:") %> + <%= label_tag("", l(:label_title) + ":") %> <%= h(revision.title) %>

- <%= label_tag("", "Filename:") %> + <%= label_tag("", l(:label_filename) + ":") %> <%= h(revision.name) %>

- <%= label_tag("", "Description:") %> + <%= label_tag("", l(:label_description) + ":") %>

<%= textilizable(revision.description) %> @@ -57,31 +57,31 @@

- <%= label_tag("", "Version:") %> + <%= label_tag("", l(:label_version) + ":") %> <%= revision.major_version %>.<%= revision.minor_version %>

- <%= label_tag("", "Workflow:") %> + <%= label_tag("", l(:label_workflow) + ":") %> <%= case revision.workflow - when 1 then "Waiting for approval" - when 2 then "Approved" - else "None" + when 1 then l(:option_workflow_waiting_for_approval) + when 2 then l(:option_workflow_approved) + else l(:option_workflow_none) end %>

- <%= label_tag("", "Mime:") %> + <%= label_tag("", l(:label_mime) + ":") %> <%= h(revision.mime_type) %> 

- <%= label_tag("", "Size:") %> + <%= label_tag("", l(:label_size) + ":") %> <%= number_to_human_size(revision.size) %>


- <%= label_tag("", "Comment:") %> + <%= label_tag("", l(:label_comment) + ":") %> <%= h(revision.comment) %>

diff --git a/assets/stylesheets/dmsf.css b/assets/stylesheets/dmsf.css index 4d9ed2b2..f65fb222 100644 --- a/assets/stylesheets/dmsf.css +++ b/assets/stylesheets/dmsf.css @@ -113,7 +113,7 @@ div.right_icon_box img.detail_icon { margin-left: 110px; } -.dmsf_revision label { +.dmsf_detail label { font-weight: bold; width: 100px; float: left; diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 2640f516..ac8ec1bd 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -86,4 +86,25 @@ cs: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" + + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file diff --git a/config/locales/de.yml b/config/locales/de.yml index 45ac973f..248df50f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -82,6 +82,25 @@ de: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" - + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 6f22f7d0..fe9f49ce 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -82,5 +82,24 @@ en-GB: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" - + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index c3cad8d0..df7f1b8f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -86,6 +86,24 @@ en: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" - - + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file diff --git a/config/locales/es.yml b/config/locales/es.yml index 03791a5c..fd0d067a 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -82,4 +82,24 @@ es: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file diff --git a/config/locales/fr.yml b/config/locales/fr.yml index fd559df9..06b9c3ac 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -82,4 +82,24 @@ fr: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file diff --git a/config/locales/ja.yml b/config/locales/ja.yml index c3cad8d0..913e2eef 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -86,6 +86,25 @@ en: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" - + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file diff --git a/config/locales/ru.yml b/config/locales/ru.yml index b26315dd..92c02310 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -82,5 +82,24 @@ ru: :select_option_deactivated: "Deactivated" :select_option_activated: "Activated" :title_save_preferences: "Save preferences" - + :heading_revisions: "Revisions" + :title_download: "Download" + :title_delete_revision: "Delete revision" + :label_created: "Created" + :label_changed: "Changed" + :info_changed_by_user: "%{changed} by %{user}" + :label_filename: "Filename" + :label_version: "Version" + :label_workflow: "Workflow" + :option_workflow_waiting_for_approval: "Waiting for approval" + :option_workflow_approved: "Approved" + :option_workflow_none: "None" + :label_mime: "Mime" + :label_size: "Size" + :label_comment: "Comment" + :heading_new_revision: "New Revision" + :option_version_same: "Same" + :option_version_minor: "Minor" + :option_version_major: "Major" + :label_new_content: "New content" \ No newline at end of file