Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/admin/assets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def add_bucket
render :nothing => true and return
end
asset_type = @asset.image? ? 'image' : 'link'
session[:bucket][@asset.asset.url] = { :thumbnail => @asset.thumbnail(:thumbnail), :id => @asset.id, :title => @asset.title, :type => asset_type }
session[:bucket][@asset.asset.url] = { :thumbnail => @asset.thumbnail(:thumbnail), :id => @asset.id, :title => @asset.title, :type => asset_type, :filename => @asset.asset_file_name }

render :update do |page|
page[:bucket_list].replace_html "#{render :partial => 'bucket'}"
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/assets/_bucket.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%ul#bucket_list
- if session[:bucket]
- session[:bucket].each do |url, info|
= render :partial => 'admin/assets/bucket_asset', :locals => { :asset_url => url, :asset_id => info[:id], :asset_type => info[:type], :asset_title => info[:title], :asset_thumbnail =>info[:thumbnail], :page => @page }
= render :partial => 'admin/assets/bucket_asset', :locals => { :asset_url => url, :asset_id => info[:id], :asset_type => info[:type], :asset_title => info[:title], :asset_thumbnail =>info[:thumbnail], :asset_filename => info[:filename], :page => @page }
- else
%li
%p.note
Expand Down
3 changes: 3 additions & 0 deletions app/views/admin/assets/_bucket_asset.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
= link_to image_tag('/images/assets/edit.png'), edit_admin_asset_url(asset_id), :class => "edit_asset", :title => t("paperclipped.edit_asset", :asset => asset_title)
- if page && !page.new_record?
= link_to image_tag('/images/assets/add.png'), attach_page_asset_url(:asset => asset_id, :page => page.id), :class => "add_asset", :title => t("paperclipped.attach_to_page")

.filename
= asset_filename
9 changes: 8 additions & 1 deletion public/stylesheets/admin/assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ table td.add-to-bucket a { background: url("../../images/admin/plus.png") no-rep
-box-shadow: rgba(0, 0, 0, 0.148438) 2px 2px 3px;
}

#asset-bucket div.filename{
color: #333;
font-size: 60%;
width: 110px;
overflow: hidden;
}

#assets .pane,
#content .form-area .asset {
background: #F5F1E2 url(/images/admin/vertical_tan_gradient.png) repeat-x 0% 0%;
Expand Down Expand Up @@ -105,7 +112,7 @@ table td.add-to-bucket a { background: url("../../images/admin/plus.png") no-rep

#bucket ul, #page-attachments ul, #search-results ul { list-style: none; margin: 0; padding: 0 10px 0 0;}

#assets li { position: relative; float:left; margin: 8px 8px 0 8px; height: 106px; padding-right: 24px;}
#assets li { position: relative; float:left; margin: 8px 8px 0 8px; height: 126px; padding-right: 24px;}
#assets .asset { position: relative; }
#assets .asset img { padding: 3px; background-color:#eaeaea; border: 1px solid #ccc; }

Expand Down