cleaning up uploads a bit, fixing bad migration
Oleg
committed Jan 07, 2011
commit 0cf93302bcc29a4f132ad4517739422345a42f00
Showing 4
changed files with
12 additions
and 9 deletions
app/views/cms_admin/uploads/_file.html.erb
+1
-1
| @@ | @@ -5,6 +5,6 @@ |
| file_name = file_name.truncate(30) + file_ext | |
| end | |
| %> | |
| - | <%= link_to file_name, file.file.url, :target => '_blank' %> |
| + | <%= link_to file_name, file.file.url, :target => '_blank', :class => 'filename' %> |
| <%= link_to span_tag('x'), cms_admin_upload_path(file), :method => :delete, :remote => true, :class => 'delete' %> | |
| </div> | |
| \ No newline at end of file | |
app/views/cms_admin/uploads/_index.html.erb
+4
-2
| @@ | @@ -1,7 +1,9 @@ |
| <div id='file_uploads' class='box'> | |
| - | <button id="uploader_button" href="#">Select Files to Upload</button> |
| + | <div class='actions'> |
| + | <button id="uploader_button" href="#">Upload Files</button> |
| + | </div> |
| <div id='uploaded_files'> | |
| - | <% CmsUpload.order('created_at DESC').all.each do |file| %> |
| + | <% CmsUpload.order('file_file_name').all.each do |file| %> |
| <%= render :partial => 'cms_admin/uploads/file', :object => file %> | |
| <% end %> | |
| </div> | |
migrate/01_create_cms.rb b/db/migrate/01_create_cms.rb
+0
-1
| @@ | @@ -74,7 +74,6 @@ class CreateCms < ActiveRecord::Migration |
| def self.down | |
| drop_table :cms_sites | |
| - | drop_table :cms_hosts |
| drop_table :cms_layouts | |
| drop_table :cms_pages | |
| drop_table :cms_snippets | |
public/stylesheets/comfortable_mexican_sofa/structure.css
+7
-5
| @@ | @@ -59,7 +59,7 @@ html, body { |
| padding: 5px; | |
| border-radius: 3px; | |
| -moz-border-radius: 3px; | |
| - | margin-bottom: 25px; |
| + | margin-bottom: 10px; |
| overflow: hidden; | |
| } | |
| #page_save button { | |
| @@ | @@ -73,9 +73,11 @@ html, body { |
| margin-right: 5px; | |
| } | |
| - | #file_uploads button { |
| - | width: 100%; |
| - | margin-bottom: 10px; |
| + | #file_uploads .actions { |
| + | overflow: hidden; |
| + | } |
| + | #file_uploads .actions button { |
| + | float: right; |
| } | |
| #file_uploads #uploaded_files { | |
| max-height: 500px; | |
| @@ | @@ -86,7 +88,7 @@ html, body { |
| overflow: hidden; | |
| font-size: 11px; | |
| background-color: #fff; | |
| - | margin-bottom: 2px; |
| + | margin-top: 2px; |
| opacity: 0.8; | |
| } | |
| #file_uploads #uploaded_files .file.pending { | |