refinerycms 0.9.7.5 → 0.9.7.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -4
- data/bin/refinery +3 -141
- data/bin/refinery-upgrade-096-to-097 +39 -32
- data/bin/refinerycms +150 -0
- data/changelog.md +25 -12
- data/db/schema.rb +1 -1
- data/features/refinery/site_bar.feature +5 -4
- data/features/step_definitions/refinery/page_steps.rb +6 -2
- data/lib/gemspec.rb +1 -1
- data/lib/refinery/tasks/refinery.rake +24 -18
- data/lib/tasks/rspec.rake +0 -1
- data/public/javascripts/refinery/admin.js +3 -9
- data/public/javascripts/refinery/boot_wym.js +3 -3
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +5 -5
- data/public/javascripts/wymeditor/lang/pt-br.js +44 -43
- data/public/stylesheets/refinery/refinery.css +37 -34
- data/readme.md +3 -6
- data/test/test_helper.rb +1 -1
- data/test/unit/image_test.rb +6 -2
- data/vendor/plugins/authentication/app/controllers/users_controller.rb +4 -5
- data/vendor/plugins/authentication/config/locales/pt-BR.yml +22 -19
- data/vendor/plugins/dashboard/config/locales/pt-BR.yml +2 -1
- data/vendor/plugins/images/app/controllers/admin/images_controller.rb +9 -5
- data/vendor/plugins/images/app/models/image.rb +15 -3
- data/vendor/plugins/images/app/views/admin/images/{_existing_image.erb → _existing_image.html.erb} +2 -2
- data/vendor/plugins/images/app/views/admin/images/index.html.erb +8 -4
- data/vendor/plugins/images/app/views/admin/images/insert.html.erb +28 -9
- data/vendor/plugins/images/config/locales/en.yml +5 -1
- data/vendor/plugins/images/config/locales/es.yml +1 -1
- data/vendor/plugins/images/config/locales/nl.yml +1 -1
- data/vendor/plugins/images/config/locales/pt-BR.yml +6 -2
- data/vendor/plugins/inquiries/app/views/admin/inquiries/index.html.erb +1 -1
- data/vendor/plugins/inquiries/app/views/admin/inquiries/show.html.erb +2 -2
- data/vendor/plugins/inquiries/app/views/admin/inquiries/spam.html.erb +1 -1
- data/vendor/plugins/inquiries/config/locales/en.yml +1 -0
- data/vendor/plugins/inquiries/config/locales/pt-BR.yml +12 -9
- data/vendor/plugins/pages/app/controllers/admin/{page_dialogs_controller.rb → pages_dialogs_controller.rb} +8 -6
- data/vendor/plugins/pages/app/models/page.rb +1 -1
- data/vendor/plugins/pages/app/views/admin/{page_dialogs → pages_dialogs}/_page_link.html.erb +0 -0
- data/vendor/plugins/pages/app/views/admin/{page_dialogs → pages_dialogs}/link_to.html.erb +11 -9
- data/vendor/plugins/pages/config/locales/en.yml +1 -1
- data/vendor/plugins/pages/config/locales/pt-BR.yml +27 -0
- data/vendor/plugins/pages/config/locales/sl.yml +1 -1
- data/vendor/plugins/pages/config/routes.rb +5 -3
- data/vendor/plugins/pages/rails/init.rb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_form_actions.html.erb +19 -12
- data/vendor/plugins/refinery/app/views/shared/admin/_image_picker.html.erb +15 -5
- data/vendor/plugins/refinery/config/locales/pt-BR.yml +2 -0
- data/vendor/plugins/refinery/lib/refinery.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/admin_base_controller.rb +0 -1
- data/vendor/plugins/refinery/lib/refinery/initializer.rb +2 -2
- data/vendor/plugins/refinery/lib/refinery/link_renderer.rb +6 -2
- data/vendor/plugins/refinery/lib/tasks/refinery.rake +1 -1
- data/vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb +2 -4
- data/vendor/plugins/refinery_settings/app/controllers/admin/refinery_settings_controller.rb +2 -2
- data/vendor/plugins/refinery_settings/config/locales/pt-BR.yml +17 -17
- data/vendor/plugins/resources/app/controllers/admin/resources_controller.rb +4 -0
- data/vendor/plugins/resources/app/models/resource.rb +2 -6
- data/vendor/plugins/resources/app/views/admin/resources/_existing_resource.html.erb +3 -3
- data/vendor/plugins/resources/app/views/admin/resources/_form.html.erb +8 -5
- data/vendor/plugins/resources/app/views/admin/resources/insert.html.erb +33 -10
- data/vendor/plugins/resources/config/locales/da.yml +1 -1
- data/vendor/plugins/resources/config/locales/pt-BR.yml +4 -3
- metadata +15 -12
- data/vendor/plugins/authentication/test/functional/admin/base_controller_test.rb +0 -8
- data/vendor/plugins/authentication/test/functional/admin/dashboard_controller_test.rb +0 -8
- data/vendor/plugins/authentication/test/functional/admin/pages_controller_test.rb +0 -8
- data/vendor/plugins/authentication/test/test_helper.rb +0 -38
@@ -1,4 +1,4 @@
|
|
1
|
-
class Admin::
|
1
|
+
class Admin::PagesDialogsController < Admin::DialogsController
|
2
2
|
|
3
3
|
require 'net/http'
|
4
4
|
|
@@ -10,7 +10,9 @@ class Admin::PageDialogsController < Admin::DialogsController
|
|
10
10
|
:order => 'position ASC',
|
11
11
|
:per_page => Page.per_page(dialog=true)
|
12
12
|
|
13
|
-
@resources = Resource.paginate :page => params[:resource_page],
|
13
|
+
@resources = Resource.paginate :page => params[:resource_page],
|
14
|
+
:order => 'created_at DESC',
|
15
|
+
:per_page => Resource.per_page(dialog=true)
|
14
16
|
|
15
17
|
# web address link
|
16
18
|
@web_address_text = "http://"
|
@@ -51,12 +53,12 @@ class Admin::PageDialogsController < Admin::DialogsController
|
|
51
53
|
|
52
54
|
response = http.request request
|
53
55
|
|
54
|
-
render :json => case response
|
56
|
+
render :json => {:result => case response
|
55
57
|
when Net::HTTPSuccess, Net::HTTPRedirection
|
56
|
-
|
58
|
+
'success'
|
57
59
|
else
|
58
|
-
|
59
|
-
end
|
60
|
+
'failure'
|
61
|
+
end }
|
60
62
|
end
|
61
63
|
|
62
64
|
rescue
|
@@ -5,7 +5,7 @@ class Page < ActiveRecord::Base
|
|
5
5
|
|
6
6
|
# Docs for friendly_id http://github.com/norman/friendly_id
|
7
7
|
has_friendly_id :title, :use_slug => true,
|
8
|
-
|
8
|
+
:reserved_words => %w(index new session login logout users refinery admin images wymiframe)
|
9
9
|
|
10
10
|
has_many :parts, :class_name => "PagePart", :order => "position ASC", :inverse_of => :page
|
11
11
|
accepts_nested_attributes_for :parts, :allow_destroy => true
|
data/vendor/plugins/pages/app/views/admin/{page_dialogs → pages_dialogs}/_page_link.html.erb
RENAMED
File without changes
|
@@ -27,14 +27,14 @@
|
|
27
27
|
<ul class="link_list">
|
28
28
|
<%= render :partial => "page_link", :collection => @pages, :locals => {:child => false} %>
|
29
29
|
</ul>
|
30
|
+
<%= will_paginate @pages,
|
31
|
+
:param_name => :page,
|
32
|
+
:previous_label => '«',
|
33
|
+
:next_label => '»',
|
34
|
+
:renderer => Refinery::LinkRenderer,
|
35
|
+
:id => 'pages_paginate' %>
|
30
36
|
</div>
|
31
37
|
</div>
|
32
|
-
<%= will_paginate @pages,
|
33
|
-
:param_name => :page,
|
34
|
-
:previous_label => '« Previous',
|
35
|
-
:next_label => 'Next »',
|
36
|
-
:renderer => Refinery::LinkRenderer,
|
37
|
-
:url => {:paginating => "your_page"} %>
|
38
38
|
</div>
|
39
39
|
<div id='web_address_area' <%= "style='display: none'" unless @web_address_area_selected %> class='dialog_area'>
|
40
40
|
<div id='web_address_content'>
|
@@ -90,7 +90,7 @@
|
|
90
90
|
</ol>
|
91
91
|
</div>
|
92
92
|
</div>
|
93
|
-
<div id="resource_file_area"
|
93
|
+
<div id="resource_file_area"<%= " style='display:none'" unless @resource_area_selected %> class="dialog_area">
|
94
94
|
<div id='pages_list'>
|
95
95
|
<ul class="link_list">
|
96
96
|
<% @resources.each do |resource| -%>
|
@@ -98,7 +98,8 @@
|
|
98
98
|
<li<%= " class='linked'" if @resource_linked %>>
|
99
99
|
<%= link_to "#{resource.title}.#{resource.filename.split('.')[1]}", resource.public_filename,
|
100
100
|
:title => t('.your_resource.link_to_this_resource'),
|
101
|
-
:rel => resource.title,
|
101
|
+
:rel => resource.title,
|
102
|
+
:class => "page_link #{resource.filename.split('.')[1]}" %>
|
102
103
|
</li>
|
103
104
|
<% end %>
|
104
105
|
</ul>
|
@@ -107,7 +108,8 @@
|
|
107
108
|
:previous_label => '«',
|
108
109
|
:next_label => '»',
|
109
110
|
:renderer => Refinery::LinkRenderer,
|
110
|
-
:url => {:paginating => "resource_file"}
|
111
|
+
:url => {:paginating => "resource_file"},
|
112
|
+
:id => 'resouces_paginate' %>
|
111
113
|
</div>
|
112
114
|
</div>
|
113
115
|
</div>
|
@@ -21,6 +21,32 @@ pt-BR:
|
|
21
21
|
meta_description_help: Meta descrição
|
22
22
|
show_in_menu: Mostrar no menu
|
23
23
|
admin:
|
24
|
+
pages_dialogs:
|
25
|
+
not_allowed: Você não ter permissão para acessar esta funcionalidade.
|
26
|
+
page_link:
|
27
|
+
link_to_this_page: Redirecionar para esta página
|
28
|
+
link_to:
|
29
|
+
your_page:
|
30
|
+
tab_name: Sua página
|
31
|
+
web_address:
|
32
|
+
tab_name: Website
|
33
|
+
location: Localização
|
34
|
+
new_window: Nova janela
|
35
|
+
new_window_label: Marque essa opção que o link abra uma nova janela no navegador.
|
36
|
+
not_sure: Não sabe ao certo o que colocar na caixa acima?
|
37
|
+
step1: Procure o site na web para onde você quer redirecionar.
|
38
|
+
step2: "Copie o endereço do site da barra de navegação do seu navegador e cole na caixa acima."
|
39
|
+
email_address:
|
40
|
+
tab_name: Endereço de email
|
41
|
+
subject_line_optional: Título opcional
|
42
|
+
body_optional: Corpo opcional
|
43
|
+
not_sure: Não sabe ao certo o que colocar na caixa acima?
|
44
|
+
step1: "Escreva ou copie e cole (ex. do seu catálogo de email) o endereço de email e coloque dentro do '<strong>Email address</strong>' na caixa acima."
|
45
|
+
step2: "Use o '<strong>Subject Line</strong>' na caixa acima se você quer que a mensagem seja composta por <strong>pre-written subject line</strong>."
|
46
|
+
step3: "Use o <strong>Email Body</strong> na caixa acima se você quer que a mensagem seja composta por <strong>pre-written message</strong>."
|
47
|
+
your_resource:
|
48
|
+
tab_name: Seu arquivo
|
49
|
+
link_to_this_resource: Link para este arquivo
|
24
50
|
pages:
|
25
51
|
page:
|
26
52
|
view_live: Vizualizar essa página agora <br/><em>(irá abrir uma nova janela)</em>
|
@@ -30,6 +56,7 @@ pt-BR:
|
|
30
56
|
hidden: oculta
|
31
57
|
draft: rascunho
|
32
58
|
form_advanced_options:
|
59
|
+
toggle_advanced_options: Clique aqui para acessar as configurações de meta tag e opções do menu
|
33
60
|
create_content_section: Criar seção de conteúdo
|
34
61
|
delete_content_section: Remover seção de conteúdo
|
35
62
|
advanced_options: Opções Avançadas
|
@@ -4,8 +4,10 @@ ActionController::Routing::Routes.draw do |map|
|
|
4
4
|
map.namespace(:admin, :path_prefix => 'refinery') do |admin|
|
5
5
|
admin.resources :pages, :collection => {:update_positions => :post}
|
6
6
|
admin.resources :page_parts
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
admin.resources :pages_dialogs, :as => 'pages/dialogs', :collection => {
|
8
|
+
:link_to => :get,
|
9
|
+
:test_url => :get,
|
10
|
+
:test_email => :get
|
11
|
+
}
|
10
12
|
end
|
11
13
|
end
|
@@ -4,7 +4,7 @@ Refinery::Plugin.register do |plugin|
|
|
4
4
|
plugin.directory = "pages"
|
5
5
|
plugin.description = "Manage content pages"
|
6
6
|
plugin.version = 1.0
|
7
|
-
plugin.menu_match = /(refinery|admin)\/page(
|
7
|
+
plugin.menu_match = /(refinery|admin)\/page(_part)?s(_dialogs)?$/
|
8
8
|
plugin.activity = {
|
9
9
|
:class => Page,
|
10
10
|
:url_prefix => "edit",
|
@@ -1,15 +1,21 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
unless (hide_submit ||= false)
|
3
|
+
submit_button_text ||= t('.save')
|
4
|
+
submit_button_id ||= "submit_button"
|
5
|
+
submit_button_title ||= nil
|
6
|
+
end
|
7
|
+
|
8
|
+
unless defined?(hide_cancel).presence
|
9
|
+
hide_cancel = from_dialog?
|
10
|
+
end
|
5
11
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
cancel_url ||= (( back = url_for(:back)).include?('javascript') ? send("admin_#{f.object.class.name.pluralize.underscore}_url") : back) unless hide_cancel
|
12
|
+
unless hide_cancel
|
13
|
+
cancel_button_text ||= t('.cancel')
|
14
|
+
cancel_title ||= t('.cancel_lose_changes', :object_name => f.object.class.name.underscore.gsub("_", " "))
|
15
|
+
cancel_button_id ||= "cancel_button"
|
11
16
|
|
12
|
-
|
17
|
+
cancel_url ||= (((back = url_for(:back)).include?('javascript') or action_name =~ /^(create|update)$/) ? send("admin_#{f.object.class.name.pluralize.underscore}_url") : back)
|
18
|
+
end
|
13
19
|
|
14
20
|
continue_editing = defined?(continue_editing) ? continue_editing : (f.object.present? and !f.object.new_record?)
|
15
21
|
|
@@ -20,6 +26,7 @@
|
|
20
26
|
end
|
21
27
|
|
22
28
|
unless hide_delete
|
29
|
+
delete_button_text ||= t('.delete')
|
23
30
|
delete_title ||= nil
|
24
31
|
delete_button_id ||= "delete_button"
|
25
32
|
delete_url ||= eval("admin_#{f.object.class.name.underscore}_url(#{f.object.id})")
|
@@ -30,7 +37,7 @@
|
|
30
37
|
<%= submit_tag submit_button_text,
|
31
38
|
:id => submit_button_id,
|
32
39
|
:class => "wymupdate button",
|
33
|
-
:tooltip => submit_button_title %>
|
40
|
+
:tooltip => submit_button_title unless hide_submit %>
|
34
41
|
|
35
42
|
<%= render :partial => "/shared/admin/continue_editing", :locals => {:f => f} if continue_editing -%>
|
36
43
|
<%= hidden_field_tag :continue_editing, false %>
|
@@ -49,8 +56,8 @@
|
|
49
56
|
:class => "button confirm-delete") unless hide_delete %>
|
50
57
|
|
51
58
|
<%= will_paginate paginate[:collection],
|
52
|
-
:previous_label =>
|
53
|
-
:next_label => t('.next')
|
59
|
+
:previous_label => paginate[:previous_label] ||= "« #{t('.previous')}",
|
60
|
+
:next_label => paginate[:next_label] ||= "#{t('.next')} »",
|
54
61
|
:renderer => Refinery::LinkRenderer,
|
55
62
|
:url => paginate[:url] if ((paginate ||= {}).length > 0 &&
|
56
63
|
paginate.keys.include?(:collection) &&
|
@@ -3,15 +3,21 @@
|
|
3
3
|
thumbnail ||= "medium"
|
4
4
|
toggle_image_display ||= false
|
5
5
|
randomiser = rand(Time.now.yesterday.to_i * Time.now.to_i)
|
6
|
+
current_image_link_href = insert_admin_images_url(:dialog => true,
|
7
|
+
:callback => "image_picker_#{randomiser}_changed",
|
8
|
+
:width => 866,
|
9
|
+
:height => 510)
|
10
|
+
current_image_title = t('.change', :what => description.titleize)
|
6
11
|
-%>
|
7
12
|
<%= link_to t('.show'), "", :id => "current_image_toggler_#{randomiser}" if toggle_image_display %>
|
8
13
|
<%= f.hidden_field field, :id => "current_image_id_#{randomiser}" -%>
|
9
14
|
|
10
15
|
<div id='current_image_container_<%= randomiser %>'<%= " style='display: none'" if toggle_image_display %> style="margin-top: 10px;">
|
11
|
-
|
12
|
-
<a id='current_image_link_<%= randomiser %>' href="<%= insert_admin_images_url(:dialog => true, :callback => "image_picker_#{randomiser}_changed", :width => 958, :height => 510) %>" style='border: 0px' title='<%= t('.change', :what => description.titleize) %>' name='<%= t('.change', :what => description.titleize) %>' class='dialog'>
|
16
|
+
<a id='current_image_link_<%= randomiser %>' href="<%= current_image_link_href %>" style='border: 0px' title='<%= current_image_title %>' name='<%= current_image_title %>' class='dialog'>
|
13
17
|
<% unless image.nil? -%>
|
14
|
-
<%= image_fu image, :medium,
|
18
|
+
<%= image_fu image, :medium,
|
19
|
+
:class => "brown_border",
|
20
|
+
:id => "current_picked_image_#{randomiser}" %>
|
15
21
|
<% else -%>
|
16
22
|
<img id="current_picked_image_<%= randomiser %>" class="" src="" alt="" style='display: none' />
|
17
23
|
<% end -%>
|
@@ -20,12 +26,16 @@
|
|
20
26
|
</span>
|
21
27
|
</a>
|
22
28
|
<br/>
|
23
|
-
<%= link_to t('.remove_current', :what => t('.' + description )), "#",
|
29
|
+
<%= link_to t('.remove_current', :what => t('.' + description )), "#",
|
30
|
+
:id => "remove_picked_image_#{randomiser}",
|
31
|
+
:style => "#{"display:none;" if image.nil?}" %>
|
24
32
|
</div>
|
25
33
|
|
34
|
+
<%#
|
35
|
+
We're so un-object-oriented here. We need to rewrite the jQuery admin.js file to use OO.
|
36
|
+
%>
|
26
37
|
<% content_for :head do -%>
|
27
38
|
<script type='text/javascript'>
|
28
|
-
// We're so un-object-oriented here. We need to rewrite the jQuery admin.js file to use OO.
|
29
39
|
var image_picker_<%= randomiser %>_options = {
|
30
40
|
thumbnail: '<%= thumbnail %>'
|
31
41
|
, image_toggler: '<%= toggle_image_display ? "#current_image_toggler_#{randomiser}" : "null" %>'
|
@@ -49,6 +49,7 @@ pt-BR:
|
|
49
49
|
remove_current: "Remover {{what}} atual"
|
50
50
|
change: Clique aqui para selecionar a imagem
|
51
51
|
image: imagem
|
52
|
+
show: Mostrar
|
52
53
|
resource_picker:
|
53
54
|
none_selected: "Atualmente não existe nenhum {{what}} selecionado, por favor clique aqui para adicionar um."
|
54
55
|
current: "{{what}} atual"
|
@@ -58,6 +59,7 @@ pt-BR:
|
|
58
59
|
resource: recurso
|
59
60
|
message:
|
60
61
|
close: Fechar
|
62
|
+
close_this_message: Fechar esta mensagem
|
61
63
|
activerecord:
|
62
64
|
models:
|
63
65
|
page: página
|
@@ -54,7 +54,6 @@ protected
|
|
54
54
|
Refinery::Plugins.set_active( current_user.authorized_plugins ) if current_user.respond_to? :plugins
|
55
55
|
end
|
56
56
|
|
57
|
-
#TODO Translate
|
58
57
|
def restrict_controller
|
59
58
|
if Refinery::Plugins.active.reject { |plugin|
|
60
59
|
params[:controller] !~ Regexp.new(plugin.menu_match) and
|
@@ -26,7 +26,7 @@ module Refinery
|
|
26
26
|
|
27
27
|
# just use lib paths from Refinery engines
|
28
28
|
paths = paths.reject{|path| path.scan(/lib$/).empty? or path.include?('/rails-') }
|
29
|
-
|
29
|
+
|
30
30
|
# reject Refinery lib paths if they're already included in this app.
|
31
31
|
paths = paths.reject{ |path| path.include?(Refinery.root.to_s) } unless Refinery.is_a_gem
|
32
32
|
paths.uniq!
|
@@ -34,7 +34,7 @@ module Refinery
|
|
34
34
|
# Save the paths to a global variable so that the application can access them too
|
35
35
|
# and unshift them onto the load path.
|
36
36
|
($refinery_gem_plugin_lib_paths = paths).each { |path| $LOAD_PATH.unshift(path) }
|
37
|
-
|
37
|
+
|
38
38
|
# Ensure we haven't caused any duplication
|
39
39
|
$LOAD_PATH.uniq!
|
40
40
|
end
|
@@ -1,6 +1,11 @@
|
|
1
1
|
class Refinery::LinkRenderer < WillPaginate::LinkRenderer
|
2
2
|
|
3
|
+
attr_accessor :url
|
4
|
+
|
3
5
|
def url_for(page)
|
6
|
+
# extract any url parameter and store it for subsequent requests but delete it
|
7
|
+
# this is so that we don't end up with it being an attribute of the resulting HTML.
|
8
|
+
@url ||= @options.delete(:url) || {}
|
4
9
|
page_one = page == 1
|
5
10
|
@url_params = {}
|
6
11
|
# page links should preserve GET parameters
|
@@ -15,8 +20,7 @@ class Refinery::LinkRenderer < WillPaginate::LinkRenderer
|
|
15
20
|
@url_params[param_name] = page_one ? 1 : 2
|
16
21
|
end
|
17
22
|
|
18
|
-
url = @template.url_for(@url_params.merge!(@
|
19
|
-
#@options.delete(:url) # no, don't! We want it to use the url every time.
|
23
|
+
url = @template.url_for(@url_params.merge!(@url).to_options)
|
20
24
|
return url if page_one
|
21
25
|
|
22
26
|
if complex
|
@@ -106,7 +106,7 @@ namespace :refinery do
|
|
106
106
|
FileUtils::makedirs dirs.map {|dir| File.join(Rails.root, dir) }
|
107
107
|
|
108
108
|
# copy in the new assets.
|
109
|
-
assets = [%w(public stylesheets refinery), %w(public javascripts refinery), %w(public javascripts wymeditor), %w(public images wymeditor skins refinery), %w(public images refinery), %w(public stylesheets wymeditor skins refinery), %w(public javascripts jquery)]
|
109
|
+
assets = [%w(public stylesheets refinery), %w(public javascripts refinery), %w(public javascripts wymeditor), %w(public images wymeditor skins refinery), %w(public images refinery), %w(public stylesheets wymeditor skins refinery), %w(public javascripts jquery), %w(lib refinery), %w(.gitignore)]
|
110
110
|
assets.each do |asset|
|
111
111
|
FileUtils::rm_rf File.join(Rails.root, asset), :secure => true, :verbose => verbose # ensure the destination is clear.
|
112
112
|
FileUtils::cp_r File.join(Refinery.root, asset), File.join(Rails.root, asset), :verbose => verbose # copy the new assets into the project.
|
@@ -3,9 +3,7 @@ class Admin::DialogsController < Admin::BaseController
|
|
3
3
|
layout 'admin_dialog'
|
4
4
|
|
5
5
|
def show
|
6
|
-
@dialog_type = params[:id].try(:downcase)
|
7
|
-
|
8
|
-
if @dialog_type
|
6
|
+
if (@dialog_type = params[:id].try(:downcase))
|
9
7
|
@submit_button_text = "Insert"
|
10
8
|
@cancel_button_text = "Cancel"
|
11
9
|
|
@@ -14,7 +12,7 @@ class Admin::DialogsController < Admin::BaseController
|
|
14
12
|
@iframe_src = if @dialog_type == 'image'
|
15
13
|
insert_admin_images_url(:modal => true)
|
16
14
|
elsif @dialog_type == 'link'
|
17
|
-
link_to_admin_pages_dialogs_url(url_params)
|
15
|
+
link_to_admin_pages_dialogs_url(url_params.merge(:id => nil))
|
18
16
|
end
|
19
17
|
|
20
18
|
render :layout => false
|
@@ -14,13 +14,13 @@ class Admin::RefinerySettingsController < Admin::BaseController
|
|
14
14
|
def find_all_refinery_settings
|
15
15
|
@refinery_settings = RefinerySetting.find :all,
|
16
16
|
:order => "name ASC",
|
17
|
-
:conditions => current_user.has_role?(:superuser) ? nil :
|
17
|
+
:conditions => current_user.has_role?(:superuser) ? nil : ["restricted IS NOT ?", true]
|
18
18
|
end
|
19
19
|
|
20
20
|
def paginate_all_refinery_settings
|
21
21
|
@refinery_settings = RefinerySetting.paginate :page => params[:page],
|
22
22
|
:order => "name ASC",
|
23
|
-
:conditions => current_user.has_role?(:superuser) ? nil :
|
23
|
+
:conditions => current_user.has_role?(:superuser) ? nil : ["restricted IS NOT ?", true]
|
24
24
|
end
|
25
25
|
|
26
26
|
private
|
@@ -23,23 +23,23 @@ pt-BR:
|
|
23
23
|
help:
|
24
24
|
restricted: Isso faz com que essa opção só seja vista ou editada por super-usuários (como você).
|
25
25
|
help:
|
26
|
-
activity_show_limit:
|
27
|
-
analytics_page_code:
|
28
|
-
image_dialogue_sizes:
|
29
|
-
image_thumbnails:
|
30
|
-
menu_hide_children:
|
31
|
-
new_page_parts:
|
32
|
-
page_title:
|
33
|
-
page_advanced_options_include_seo:
|
34
|
-
preferred_image_view:
|
35
|
-
refinery_enable_backend_reordering:
|
36
|
-
refinery_menu_cache_action_suffix:
|
37
|
-
show_contact_privacy_link:
|
38
|
-
site_name:
|
39
|
-
theme:
|
40
|
-
use_google_ajax_libraries:
|
41
|
-
use_marketable_urls:
|
42
|
-
use_resource_caching:
|
26
|
+
activity_show_limit: Número de itens mostrados na lista de atividades do Dashboard.
|
27
|
+
analytics_page_code: Habilita o código do Google Analytics em seu website. Se deixar em branco ou digitar UA-xxxxxx-x será considerado desabilitado e a chamada remota para o Google Analytics não será feita.
|
28
|
+
image_dialogue_sizes: Estas configurações se aplicam ao diálogo de Inserção de Imagens. Você deve alterar os tamanhos de thumbnail conforme suas modifcações.
|
29
|
+
image_thumbnails: "Se você modificar estas configurações, terá que gerar novamente as imagens usando o comando rake images:regenerate (ou rake images:update se você somente adicionou novos thumbnails) caso contrário, as modificações não terão efeito sobre imagens existentes."
|
30
|
+
menu_hide_children: Esconde qualquer sub-página do menu mesmo se estiver presente.
|
31
|
+
new_page_parts: Habilita a criação de novos pedaços de página (seção de conteúdo) no editor de páginas.
|
32
|
+
page_title: Opções avançadas de configuração do título da página. Você pode colocar um CSS customizado ou uma tag diferente ou pedir para navegar entre as páginas pais.
|
33
|
+
page_advanced_options_include_seo: Habilita as configurações avançadas de SEO nas opções avançadas da edição de páginas.
|
34
|
+
preferred_image_view: Habilita o tipo de visualição da seção imagens - grid para 'Visualizar em Grid' e list para 'Visualizar em Lista'. Há um botão para automatizar este processo no plugin de imagens.
|
35
|
+
refinery_enable_backend_reordering: Habilita a ordenação do menu administrativo.
|
36
|
+
refinery_menu_cache_action_suffix: Configura o sufixo do nome usado para fazer cache do menu do site. Se você está usando um tema é melhor deixar o nome padrão e deixar o tema gerenciar essa configuração.
|
37
|
+
show_contact_privacy_link: Você pode esconder ou mostrar o link para a política de privacidade no formulário de contato.
|
38
|
+
site_name: "Nome do site, que será mostrado no topo e rodapé do seu website e também na área administrativa."
|
39
|
+
theme: Tema utilizado pelo site. Será trocado o tema imediatamente e deverá ser um tema válido e existente no sitema para que funcione.
|
40
|
+
use_google_ajax_libraries: Se você quer usar as bibliotecas AJAX externas oferecidas pelo Google configure como true.
|
41
|
+
use_marketable_urls: Muda as urls de /pages/about para /about e automaticamente gerencia conflitos com outros plugins.
|
42
|
+
use_resource_caching: "Recomendado habilitar está opção em produção pois os javascript e stylesheet serão colocados em um único arquivo, o que diminui o número de requisições e aumenta a velocidade do site."
|
43
43
|
plugins:
|
44
44
|
refinery_settings:
|
45
45
|
title: Configuração
|