diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb index 19766209..638f3e48 100644 --- a/app/models/dmsf_file_revision.rb +++ b/app/models/dmsf_file_revision.rb @@ -139,6 +139,10 @@ class DmsfFileRevision < ActiveRecord::Base new_revision.source_revision = self new_revision.user = User.current + + new_revision.name = self.name + new_revision.folder = self.folder + return new_revision end diff --git a/app/views/dmsf_detail/_file_new_revision.html.erb b/app/views/dmsf_detail/_file_new_revision.html.erb index 6f324dfa..d2fafc60 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 @@
- Create New Revision [-] + New Revision [-]
<% if @file.locked_for_user? %>

<%= l(:info_file_locked) %>

@@ -38,14 +38,14 @@ form_for(:dmsf_file_revision, @revision, :url => {:action => "save_file", :id =>

<%= label_tag("dmsf_file_revision_description", "Description:") %>

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

<%= label_tag("fileMinorVersionRadio", "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
<%= radio_button_tag("dmsf_file_revision[version]", "minor", @@ -65,17 +65,21 @@ form_for(:dmsf_file_revision, @revision, :url => {:action => "save_file", :id =>

<%= label_tag("fileFileUpload", "New content:") %> - <%= file_field_tag("dmsf_file_revision[file]", :size => 30, :id => "fileFileUpload") %> -
- - (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) - +

+ <%= file_field_tag("dmsf_file_revision[file]", :size => 30, :id => "fileFileUpload") %> +
+ + (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) + +


<%= label_tag("dmsf_file_revision_comment", "Comment:") %> - <%= f.text_area(:comment, :rows=> "2", :style => "width: 99%;") %> +

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


<%= submit_tag("Create") %> diff --git a/app/views/dmsf_detail/file_detail.html.erb b/app/views/dmsf_detail/file_detail.html.erb index 2206c6c2..0cb35fcd 100644 --- a/app/views/dmsf_detail/file_detail.html.erb +++ b/app/views/dmsf_detail/file_detail.html.erb @@ -72,14 +72,15 @@

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

<%= label_tag("", "Size:") %> <%= number_to_human_size(revision.size) %>

-

+
+

<%= label_tag("", "Comment:") %> <%= h(revision.comment) %>

diff --git a/assets/stylesheets/dmsf.css b/assets/stylesheets/dmsf.css index 56dbc34e..4d9ed2b2 100644 --- a/assets/stylesheets/dmsf.css +++ b/assets/stylesheets/dmsf.css @@ -109,6 +109,10 @@ div.right_icon_box img.detail_icon { padding: 4px 4px 4px 30px; } +.dmsf_detail div.data { + margin-left: 110px; +} + .dmsf_revision label { font-weight: bold; width: 100px;