refinerycms 0.9.5.31 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/bin/refinery +2 -1
- data/config/environment.rb +1 -1
- data/config/environments/development.rb +3 -0
- data/contributors.md +2 -0
- data/db/migrate/20100202034802_remove_custom_title_image_id_and_image_id_from_pages.rb +13 -0
- data/db/migrate/20100204011654_change_part_titles_to_titleized_version_for_new_format.rb +13 -0
- data/db/schema.rb +6 -10
- data/public/javascripts/admin.js +1 -1
- data/public/javascripts/jquery-ui-1.8rc1.min.js +375 -0
- data/public/javascripts/jquery.js +4231 -2529
- data/public/javascripts/refinery/admin.js +609 -38
- data/public/javascripts/refinery/boot_wym.js +3 -3
- data/public/javascripts/thickbox.js +116 -129
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +3674 -3732
- data/public/javascripts/wymeditor/skins/refinery/skin.js +8 -8
- data/public/stylesheets/refinery/refinery.css +142 -32
- data/public/stylesheets/wymeditor/skins/refinery/skin.css +8 -1
- data/readme.md +35 -21
- data/test/fixtures/page_parts.yml +9 -0
- data/test/fixtures/pages.yml +88 -0
- data/test/performance/browsing_test.rb +9 -0
- data/test/test_helper.rb +38 -0
- data/test/unit/image_test.rb +14 -0
- data/test/unit/page_part_test.rb +19 -0
- data/test/unit/page_test.rb +130 -0
- data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +1 -1
- data/vendor/plugins/authentication/app/views/admin/users/index.html.erb +1 -2
- data/vendor/plugins/authentication/authentication.md +9 -1
- data/vendor/plugins/dashboard/dashboard.md +3 -3
- data/vendor/plugins/images/app/controllers/admin/images_controller.rb +17 -13
- data/vendor/plugins/images/app/helpers/admin/images_helper.rb +6 -0
- data/vendor/plugins/images/app/models/image.rb +24 -39
- data/vendor/plugins/images/app/views/admin/images/_form.html.erb +11 -4
- data/vendor/plugins/images/app/views/admin/images/_grid_view.html.erb +1 -2
- data/vendor/plugins/images/app/views/admin/images/_list_view_image.html.erb +1 -2
- data/vendor/plugins/images/app/views/admin/images/index.html.erb +1 -1
- data/vendor/plugins/images/app/views/admin/images/insert.html.erb +8 -71
- data/vendor/plugins/images/images.md +12 -7
- data/vendor/plugins/inquiries/app/views/admin/inquiries/_inquiry.html.erb +6 -13
- data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/index.html.erb +1 -2
- data/vendor/plugins/inquiries/inquiries.md +8 -8
- data/vendor/plugins/news/app/views/admin/news_items/_news_item.html.erb +1 -2
- data/vendor/plugins/news/news.md +4 -4
- data/vendor/plugins/pages/app/controllers/admin/page_dialogs_controller.rb +11 -10
- data/vendor/plugins/pages/app/controllers/admin/page_parts_controller.rb +5 -1
- data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +2 -2
- data/vendor/plugins/pages/app/models/page.rb +75 -29
- data/vendor/plugins/pages/app/models/page_part.rb +1 -1
- data/vendor/plugins/pages/app/views/admin/page_dialogs/_page_link.html.erb +2 -2
- data/vendor/plugins/pages/app/views/admin/page_dialogs/link_to.html.erb +8 -112
- data/vendor/plugins/pages/app/views/admin/pages/_form.html.erb +50 -154
- data/vendor/plugins/pages/app/views/admin/pages/_list.html.erb +10 -10
- data/vendor/plugins/pages/app/views/admin/pages/_page_part_field.html.erb +4 -4
- data/vendor/plugins/pages/app/views/admin/pages/_sortable_list.html.erb +1 -1
- data/vendor/plugins/pages/pages.md +30 -25
- data/vendor/plugins/refinery/app/views/admin/_head.html.erb +5 -14
- data/vendor/plugins/refinery/app/views/admin/_menu.html.erb +2 -64
- data/vendor/plugins/refinery/app/views/shared/_message.html.erb +0 -6
- data/vendor/plugins/refinery/app/views/shared/admin/_error_messages_for.html.erb +1 -6
- data/vendor/plugins/refinery/app/views/shared/admin/_form_actions.html.erb +8 -10
- data/vendor/plugins/refinery/app/views/shared/admin/_image_picker.html.erb +22 -38
- data/vendor/plugins/refinery/app/views/shared/admin/_make_sortable.html.erb +6 -65
- data/vendor/plugins/refinery/app/views/shared/admin/_resource_picker.html.erb +16 -16
- data/vendor/plugins/refinery/app/views/shared/admin/_sortable_list.html.erb +3 -4
- data/vendor/plugins/refinery/lib/crud.rb +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_singular_name.html.erb +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_sortable_list.html.erb +1 -1
- data/vendor/plugins/refinery/plugins.md +19 -12
- data/vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb +6 -4
- data/vendor/plugins/refinery_dialogs/app/views/admin/dialogs/show.html.erb +3 -3
- data/vendor/plugins/refinery_dialogs/app/views/layouts/admin_dialog.html.erb +7 -14
- data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/_refinery_setting.html.erb +1 -1
- data/vendor/plugins/refinery_settings/settings.md +51 -1
- data/vendor/plugins/resources/app/controllers/admin/resources_controller.rb +16 -11
- data/vendor/plugins/resources/app/views/admin/resources/_form.html.erb +9 -2
- data/vendor/plugins/resources/app/views/admin/resources/_resource.html.erb +1 -3
- data/vendor/plugins/resources/app/views/admin/resources/index.html.erb +2 -2
- data/vendor/plugins/resources/app/views/admin/resources/insert.html.erb +14 -60
- data/vendor/plugins/resources/resources.md +1 -1
- data/vendor/plugins/themes/app/controllers/admin/themes_controller.rb +6 -6
- data/vendor/plugins/themes/app/models/theme.rb +3 -3
- data/vendor/plugins/themes/app/views/admin/themes/_theme.html.erb +14 -20
- data/vendor/plugins/themes/themes.md +21 -19
- metadata +18 -19
- data/public/javascripts/builder.js +0 -136
- data/public/javascripts/controls.js +0 -963
- data/public/javascripts/dragdrop.js +0 -973
- data/public/javascripts/effects.js +0 -1128
- data/public/javascripts/fastinit.js +0 -84
- data/public/javascripts/livepipe.js +0 -180
- data/public/javascripts/prototype.js +0 -4874
- data/public/javascripts/refinery/dialog.js +0 -52
- data/public/javascripts/refinery/parse_url.js +0 -38
- data/public/javascripts/refinery/prototype.enhancements.js +0 -24
- data/public/javascripts/refinery/tooltips.js +0 -173
- data/public/javascripts/scriptaculous.js +0 -47
- data/public/javascripts/slider.js +0 -275
- data/public/javascripts/tabs.js +0 -149
- data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/_make_sortable.html.erb +0 -7
@@ -14,4 +14,10 @@ module Admin::ImagesHelper
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
+
def images_paginator(collection, dialog = false)
|
18
|
+
will_paginate collection, :previous_label => '« Previous',
|
19
|
+
:next_label => 'Next »',
|
20
|
+
:renderer => Refinery::LinkRenderer
|
21
|
+
#:params => {:controller => "admin/images", :action => "insert", :dialog => dialog }
|
22
|
+
end
|
17
23
|
end
|
@@ -1,52 +1,37 @@
|
|
1
1
|
class Image < ActiveRecord::Base
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
|
3
|
+
# Docs for attachment_fu http://github.com/technoweenie/attachment_fu
|
5
4
|
has_attachment :content_type => :image,
|
6
5
|
:storage => (USE_S3_BACKEND ? :s3 : :file_system),
|
7
6
|
:path_prefix => (USE_S3_BACKEND ? nil : 'public/system/images'),
|
8
7
|
:processor => 'Rmagick',
|
9
8
|
:thumbnails => ((((thumbnails = RefinerySetting.find_or_set(:image_thumbnails, {})).is_a?(Hash) ? thumbnails : (RefinerySetting[:image_thumbnails] = {}))) rescue {}),
|
10
|
-
:max_size =>
|
11
|
-
|
9
|
+
:max_size => 50.megabytes
|
10
|
+
|
11
|
+
# Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
|
12
12
|
acts_as_indexed :fields => [:title],
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
13
|
+
:index_file => [RAILS_ROOT,"tmp","index"]
|
14
|
+
|
15
|
+
named_scope :thumbnails, :conditions => "parent_id NOT NULL"
|
16
|
+
named_scope :originals, :conditions => {:parent_id => nil}
|
17
|
+
|
18
|
+
# when a dialog pops up with images, how many images per page should there be
|
19
|
+
PAGES_PER_DIALOG = 18
|
20
|
+
|
21
|
+
# when listing images out in the admin area, how many images should show per page
|
22
|
+
PAGES_PER_ADMIN_INDEX = 20
|
23
|
+
|
24
|
+
validates_as_attachment
|
25
|
+
|
26
|
+
# Returns a titleized version of the filename
|
27
|
+
# my_file.jpg returns My File
|
28
28
|
def title
|
29
29
|
self.filename.gsub(/\.\w+$/, '').titleize
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
|
+
# How many images per page should be displayed?
|
32
33
|
def self.per_page(dialog = false)
|
33
|
-
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.last_page(images, dialog=false)
|
37
|
-
page = unless images.size <= self.per_page(dialog)
|
38
|
-
(images.size / self.per_page(dialog).to_f).ceil
|
39
|
-
else
|
40
|
-
nil # this must be nil, it can't be 0 as there apparently isn't a 0th page.
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def self.thumbnails
|
45
|
-
find(:all, :conditions => "parent_id not null")
|
46
|
-
end
|
47
|
-
|
48
|
-
def self.originals
|
49
|
-
find_all_by_parent_id(nil)
|
34
|
+
dialog ? PAGES_PER_DIALOG : PAGES_PER_ADMIN_INDEX
|
50
35
|
end
|
51
36
|
|
52
|
-
end
|
37
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<%= error_messages_for
|
1
|
+
<%= error_messages_for(:image).gsub("Content type is not included in the list", "Your image must be either a JPG, PNG or GIF") %>
|
2
2
|
|
3
|
-
<% form_for [:admin, @image], :url => @url_override || @url,
|
3
|
+
<% form_for [:admin, @image], :url => @url_override || @url,
|
4
4
|
:html => {:multipart => true, :style => 'float: left; width: 70%'} do |f| %>
|
5
5
|
<div class='field'>
|
6
6
|
<%= f.label :uploaded_data, 'Image' %>
|
7
7
|
<% if params[:action] =~ /(edit)|(update)/ %>
|
8
8
|
Use current image
|
9
|
-
<em>or</em>, replace it with this one...
|
9
|
+
<em>or</em>, replace it with this one...
|
10
10
|
<% end %>
|
11
11
|
<%= f.file_field :uploaded_data %>
|
12
12
|
</div>
|
@@ -28,4 +28,11 @@
|
|
28
28
|
<label>Current Image</label>
|
29
29
|
<%= image_fu @image, :medium, { :class => "brown_border" } %>
|
30
30
|
</div>
|
31
|
-
<% end %>
|
31
|
+
<% end %>
|
32
|
+
<% content_for :head do %>
|
33
|
+
<script type='text/javascript'>
|
34
|
+
$(document).ready(function(){
|
35
|
+
image_dialog.init();
|
36
|
+
});
|
37
|
+
</script>
|
38
|
+
<% end if from_dialog? %>
|
@@ -8,8 +8,7 @@
|
|
8
8
|
<%= link_to refinery_icon_tag('application_edit.png'), edit_admin_image_path(image),
|
9
9
|
:title => 'Edit this image' %>
|
10
10
|
<%= link_to refinery_icon_tag('delete.png'), admin_image_path(image),
|
11
|
-
|
12
|
-
:class => "cancel", :method => :delete,
|
11
|
+
:class => "cancel confirm-delete",
|
13
12
|
:title => "Remove this image forever" %>
|
14
13
|
</span>
|
15
14
|
</li>
|
@@ -7,8 +7,7 @@
|
|
7
7
|
<%= link_to refinery_icon_tag('application_edit.png'), edit_admin_image_path(list_view_image),
|
8
8
|
:title => 'Edit this image' %>
|
9
9
|
<%= link_to refinery_icon_tag('delete.png'), admin_image_path(list_view_image),
|
10
|
-
:
|
11
|
-
:class => "cancel", :method => :delete,
|
10
|
+
:class => "cancel confirm-delete",
|
12
11
|
:title => "Remove this image forever" %>
|
13
12
|
</span>
|
14
13
|
<%= list_view_image.title %> <span class="preview"> </span>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= render :partial => "/shared/admin/search", :locals => {:url => admin_images_url} %>
|
5
5
|
</li>
|
6
6
|
<li>
|
7
|
-
<%= link_to "Create New Image", new_admin_image_url, :class => "add_icon" %>
|
7
|
+
<%= link_to "Create New Image", new_admin_image_url(:dialog => true, :width => 600, :height => 300), :class => "add_icon" %>
|
8
8
|
</li>
|
9
9
|
</ul>
|
10
10
|
<ul>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div class='clearfix'>
|
2
2
|
<div id='dialog_menu_left'>
|
3
3
|
<% unless @images.empty? %>
|
4
|
-
<span id=
|
4
|
+
<span id="existing_image_radio" class="radio<%= " selected_radio" if @image.errors.empty? || !@images.empty? %>">
|
5
5
|
<input type='radio' name='image_type' value='existing_image' id='image_type_existing' <%= "checked='true'" if @image.errors.empty? %> />
|
6
6
|
<label for='image_type_existing' class='stripped'>Existing Image</label>
|
7
7
|
</span>
|
8
8
|
<% end %>
|
9
|
-
<span id=
|
10
|
-
<input type='radio' name='image_type' value='upload_image' id='image_type_upload' <%= "checked='true'" if @images.empty?
|
9
|
+
<span id="upload_image_radio" class="radio<%= " selected_radio" if @image.errors.size > 0 || @images.empty? %>">
|
10
|
+
<input type='radio' name='image_type' value='upload_image' id='image_type_upload' <%= "checked='true'" if @images.empty? || !@image.errors.empty? %> />
|
11
11
|
<label for='image_type_upload' class='stripped'>New Image</label>
|
12
12
|
</span>
|
13
13
|
</div>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<% end -%>
|
26
26
|
</ul>
|
27
27
|
</div>
|
28
|
-
<%=
|
28
|
+
<%= images_paginator @images, from_dialog? %>
|
29
29
|
</div>
|
30
30
|
<% end %>
|
31
31
|
<div id='upload_image_area' class='dialog_area' <%= "style='display:none;'" unless @images.empty? %>>
|
@@ -38,76 +38,13 @@
|
|
38
38
|
<%= submit_tag 'Insert', :id => "submit_button" %>
|
39
39
|
or
|
40
40
|
<%= link_to "Cancel", "", :id => "cancel_button", :class => "close_dialog" %>
|
41
|
-
|
42
|
-
<%= will_paginate @images, :previous_label => '« Previous', :next_label => 'Next »', :renderer => Refinery::LinkRenderer, :url => {:controller => "admin/images", :action => "insert", :dialog => @dialog } %>
|
43
41
|
</div>
|
44
42
|
<% end %>
|
43
|
+
|
45
44
|
<% content_for :head do %>
|
46
|
-
<%= javascript_include_tag 'refinery/parse_url' %>
|
47
45
|
<script type='text/javascript'>
|
48
|
-
|
49
|
-
|
50
|
-
$$('#existing_image_area_content ul li.selected').each(function(selected)
|
51
|
-
{
|
52
|
-
$(selected).removeClassName('selected');
|
53
|
-
});
|
54
|
-
if (img != null) {
|
55
|
-
$(img.parentNode).addClassName('selected');
|
56
|
-
imageUrl = parseURL(img.src);
|
57
|
-
relevant_src = imageUrl.pathname.replace('_dialog_thumb', '');
|
58
|
-
// Add any alternate image stores that need a absolute URL in the regex below
|
59
|
-
if( imageUrl.hostname.match(/s3.amazonaws.com/) ) {
|
60
|
-
relevant_src = imageUrl.protocol + '//' + imageUrl.host + relevant_src;
|
61
|
-
}
|
62
|
-
<% unless @thickbox %>
|
63
|
-
try {
|
64
|
-
parent.document.getElementById('wym_src').value = relevant_src;
|
65
|
-
parent.document.getElementById('wym_title').value = img.title;
|
66
|
-
parent.document.getElementById('wym_alt').value = img.alt;
|
67
|
-
}
|
68
|
-
catch($e){}
|
69
|
-
|
70
|
-
<% end %>
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
|
-
FastInit.addOnLoad(function()
|
75
|
-
{
|
76
|
-
<% unless @image_id.nil? %>
|
77
|
-
set_image($('image_<%= @image_id %>'));
|
78
|
-
<% end %>
|
79
|
-
$$('#existing_image_area_content ul li img').each(function(img)
|
80
|
-
{
|
81
|
-
img.observe('click', function(){set_image(this);});
|
82
|
-
});
|
83
|
-
|
84
|
-
<% if @thickbox %>
|
85
|
-
$('dialog-form-actions').down('#submit_button').observe('click', function(e)
|
86
|
-
{
|
87
|
-
selected = null;
|
88
|
-
$$('#existing_image_area_content ul li.selected img').each(function(selected_img)
|
89
|
-
{
|
90
|
-
selected = selected_img;
|
91
|
-
});
|
92
|
-
if (selected != null)
|
93
|
-
{
|
94
|
-
<% unless @field.blank? %>
|
95
|
-
if ((field = parent.document.getElementById('<%= @field %>')) != null)
|
96
|
-
{
|
97
|
-
field.value = selected.id.replace("image_", "");
|
98
|
-
}
|
99
|
-
if ((image = parent.document.getElementById('<%= @update_image %>')) != null)
|
100
|
-
{
|
101
|
-
image.src = selected.src.replace("_dialog_thumb", '<%= "_#{@thumbnail}" unless @thumbnail.blank? %>');
|
102
|
-
$(image).writeAttribute("width", null).writeAttribute("height", null);
|
103
|
-
}
|
104
|
-
<% end %>
|
105
|
-
<%= "self.parent.#{@callback}();" unless @callback.blank? %>
|
106
|
-
self.parent.tb_remove();
|
107
|
-
}
|
108
|
-
e.stop();
|
109
|
-
});
|
110
|
-
<% end %>
|
46
|
+
$(document).ready(function(){
|
47
|
+
image_dialog.init();
|
111
48
|
});
|
112
49
|
</script>
|
113
|
-
<% end %>
|
50
|
+
<% end %>
|
@@ -4,10 +4,9 @@
|
|
4
4
|
|
5
5
|
## About
|
6
6
|
|
7
|
-
All Refinery's images are stored in one place, the images plugin.
|
7
|
+
All Refinery's images are stored in one place, the images plugin. You can customise what sized thumbnails are generated when an image is uploaded.
|
8
8
|
|
9
|
-
|
10
|
-
* Provides convenient links to common tasks.
|
9
|
+
Images and other file uploads are handled using [attachment_fu](http://github.com/technoweenie/attachment_fu)
|
11
10
|
|
12
11
|
## Generating Thumbnails
|
13
12
|
|
@@ -15,7 +14,7 @@ Refinery lets you generate a range of thumbnails when an image is uploaded so yo
|
|
15
14
|
|
16
15
|
To specify the sizes of your thumbnails edit the "Image Thumbnails" setting.
|
17
16
|
|
18
|
-
This setting is stored as a
|
17
|
+
This setting is stored as a serialized hash and is directly passed to [attachment_fu](http://github.com/technoweenie/attachment_fu)
|
19
18
|
|
20
19
|
Here's what the default looks like
|
21
20
|
|
@@ -28,16 +27,22 @@ Here's what the default looks like
|
|
28
27
|
:thumb: 50x50
|
29
28
|
:side_body: 300x500
|
30
29
|
|
31
|
-
Refinery requires some of these so you won't want to delete any, but add new ones to meet your design needs. Each thumbnail is not just a size guide but a RMagick geometry string that allows you to define min and max size too.
|
30
|
+
Refinery requires some of these, so you won't want to delete any, but add new ones to meet your design needs. Each thumbnail is not just a size guide but a [RMagick geometry string](http://www.imagemagick.org/RMagick/doc/imusage.html#geometry) that allows you to define min and max size too.
|
32
31
|
|
33
|
-
Refinery also extends the geometry string support to allow cropping. Here's some examples
|
32
|
+
Refinery also extends the [geometry string](http://www.imagemagick.org/RMagick/doc/imusage.html#geometry) support to allow cropping. Here's some examples
|
34
33
|
|
35
34
|
:grid: c135x135
|
36
35
|
|
37
|
-
This will crop (_that's what the "c" stands for_) the
|
36
|
+
This will crop (_that's what the "c" stands for_) the grid thumbnail down to ``135x135`` exactly, without stretching the image.
|
38
37
|
|
39
38
|
_Note: you will have to restart your web server after changing this setting for the changes to take effect._
|
40
39
|
|
40
|
+
## Using a Thumbnail Size in Your Theme or View
|
41
|
+
|
42
|
+
Take the default thumbnails above to use the ``:side_body`` thumbnail I would collect that image out of the database and apply it like this in my view:
|
43
|
+
|
44
|
+
<%= image_tag(@image.public_filename(:side_body)) %>
|
45
|
+
|
41
46
|
## Related Settings
|
42
47
|
|
43
48
|
### "Preferred Image View"
|
@@ -1,19 +1,12 @@
|
|
1
1
|
<li class='clearfix record <%= cycle("on", "on-hover") %>'>
|
2
2
|
<span class='title'>
|
3
3
|
<span class='actions'>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<% end %>
|
11
|
-
<%= link_to refinery_icon_tag('email_open.png'), {:action => 'show', :id => inquiry.id},
|
12
|
-
{:title => "Read this inquiry"} -%>
|
13
|
-
<%= link_to refinery_icon_tag('delete.png'), admin_inquiry_url(inquiry),
|
14
|
-
:method => :delete, :class => "cancel",
|
15
|
-
:confirm => "Are you sure you want to delete #{inquiry.name}?",
|
16
|
-
:title => "Remove this inquiry forever" -%>
|
4
|
+
<%= link_to refinery_icon_tag("#{inquiry.open? ? 'accept' : 'arrow_up'}.png"), {:action => "toggle_status", :id => inquiry.id},
|
5
|
+
{:title => "Move this inquiry to #{inquiry.open? ? 'closed' : 'open'}"} %>
|
6
|
+
<%= link_to refinery_icon_tag('email_open.png'), {:action => 'show', :id => inquiry.id},
|
7
|
+
{:title => "Read this inquiry"} -%>
|
8
|
+
<%= link_to refinery_icon_tag('delete.png'), admin_inquiry_url(inquiry), :class => "cancel confirm-delete",
|
9
|
+
:title => "Remove this inquiry forever" -%>
|
17
10
|
</span>
|
18
11
|
<%=h inquiry.name %>
|
19
12
|
<span class="preview">
|
@@ -19,8 +19,7 @@
|
|
19
19
|
<span class='actions'>
|
20
20
|
<%= link_to refinery_icon_tag("application_edit.png", :alt => "Edit"), edit_admin_inquiry_setting_path(setting) %>
|
21
21
|
<%= link_to refinery_icon_tag("delete.png", :alt => "Delete"), admin_inquiry_setting_path(setting),
|
22
|
-
|
23
|
-
:class => "cancel", :method => :delete ,
|
22
|
+
:class => "cancel confirm-delete" ,
|
24
23
|
:title => "Remove this inquiry setting forever" if setting.destroyable? %>
|
25
24
|
</span>
|
26
25
|
<span><%=h setting.name %></span>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
## About
|
6
6
|
|
7
|
-
|
7
|
+
__Refinery gives you a simple contact form that notifies you and the customer when an inquiry is made.__
|
8
8
|
|
9
9
|
In summary you can:
|
10
10
|
|
@@ -14,18 +14,18 @@ In summary you can:
|
|
14
14
|
|
15
15
|
When inquiries come in, you and the customer are notified. The inquiry will now show up as an "open" inquiry. The idea is to deal with the inquiry and then "close" it so you know it's been sorted.
|
16
16
|
|
17
|
-
|
17
|
+
## How do I get Notified?
|
18
18
|
|
19
|
-
Go into your
|
19
|
+
Go into your 'Inquiries' tab in the Refinery admin area and click on "Update who gets notified"
|
20
20
|
|
21
|
-
|
21
|
+
## How do I Edit the Automatic Confirmation Email
|
22
22
|
|
23
|
-
Go into your
|
23
|
+
Go into your 'Inquiries' tab in the Refinery admin area and click on "Edit confirmation email"
|
24
24
|
|
25
|
-
|
25
|
+
## But I don't ant a Contact Form how do I kill it?
|
26
26
|
|
27
27
|
Your contact form loads because you have a page in your site that is told to not just render a normal page, but load the contact form instead.
|
28
28
|
|
29
|
-
By default this page is called "Contact Us". Go to your "Pages" tab and click the edit icon on "Contact Us". Now
|
29
|
+
By default this page is called "Contact Us". Go to your "Pages" tab in the Refinery admin area and click the edit icon on "Contact Us". Now click on "Hide/Show Advanced Options" and you'll see that a "Custom URL" is set to ``/inquiries/new``. Simply change this to nothing, or delete the contact us page.
|
30
30
|
|
31
|
-
You might also want to remove the Inquiries plugin from your backend view. To do that, you go to the "Users" tab edit your user, uncheck "Inquiries" from the list of plugins you can access.
|
31
|
+
You might also want to remove the Inquiries plugin from your backend view. To do that, you go to the "Users" tab in the Refinery admin area, edit your user, uncheck "Inquiries" from the list of plugins you can access.
|
@@ -6,8 +6,7 @@
|
|
6
6
|
<%= link_to refinery_icon_tag('application_edit.png'), edit_admin_news_item_path(news_item),
|
7
7
|
:title => 'Edit this news item' %>
|
8
8
|
<%= link_to refinery_icon_tag('delete.png'), admin_news_item_path(news_item),
|
9
|
-
|
10
|
-
:class => "cancel", :method => :delete,
|
9
|
+
:class => "cancel confirm-delete",
|
11
10
|
:title => "Remove this news item forever" %>
|
12
11
|
</span>
|
13
12
|
<%=h news_item.title %> <span class="preview"> </span>
|
data/vendor/plugins/news/news.md
CHANGED
@@ -4,17 +4,17 @@
|
|
4
4
|
|
5
5
|
## About
|
6
6
|
|
7
|
-
|
7
|
+
__Refinery's news plugin allows you to post updates to the news section of your website.__
|
8
8
|
|
9
9
|
Key features:
|
10
10
|
|
11
11
|
* Default news page shows a summary of recent news posts
|
12
12
|
* Detail view shows the full post and also linked to recent news on the "side bar"
|
13
13
|
|
14
|
-
## But I don't want a
|
14
|
+
## But I don't want a News Section, how do I kill it?
|
15
15
|
|
16
16
|
Your news section loads because you have a page in your site that is told to not just render a normal page, but load the news section instead.
|
17
17
|
|
18
|
-
By default this page is called "News". Go to your "Pages" tab and click the edit icon on "News". Now click on "Hide/Show Advanced Options" and you'll see that a "
|
18
|
+
By default this page is called "News". Go to your "Pages" tab in the Refinery admin area and click the edit icon on "News". Now click on "Hide/Show Advanced Options" and you'll see that a "Custom URL" is set to ``/news``. Simply change this to nothing, or delete the "News" page.
|
19
19
|
|
20
|
-
You might also want to remove the News plugin from your backend view. To do that, you go to the "Users" tab edit your user, uncheck "News" from the list of plugins you can access.
|
20
|
+
You might also want to remove the News plugin from your backend view. To do that, you go to the "Users" tab in the Refinery admin area, edit your user, uncheck "News" from the list of plugins you can access.
|
@@ -22,25 +22,26 @@ class Admin::PageDialogsController < Admin::DialogsController
|
|
22
22
|
|
23
23
|
response = http.request request
|
24
24
|
|
25
|
-
render :
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
render :json => case response
|
26
|
+
when Net::HTTPSuccess, Net::HTTPRedirection
|
27
|
+
{:result => 'success'}
|
28
|
+
else
|
29
|
+
{:result => 'failure'}
|
30
|
+
end
|
31
31
|
end
|
32
32
|
|
33
33
|
rescue
|
34
|
-
render :
|
34
|
+
render :json => {:result => 'failure'}
|
35
35
|
end
|
36
36
|
|
37
37
|
def test_email
|
38
38
|
unless params[:email].blank?
|
39
39
|
valid = params[:email] =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
|
40
|
-
|
41
|
-
|
40
|
+
|
41
|
+
render :json => if valid
|
42
|
+
{:result => 'success'}
|
42
43
|
else
|
43
|
-
|
44
|
+
{:result => 'failure'}
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|