most recent paperclip is borked, allowing file reupload

Oleg committed Sep 29, 2011
commit 8501a65c07e02062c57e4053f9a16b37b3225d4b
Showing 6 changed files with 12 additions and 6 deletions
Gemfile +1 -1
@@ @@ -2,7 +2,7 @@ source 'http://rubygems.org'
gem 'rails', '>=3.0.0'
gem 'active_link_to', '~>1.0.0'
- gem 'paperclip', '~>2.4.2'
+ gem 'paperclip', '~>2.4.1'
group :test do
gem 'sqlite3'
app/assets/stylesheets/comfortable_mexican_sofa/application.css +1 -1
@@ @@ -4,7 +4,7 @@
= require comfortable_mexican_sofa/structure.css
= require comfortable_mexican_sofa/form.css
= require comfortable_mexican_sofa/content.css
- = require comfortable_mexican_sofa/widgets.css
= require comfortable_mexican_sofa/codemirror.css
= require comfortable_mexican_sofa/jquery_ui.css
+ = require comfortable_mexican_sofa/widgets.css
*/
\ No newline at end of file
app/assets/stylesheets/comfortable_mexican_sofa/widgets.css +3 -0
@@ @@ -1,4 +1,7 @@
/* -- jqueryIU ----------------------------------------------------------- */
+ .ui-widget-content {
+ background: #f1f1f1;
+ }
.ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
.ui-timepicker-div dl{ text-align: left; }
.ui-timepicker-div dl dt{ height: 25px; }
app/views/cms_admin/files/_form.html.erb +5 -4
@@ @@ -1,11 +1,12 @@
<%= form.text_field :label %>
- <% if @file.new_record? %>
- <%= form.file_field :file, :multiple => true %>
- <% else %>
- <%= form.simple_field 'File', nil do %>
+ <%= form.file_field :file, :multiple => @file.new_record? %>
+
+ <% unless @file.new_record? %>
+ <%= form.simple_field t('.current_file'), nil do %>
<%= link_to @file.file.url, @file.file.url, :target => '_blank' %>
<% end %>
<% end %>
+
<%= form.text_area :description %>
<%= render :partial => 'cms_admin/categories/form', :object => form %>
config/locales/en.yml +1 -0
@@ @@ -195,6 +195,7 @@ en:
edit:
title: Editing File
form:
+ current_file: Current File
create: Upload File
update: Update File
page_form:
config/locales/es.yml +1 -0
@@ @@ -195,6 +195,7 @@ es:
edit:
title: Editar Archivo
form:
+ current_file: Archivo Actual
create: Subir Archivo
update: Actualizar Archivo
page_form: