refinerycms-page-images 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,17 +1,15 @@
|
|
1
1
|
<div class='wym_skin_refinery page_part' id='page_image_picker'>
|
2
2
|
<div class='wym_area_top'>
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</li>
|
14
|
-
</ul>
|
3
|
+
<span class='clearfix label_inline_with_link'>
|
4
|
+
<%= link_to 'Add Image',
|
5
|
+
insert_admin_images_url(
|
6
|
+
:dialog => true,
|
7
|
+
:width => 950,
|
8
|
+
:height => 510,
|
9
|
+
:callback => "image_added"
|
10
|
+
),
|
11
|
+
:id => "add_image_link" %>
|
12
|
+
</span>
|
15
13
|
</div>
|
16
14
|
<div class='wym_box field images_field'>
|
17
15
|
<ul id='page_images' class='clearfix'>
|
@@ -22,7 +20,7 @@
|
|
22
20
|
</li>
|
23
21
|
<% end %>
|
24
22
|
<li class='empty'>
|
25
|
-
<%= hidden_field_tag "
|
23
|
+
<%= hidden_field_tag "#{f.object.class.name.underscore}[images_attributes][#{f.object.images.size}][id]" %>
|
26
24
|
</li>
|
27
25
|
</ul>
|
28
26
|
</div>
|
data/lib/gemspec.rb
CHANGED
@@ -89,7 +89,7 @@ image_added = function(image) {
|
|
89
89
|
current_list_item.attr('id', 'image_' + image_id).removeClass('empty');
|
90
90
|
|
91
91
|
new_list_item.appendTo($('#page_images'));
|
92
|
-
|
92
|
+
reset_functionality();
|
93
93
|
}
|
94
94
|
|
95
95
|
reindex_images = function() {
|
@@ -97,7 +97,7 @@ reindex_images = function() {
|
|
97
97
|
|
98
98
|
// make the image's name consistent with its position.
|
99
99
|
parts = $(input).attr('name').split(']');
|
100
|
-
parts[1] = ('[' + i)
|
100
|
+
parts[1] = ('[' + i);
|
101
101
|
$(input).attr('name', parts.join(']'));
|
102
102
|
|
103
103
|
// make the image's id consistent with its position.
|
@@ -44,7 +44,10 @@
|
|
44
44
|
}
|
45
45
|
|
46
46
|
a#add_image_link {
|
47
|
-
|
48
|
-
|
47
|
+
margin-top: 0px;
|
48
|
+
line-height: 29px;
|
49
|
+
padding-left: 20px;
|
49
50
|
display: inline;
|
51
|
+
border-bottom: 0px none;
|
52
|
+
background: url('/images/refinery/icons/add.png') no-repeat 0px 6px;
|
50
53
|
}
|
data/readme.md
CHANGED
@@ -2,18 +2,22 @@
|
|
2
2
|
|
3
3
|
## About
|
4
4
|
|
5
|
-
|
5
|
+
Page Images allows you to relate one or more images to any page in Refinery which makes it really easy for you to create simple image galleries with lightbox style popups on the front end page views.
|
6
6
|
|
7
|
-
|
8
|
-
2. A new "Images" tab will appear when editing a page in the "Pages" section
|
7
|
+
## Requirements
|
9
8
|
|
10
|
-
|
9
|
+
* refinerycms >= 0.9.9
|
10
|
+
|
11
|
+
## Features
|
12
|
+
|
13
|
+
* Ability to select one or more images from the image picker and relate them to a page
|
14
|
+
* Reordering support, simply drag into order
|
11
15
|
|
12
16
|
## Install
|
13
17
|
|
14
18
|
Add this line to your applications `Gemfile`
|
15
19
|
|
16
|
-
gem 'refinerycms-page-images', '= 0.9'
|
20
|
+
gem 'refinerycms-page-images', '= 0.9.4'
|
17
21
|
|
18
22
|
Next run
|
19
23
|
|
@@ -21,8 +25,23 @@ Next run
|
|
21
25
|
rails g refinerycms_page_images
|
22
26
|
rake db:migrate
|
23
27
|
|
24
|
-
Now when you start up your Refinery application, edit a page and there should be a
|
28
|
+
Now when you start up your Refinery application, edit a page and there should be a new "Images" tab.
|
25
29
|
|
26
|
-
##
|
30
|
+
## Usage
|
27
31
|
|
28
|
-
|
32
|
+
`app/views/pages/show.html.erb`
|
33
|
+
|
34
|
+
<% content_for :body_content_right do %>
|
35
|
+
<ul id='gallery'>
|
36
|
+
<% @page.images.each do |i| %>
|
37
|
+
<li>
|
38
|
+
<%= link_to image_tag(i.thumbnail("200x200#c").url), i.thumbnail("900x600").url %>
|
39
|
+
</li>
|
40
|
+
<% end %>
|
41
|
+
</ul>
|
42
|
+
<% end %>
|
43
|
+
<%= render :partial => "/shared/content_page" %>
|
44
|
+
|
45
|
+
## Screenshot
|
46
|
+
|
47
|
+
![Refinery CMS Page Images Screenshot](http://refinerycms.com/system/images/0000/1736/refinerycms-page-images.png)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-page-images
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 49
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 5
|
10
|
+
version: 0.9.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Resolve Digital
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-10-
|
19
|
+
date: 2010-10-12 00:00:00 +13:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|