forked from refinery/refinerycms-portfolio
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca682aa
commit 72c9e39
Showing
9 changed files
with
137 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
app/views/refinery/portfolio/admin/galleries/_image.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<div class='wym_box field item_group'> | ||
<ul id='page_images' class='clearfix'> | ||
<% f.object.items.order("position").each_with_index do |item, i| %> | ||
<li id='<%= dom_id(item) %>' class='image_field'> | ||
<div class='thumb'><%= image_fu item.image, ::Refinery::Portfolio.cover_image_thumb_size %></div> | ||
<div class='image_actions'> | ||
<div class='floater'> | ||
<%= image_tag('refinery/icons/edit.png', {:width => 22, :height => 22, :class => 'edit_image', :alt => 'edit', :'data-item-id' => item.id }) %> | ||
<%= image_tag('refinery/icons/delete.png', {:width => 22, :height => 22, :class => 'delete_image', :alt => 'delete', :'data-item-id' => item.id }) %> | ||
</div> | ||
</div> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% css_classes = ['image_field'] %> | ||
<% css_classes << 'blank' if image.new_record? %> | ||
|
||
<li id='<%= "image_#{image.id || 'new'}" %>' class='<%= css_classes.join(' ') %>'> | ||
<div class='thumb'><% unless image.new_record? %><%= image_tag image.url %><% end %></div> | ||
<div class='image_actions'> | ||
<div class='floater'> | ||
<%#= image_tag('refinery/icons/edit.png', {:width => 22, :height => 22, :class => 'edit_image', :alt => 'edit'}) %> | ||
<%= image_tag('refinery/icons/delete.png', {:width => 22, :height => 22, :class => 'delete_image', :alt => 'delete' }) %> | ||
</div> | ||
</div> | ||
<div class='attributes'> | ||
<%= f.hidden_field :images, :name => "gallery[images][]", :id => nil, :class => 'image_id', :value => image.id %> | ||
</div> | ||
</li> |
14 changes: 14 additions & 0 deletions
14
app/views/refinery/portfolio/admin/galleries/_image_fields.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class='wym_skin_refinery' id='images_picker'> | ||
<%= render :partial => "images", :locals => {:f => f} %> | ||
|
||
<span class='clearfix label_inline_with_link'> | ||
<%= link_to t('.add_new_image'), refinery.insert_admin_images_url({ | ||
:dialog => true, | ||
:width => 950, | ||
:height => 510, | ||
:callback => "portfolio.append_image", | ||
:multiple => true | ||
}), | ||
:id => "add_image_link" %> | ||
</span> | ||
</div> |
20 changes: 9 additions & 11 deletions
20
app/views/refinery/portfolio/admin/galleries/_images.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
<div class='wym_skin_refinery' id='images_picker'> | ||
<%= render :partial => "image", :locals => {:f => f} %> | ||
<div class='wym_box field item_group'> | ||
<ul id='page_images' class='clearfix'> | ||
<% f.object.items.order("position").each_with_index do |item, i| %> | ||
<%= render :partial => 'image', :locals => {:f => f, :image => item.image} %> | ||
<% end %> | ||
|
||
</ul> | ||
|
||
<%= render :partial => 'image', :locals => {:f => f, :image => ::Refinery::Image.new } %> | ||
|
||
<span class='clearfix label_inline_with_link'> | ||
<%= link_to t('.add_new_image'), refinery.insert_admin_images_url({ | ||
:dialog => true, | ||
:width => 950, | ||
:height => 510, | ||
:callback => "portfolio.append_image" | ||
}), | ||
:id => "add_image_link" %> | ||
</span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters