refinerycms-settings 0.9.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/refinery_settings_controller.rb +77 -0
- data/app/helpers/refinery_settings_helper.rb +25 -0
- data/app/models/refinery_setting.rb +212 -0
- data/app/views/admin/refinery_settings/_form.html.erb +62 -0
- data/app/views/admin/refinery_settings/_refinery_setting.html.erb +23 -0
- data/app/views/admin/refinery_settings/_refinery_settings.html.erb +5 -0
- data/app/views/admin/refinery_settings/edit.html.erb +1 -0
- data/app/views/admin/refinery_settings/index.html.erb +49 -0
- data/app/views/admin/refinery_settings/new.html.erb +1 -0
- data/config/locales/cs.yml +45 -0
- data/config/locales/da.yml +46 -0
- data/config/locales/de.yml +46 -0
- data/config/locales/el.yml +46 -0
- data/config/locales/en.yml +46 -0
- data/config/locales/es.yml +43 -0
- data/config/locales/fr.yml +44 -0
- data/config/locales/it.yml +36 -0
- data/config/locales/lolcat.yml +43 -0
- data/config/locales/lt.yml +46 -0
- data/config/locales/lv.yml +46 -0
- data/config/locales/nb.yml +47 -0
- data/config/locales/nl.yml +46 -0
- data/config/locales/pl.yml +46 -0
- data/config/locales/pt-BR.yml +44 -0
- data/config/locales/rs.yml +46 -0
- data/config/locales/ru.yml +43 -0
- data/config/locales/sl.yml +25 -0
- data/config/locales/sv.yml +45 -0
- data/config/locales/vi.yml +47 -0
- data/config/locales/zh-CN.yml +46 -0
- data/config/locales/zh-TW.yml +46 -0
- data/config/routes.rb +8 -0
- data/db/migrate/20100913234710_create_refinerycms_settings_schema.rb +24 -0
- data/db/migrate/20100926142529_add_value_type_to_refinery_settings.rb +9 -0
- data/features/manage_refinery_settings.feature +5 -0
- data/features/step_definitions/setting_steps.rb +9 -0
- data/features/support/paths.rb +14 -0
- data/lib/gemspec.rb +33 -0
- data/lib/generators/refinerycms_settings_generator.rb +8 -0
- data/lib/refinerycms-settings.rb +26 -0
- data/license.md +21 -0
- data/readme.md +55 -0
- data/refinerycms-settings.gemspec +84 -0
- data/spec/models/refinery_setting_spec.rb +101 -0
- metadata +112 -0
@@ -0,0 +1,77 @@
|
|
1
|
+
module Admin
|
2
|
+
class RefinerySettingsController < Admin::BaseController
|
3
|
+
|
4
|
+
helper :refinery_settings
|
5
|
+
|
6
|
+
crudify :refinery_setting,
|
7
|
+
:title_attribute => :title,
|
8
|
+
:order => "name ASC",
|
9
|
+
:redirect_to_url => :redirect_to_where?
|
10
|
+
|
11
|
+
before_filter :sanitise_params, :only => [:create, :update]
|
12
|
+
after_filter :fire_setting_callback, :only => [:update]
|
13
|
+
|
14
|
+
def index
|
15
|
+
search_all_refinery_settings if searching?
|
16
|
+
paginate_all_refinery_settings
|
17
|
+
|
18
|
+
render :partial => 'refinery_settings' if request.xhr?
|
19
|
+
end
|
20
|
+
|
21
|
+
def new
|
22
|
+
if current_user.has_role?(:superuser) and params[:form_value_type].present?
|
23
|
+
@refinery_setting = RefinerySetting.new(:form_value_type => params[:form_value_type])
|
24
|
+
else
|
25
|
+
@refinery_setting = RefinerySetting.new(:form_value_type => 'text_area')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def edit
|
30
|
+
@refinery_setting = RefinerySetting.find(params[:id])
|
31
|
+
|
32
|
+
render :layout => false if request.xhr?
|
33
|
+
end
|
34
|
+
|
35
|
+
protected
|
36
|
+
def find_all_refinery_settings
|
37
|
+
@refinery_settings = RefinerySetting.order('name ASC')
|
38
|
+
|
39
|
+
unless current_user.has_role?(:superuser)
|
40
|
+
@refinery_settings = @refinery_settings.where("restricted <> ? ", true)
|
41
|
+
end
|
42
|
+
|
43
|
+
@refinery_settings
|
44
|
+
end
|
45
|
+
|
46
|
+
def search_all_refinery_settings
|
47
|
+
# search for settings that begin with keyword
|
48
|
+
term = "^" + params[:search].to_s.downcase.gsub(' ', '_')
|
49
|
+
|
50
|
+
# First find normal results, then weight them with the query.
|
51
|
+
@refinery_settings = find_all_refinery_settings.with_query(term)
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
def redirect_to_where?
|
56
|
+
(from_dialog? && session[:return_to].present?) ? session[:return_to] : admin_refinery_settings_url
|
57
|
+
end
|
58
|
+
|
59
|
+
# this fires before an update or create to remove any attempts to pass sensitive arguments.
|
60
|
+
def sanitise_params
|
61
|
+
params.delete(:callback_proc_as_string)
|
62
|
+
params.delete(:scoping)
|
63
|
+
end
|
64
|
+
|
65
|
+
def fire_setting_callback
|
66
|
+
begin
|
67
|
+
@refinery_setting.callback_proc.call
|
68
|
+
rescue
|
69
|
+
logger.warn('Could not fire callback proc. Details:')
|
70
|
+
logger.warn(@refinery_setting.inspect)
|
71
|
+
logger.warn($!.message)
|
72
|
+
logger.warn($!.backtrace)
|
73
|
+
end unless @refinery_setting.callback_proc.nil?
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module RefinerySettingsHelper
|
2
|
+
def form_value_type
|
3
|
+
@refinery_setting.form_value_type.presence || 'text_area'
|
4
|
+
end
|
5
|
+
|
6
|
+
def refinery_setting_title(f)
|
7
|
+
if @refinery_setting.form_value_type == 'check_box'
|
8
|
+
raw "<h3>#{@refinery_setting.name.to_s.titleize}?</h3>"
|
9
|
+
else
|
10
|
+
f.label :value
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def refinery_setting_field(f, help)
|
15
|
+
case form_value_type
|
16
|
+
when 'check_box'
|
17
|
+
raw "#{f.check_box :value, :value => @refinery_setting.form_value}
|
18
|
+
#{f.label :value, help.presence || t('enabled', :scope => 'admin.refinery_settings.form'),
|
19
|
+
:class => 'stripped'}"
|
20
|
+
else
|
21
|
+
f.text_area :value, :value => @refinery_setting.form_value,
|
22
|
+
:class => 'widest', :rows => 5
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,212 @@
|
|
1
|
+
class RefinerySetting < ActiveRecord::Base
|
2
|
+
|
3
|
+
FORM_VALUE_TYPES = [
|
4
|
+
['Multi-line', 'text_area'],
|
5
|
+
['Checkbox', 'check_box']
|
6
|
+
]
|
7
|
+
|
8
|
+
validates :name, :presence => true
|
9
|
+
|
10
|
+
serialize :value # stores into YAML format
|
11
|
+
serialize :callback_proc_as_string
|
12
|
+
|
13
|
+
# Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
|
14
|
+
acts_as_indexed :fields => [:name]
|
15
|
+
|
16
|
+
before_save do |setting|
|
17
|
+
setting.restricted = false if setting.restricted.nil?
|
18
|
+
end
|
19
|
+
|
20
|
+
after_save do |setting|
|
21
|
+
setting.class.rewrite_cache
|
22
|
+
end
|
23
|
+
|
24
|
+
class << self
|
25
|
+
# Number of settings to show per page when using will_paginate
|
26
|
+
def per_page
|
27
|
+
12
|
28
|
+
end
|
29
|
+
|
30
|
+
def ensure_cache_exists!
|
31
|
+
if (result = Rails.cache.read(cache_key)).nil?
|
32
|
+
result = rewrite_cache
|
33
|
+
end
|
34
|
+
|
35
|
+
result
|
36
|
+
end
|
37
|
+
protected :ensure_cache_exists!
|
38
|
+
|
39
|
+
def cache_read(name = nil, scoping = nil)
|
40
|
+
result = ensure_cache_exists!
|
41
|
+
|
42
|
+
if name.present?
|
43
|
+
scoping = scoping.to_s if scoping.is_a?(Symbol)
|
44
|
+
result = result.detect do |rs|
|
45
|
+
rs[:name] == name.to_s.downcase.to_sym and rs[:scoping] == scoping
|
46
|
+
end
|
47
|
+
result = result[:value] if !result.nil? and result.keys.include?(:value)
|
48
|
+
end
|
49
|
+
|
50
|
+
result
|
51
|
+
end
|
52
|
+
|
53
|
+
def to_cache(settings)
|
54
|
+
settings.collect do |rs|
|
55
|
+
{
|
56
|
+
:name => rs.name.to_s.downcase.to_sym,
|
57
|
+
:value => rs.value,
|
58
|
+
:scoping => rs.scoping,
|
59
|
+
:destroyable => rs.destroyable
|
60
|
+
}
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def rewrite_cache
|
65
|
+
# delete cache
|
66
|
+
Rails.cache.delete(cache_key)
|
67
|
+
|
68
|
+
# generate new cache
|
69
|
+
result = (to_cache(all) if (table_exists? rescue false))
|
70
|
+
|
71
|
+
# write cache
|
72
|
+
Rails.cache.write(cache_key, result)
|
73
|
+
|
74
|
+
# return cache, or lack thereof.
|
75
|
+
result ||= []
|
76
|
+
end
|
77
|
+
|
78
|
+
def cache_key
|
79
|
+
[Refinery.base_cache_key, 'refinery_settings_cache'].join('_')
|
80
|
+
end
|
81
|
+
|
82
|
+
# find_or_set offers a convenient way to
|
83
|
+
def find_or_set(name, the_value, options={})
|
84
|
+
# Merge default options with supplied options.
|
85
|
+
options = {
|
86
|
+
:scoping => nil, :restricted => false,
|
87
|
+
:callback_proc_as_string => nil, :form_value_type => 'text_area'
|
88
|
+
}.merge(options)
|
89
|
+
|
90
|
+
# try to find the setting first
|
91
|
+
value = get(name, :scoping => options[:scoping])
|
92
|
+
|
93
|
+
# if the setting's value is nil, store a new one using the existing functionality.
|
94
|
+
value = set(name, options.merge({:value => the_value})) if value.nil?
|
95
|
+
|
96
|
+
# Return what we found.
|
97
|
+
value
|
98
|
+
end
|
99
|
+
|
100
|
+
alias :get_or_set :find_or_set
|
101
|
+
|
102
|
+
# Retrieve the current value for the setting whose name is supplied.
|
103
|
+
def get(name, options = {})
|
104
|
+
options = {:scoping => nil}.update(options)
|
105
|
+
cache_read(name, options[:scoping])
|
106
|
+
end
|
107
|
+
|
108
|
+
alias :[] :get
|
109
|
+
|
110
|
+
def set(name, value)
|
111
|
+
return (value.is_a?(Hash) ? value[:value] : value) unless (table_exists? rescue false)
|
112
|
+
|
113
|
+
scoping = (value[:scoping] if value.is_a?(Hash) and value.has_key?(:scoping))
|
114
|
+
setting = find_or_initialize_by_name_and_scoping(:name => name.to_s, :scoping => scoping)
|
115
|
+
|
116
|
+
# you could also pass in {:value => 'something', :scoping => 'somewhere'}
|
117
|
+
unless value.is_a?(Hash) and value.has_key?(:value)
|
118
|
+
setting.value = value
|
119
|
+
else
|
120
|
+
# set the value last, so that the other attributes can transform it if required.
|
121
|
+
setting.form_value_type = value[:form_value_type] || 'text_area' if setting.respond_to?(:form_value_type)
|
122
|
+
setting.scoping = value[:scoping] if value.has_key?(:scoping)
|
123
|
+
setting.callback_proc_as_string = value[:callback_proc_as_string] if value.has_key?(:callback_proc_as_string)
|
124
|
+
setting.destroyable = value[:destroyable] if value.has_key?(:destroyable)
|
125
|
+
setting.value = value[:value]
|
126
|
+
end
|
127
|
+
|
128
|
+
# Save because we're in a setter method.
|
129
|
+
setting.save
|
130
|
+
|
131
|
+
# Return the value
|
132
|
+
setting.value
|
133
|
+
end
|
134
|
+
|
135
|
+
# DEPRECATED for removal at >= 0.9.9
|
136
|
+
def []=(name, value)
|
137
|
+
warning = ["\n*** DEPRECATION WARNING ***"]
|
138
|
+
warning << "You should not use this anymore: RefinerySetting[#{name.inspect}] = #{value.inspect}."
|
139
|
+
warning << "\nInstead, you should use RefinerySetting.set(#{name.inspect}, #{value.inspect})"
|
140
|
+
warning << ""
|
141
|
+
warning << "Called from: #{caller.first.inspect}\n\n"
|
142
|
+
$stdout.puts warning.join("\n")
|
143
|
+
|
144
|
+
set(name, value)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# prettier version of the name.
|
149
|
+
# site_name becomes Site Name
|
150
|
+
def title
|
151
|
+
name.titleize
|
152
|
+
end
|
153
|
+
|
154
|
+
# form_value is so that on the web interface we can display a sane value.
|
155
|
+
def form_value
|
156
|
+
unless self[:value].blank? or self[:value].is_a?(String)
|
157
|
+
YAML::dump(self[:value])
|
158
|
+
else
|
159
|
+
self[:value]
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def value
|
164
|
+
replacements!(self[:value])
|
165
|
+
end
|
166
|
+
|
167
|
+
def value=(new_value)
|
168
|
+
# must convert "1" to true and "0" to false when supplied using 'check_box', unfortunately.
|
169
|
+
if ["1", "0"].include?(new_value) and form_value_type == 'check_box'
|
170
|
+
new_value = new_value == "1" ? true : false
|
171
|
+
end
|
172
|
+
|
173
|
+
# must convert to string if true or false supplied otherwise it becomes 0 or 1, unfortunately.
|
174
|
+
if [true, false].include?(new_value)
|
175
|
+
new_value = new_value.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
super
|
179
|
+
end
|
180
|
+
|
181
|
+
def callback_proc
|
182
|
+
eval("Proc.new{#{callback_proc_as_string} }") if callback_proc_as_string.present?
|
183
|
+
end
|
184
|
+
|
185
|
+
private
|
186
|
+
# Below is not very nice, but seems to be required. The problem is when Rails
|
187
|
+
# serialises a fields like booleans it doesn't retrieve it back out as a boolean
|
188
|
+
# it just returns a string. This code maps the two boolean values
|
189
|
+
# correctly so that a boolean is returned instead of a string.
|
190
|
+
REPLACEMENTS = {"true" => true, "false" => false}
|
191
|
+
|
192
|
+
def replacements!(current_value)
|
193
|
+
# This bit handles true and false so that true and false are actually returned
|
194
|
+
# not "0" and "1"
|
195
|
+
REPLACEMENTS.each do |current, new_value|
|
196
|
+
current_value = new_value if current_value == current
|
197
|
+
end
|
198
|
+
|
199
|
+
# converts the serialised value back to an integer
|
200
|
+
# if the value is an integer
|
201
|
+
begin
|
202
|
+
if current_value.to_i.to_s == current_value
|
203
|
+
current_value = current_value.to_i
|
204
|
+
end
|
205
|
+
rescue
|
206
|
+
current_value
|
207
|
+
end
|
208
|
+
|
209
|
+
current_value
|
210
|
+
end
|
211
|
+
|
212
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<%= form_for [:admin, @refinery_setting] do |f| %>
|
2
|
+
|
3
|
+
<%= render :partial => "/shared/admin/error_messages",
|
4
|
+
:locals => {
|
5
|
+
:object => @refinery_setting,
|
6
|
+
:include_object_name => true
|
7
|
+
} %>
|
8
|
+
|
9
|
+
<div class='field'>
|
10
|
+
<%= f.label :name %>
|
11
|
+
<% if action_name =~ /(new)|(create)/ %>
|
12
|
+
<%= f.text_field :name, :class => "larger widest" %>
|
13
|
+
<% else %>
|
14
|
+
<label class='stripped' for='refinery_setting_value'>
|
15
|
+
<%= @refinery_setting.name.titleize %>
|
16
|
+
</label>
|
17
|
+
<span class="preview">- (<%= @refinery_setting.name %>)</span>
|
18
|
+
<% end %>
|
19
|
+
<% if current_user.has_role?(:superuser) and !@refinery_setting.persisted? %>
|
20
|
+
<div class='field'>
|
21
|
+
<%= f.label :form_value_type %>
|
22
|
+
<%= f.select :form_value_type, RefinerySetting::FORM_VALUE_TYPES -%>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
<% unless action_name =~ /(new)|(create)/ or (help = t(@refinery_setting.name, :scope => 'admin.refinery_settings.form.help', :default => '')).blank? or @refinery_setting.form_value_type == 'check_box' %>
|
26
|
+
<p>
|
27
|
+
<span><%= help %></span>
|
28
|
+
</p>
|
29
|
+
<% end %>
|
30
|
+
<% if current_user.has_role?(:superuser) %>
|
31
|
+
<span class='label_with_help'>
|
32
|
+
<%= f.label :restricted %>
|
33
|
+
<%= refinery_help_tag t('restricted', :scope => 'admin.refinery_settings.form.help') %>
|
34
|
+
</span>
|
35
|
+
<%= f.check_box :restricted %>
|
36
|
+
<%= f.label :restricted, t('.yes_make_this_setting_restricted'), :class => 'stripped' %>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
<div class='field'>
|
40
|
+
<%= refinery_setting_title(f) %>
|
41
|
+
<%= refinery_setting_field(f, help) %>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<%= render :partial => "/shared/admin/form_actions",
|
45
|
+
:locals => {
|
46
|
+
:f => f,
|
47
|
+
:continue_editing => false,
|
48
|
+
:hide_cancel => from_dialog?,
|
49
|
+
:submit_button_title => t('.restart_may_be_in_order_html'),
|
50
|
+
:delete_title => t('delete', :scope => 'admin.refinery_settings'),
|
51
|
+
:delete_confirmation => t('message', :scope => 'shared.admin.delete',
|
52
|
+
:title => @refinery_setting.name.to_s.titleize),
|
53
|
+
:hide_delete => (!@refinery_setting.persisted? or !@refinery_setting.destroyable or from_dialog?)
|
54
|
+
} %>
|
55
|
+
<% end -%>
|
56
|
+
<% content_for :javascripts do %>
|
57
|
+
<script>
|
58
|
+
$('#refinery_setting_form_value_type').change(function(e) {
|
59
|
+
window.location = location_url + ((location_url.indexOf("?") > -1 ? "&" : "?") + "form_value_type=" + $(this).val());
|
60
|
+
});
|
61
|
+
</script>
|
62
|
+
<% end if current_user.has_role?(:superuser) %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>'>
|
2
|
+
<span class='title'>
|
3
|
+
<%= t(refinery_setting.name, :default => refinery_setting.name.to_s.titleize) %>
|
4
|
+
<span class="preview">- <%= truncate(refinery_setting.value.to_s, :length => 40) %></span>
|
5
|
+
</span>
|
6
|
+
<span class='actions'>
|
7
|
+
<%= link_to refinery_icon_tag('application_edit.png'),
|
8
|
+
edit_admin_refinery_setting_path(refinery_setting, :dialog => true, :width => 725, :height => 525),
|
9
|
+
:title => t('edit', :scope => 'admin.refinery_settings') %>
|
10
|
+
<%= link_to refinery_icon_tag('delete.png'),
|
11
|
+
admin_refinery_setting_path(refinery_setting),
|
12
|
+
:class => 'cancel confirm-delete',
|
13
|
+
:title => t('delete', :scope => 'admin.refinery_settings'),
|
14
|
+
:confirm => t('message', :scope => 'shared.admin.delete', :title => refinery_setting.title),
|
15
|
+
:method => :delete if refinery_setting.destroyable %>
|
16
|
+
|
17
|
+
<% unless (help = t(refinery_setting.name, :scope => 'admin.refinery_settings.form.help', :default => '')).blank? %>
|
18
|
+
<%= link_to refinery_icon_tag('information.png'), '#',
|
19
|
+
:tooltip => help,
|
20
|
+
:class => 'information suppress' %>
|
21
|
+
<% end %>
|
22
|
+
</span>
|
23
|
+
</li>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<div id='records'>
|
2
|
+
<% if searching? %>
|
3
|
+
<h2>
|
4
|
+
<%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %>
|
5
|
+
</h2>
|
6
|
+
<% end %>
|
7
|
+
<% if @refinery_settings.any? %>
|
8
|
+
<div class='pagination_container'>
|
9
|
+
<%= render :partial => 'refinery_settings' %>
|
10
|
+
</div>
|
11
|
+
<% else %>
|
12
|
+
<p>
|
13
|
+
<% if searching? %>
|
14
|
+
<%= t('no_results', :scope => 'shared.admin.search') %>
|
15
|
+
<% else %>
|
16
|
+
<strong>
|
17
|
+
<%= t('.empty_set') %>
|
18
|
+
<%= t('.create_first', :link => t('.new')) %>
|
19
|
+
</strong>
|
20
|
+
<% end %>
|
21
|
+
</p>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
<div id='actions'>
|
25
|
+
<ul>
|
26
|
+
<li>
|
27
|
+
<%= render :partial => "/shared/admin/search",
|
28
|
+
:locals => {
|
29
|
+
:url => admin_refinery_settings_url
|
30
|
+
} %>
|
31
|
+
</li>
|
32
|
+
<li>
|
33
|
+
<%= link_to t('.new'), new_admin_refinery_setting_url({
|
34
|
+
:dialog => true,
|
35
|
+
:width => 725,
|
36
|
+
:height => 475
|
37
|
+
}), :class => "add_icon" %>
|
38
|
+
</li>
|
39
|
+
</ul>
|
40
|
+
</div>
|
41
|
+
<% content_for :javascripts do %>
|
42
|
+
<script>
|
43
|
+
$(document).ready(function() {
|
44
|
+
$('#records ul li .actions a[href*=edit]').each(function(i, li) {
|
45
|
+
$(li).attr('name', $(li).attr('tooltip'));
|
46
|
+
});
|
47
|
+
});
|
48
|
+
</script>
|
49
|
+
<% end -%>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
cs:
|
2
|
+
plugins:
|
3
|
+
refinery_settings:
|
4
|
+
title: Nastavení
|
5
|
+
description: Spravovat nastavení webu
|
6
|
+
admin:
|
7
|
+
refinery_settings:
|
8
|
+
delete: Smazat tuto volbu
|
9
|
+
edit: Upravit tuto volbu
|
10
|
+
index:
|
11
|
+
new: Přidat novou volbu
|
12
|
+
empty_set: Zatím zde nejsou žádné nastavení.
|
13
|
+
create_first: "Klikněte '%{link}' pro přidání první volby."
|
14
|
+
form:
|
15
|
+
enabled: "Ano, povolit tuto volbu."
|
16
|
+
restart_may_be_in_order_html: Možná bude nutný restart serveru aby se změna projevila.
|
17
|
+
yes_make_this_setting_restricted: "Ano, umožnit změnu této volby jenom administrátorům."
|
18
|
+
help:
|
19
|
+
restricted: Volba bude viditelná a editovatelné pouze pro adminstrátory (jako jste vy).
|
20
|
+
activity_show_limit: Omezuje počet akcí viditelných na nástěnce.
|
21
|
+
analytics_page_code: Tento kód aktivuje sledování webu pomocí Googla Analytics. Pokud je ponechán prázdný nebo ve tvaru UA-xxxxxx-x je sledování vypnuto a žádné informace se do Google Analytics neposílají.
|
22
|
+
frontend_refinery_stylesheets_enabled: "Ve výchozím stavu, Refinery používá na stránkách (Frontend) své základní kaskádové styly. Tímto nastavením můžete tomuto chování zabránit."
|
23
|
+
image_dialogue_sizes: Toto nastavení se používá v dialogu vkládání obrázku. Musíte implementovat rozdílné velikosti náhledů, pokud toto nastavení změníte.
|
24
|
+
image_thumbnails: Pokud změnite toto nastavení, budete muset také přegenerovat obrázky příkazem rake images:regenerate (nebo rake images:update pokud jste pouze přidáváte náhledy) jinak se vaše změny neprojeví na stávájících obrázcích.
|
25
|
+
menu_hide_children: Skrýt podstránky z menu i když jsou dostupné.
|
26
|
+
new_page_parts: Povolit přidávání nových částí stránek (obsahové sekce) v editorech.
|
27
|
+
page_title: Velmi komplexní volba pro nastavení titulky stránky. Můžete nastavit vlastní CSS třídu, jiný tag nebo ho poslat do drobečkového menu se stránkami se stejným předkem.
|
28
|
+
pages_advanced_options_include_seo: Tato volba nastavuje, zda je zobrazeno SEO nastavení v rozšířeném nastavení stránky.
|
29
|
+
preferred_image_view: Nastavuje preferovaný pohled na existující obrázky. Zvolte grid pro zobrazení mřížky nebo list pro zobrazení seznamu. Nastavení se dá přepínat tlačítkem i v samotném pohledu.
|
30
|
+
refinery_enable_backend_reordering: Můžete odebrat možnost řadit záložky v administraci.
|
31
|
+
refinery_menu_cache_action_suffix: Nastavuje klíč, který je používán k ukládání menu do mezipaměti. Pokud používáte nějáký vzhled je lepší nechat toto nastavení v původním stavu a vzhled se o toto nastavení postará.
|
32
|
+
show_contact_privacy_link: Můžete zobrazit či srýt odkaz na stránku 'zásady ochrany osobních údajů' u kontaktnícho formuláře vedle tlačítka 'Odeslat'.
|
33
|
+
site_name: Název vašeho webu, který se zobrazuje v hlavičce stránky, v adminstraci a někdy (podle vzhledu) se používá i v patičce.
|
34
|
+
theme: Zadejte název zhledu který má být aktivní. Efekt je okamžitý a musí být nastaveno platné jméno vzhledu!
|
35
|
+
use_google_ajax_libraries: Chcete používat Google AJAX CDN ?
|
36
|
+
use_marketable_urls: Změní adresy URL z /pages/about na /about a automaticky opraví konflikty s ostaními pluginy.
|
37
|
+
use_resource_caching: Doporučujeme zapnout toto nastavení v produkčním módu, protože rapidně urychlí načítání stránek. Komprimuje JavaSript a kaskádové styly do jednotlivých souborů, což vám ušetří požadavky na server.
|
38
|
+
activerecord:
|
39
|
+
models:
|
40
|
+
refinery_setting: nastavení
|
41
|
+
attributes:
|
42
|
+
refinery_setting:
|
43
|
+
name: Jméno
|
44
|
+
value: Hodnota
|
45
|
+
restricted: Omezení
|
@@ -0,0 +1,46 @@
|
|
1
|
+
da:
|
2
|
+
plugins:
|
3
|
+
refinery_settings:
|
4
|
+
title: Indstillinger
|
5
|
+
description: Vedligehold Refinery indstillinger
|
6
|
+
admin:
|
7
|
+
refinery_settings:
|
8
|
+
delete: Slet indstilling
|
9
|
+
edit: Redigér indstilling
|
10
|
+
index:
|
11
|
+
new: Tilføj en ny indstilling
|
12
|
+
empty_set: Der er ingen indstillinger endnu.
|
13
|
+
create_first: "Klik '%{link}' for at oprette den første indstilling."
|
14
|
+
form:
|
15
|
+
enabled: "Ja, slå indstillingen til."
|
16
|
+
restart_may_be_in_order_html: <strong>Bemærk:</strong> Du skal muligvis genstarte websitet for at ændringen træder i kraft.
|
17
|
+
yes_make_this_setting_restricted: "Ja, begræns adgang til administratorer."
|
18
|
+
help:
|
19
|
+
restricted: Gør at indstillingen kun kan ses og redigeres af administratorer (som dig).
|
20
|
+
activity_show_limit: Hvor mange 'Seneste aktiviter' skal vises
|
21
|
+
analytics_page_code: Google Analytics kode; aktiverer Google Analytics på websitet. Hvis indstillingen er tom eller sat til UA-xxxxxx-x så er Google Analytics slået fra.
|
22
|
+
frontend_refinery_stylesheets_enabled: "Refinery inkluderer som standard sine egne stylesheets på alle sider. Dette kan slås til eller fra med denne indstilling."
|
23
|
+
image_dialogue_sizes: Denne indstilling benyttes af 'Tilføj et nyt billede' dialogboksen. Du skal også opdatere thumbnails størrelser hvis du ændrer denne indstilling.
|
24
|
+
image_thumbnails: Hvis du opdaterer denne indstilling skal du generere alle billeder igen ved at køre rake images:regenerate (eller rake images:update hvis du kun har tilføjet nye formater). Ellers vil ændringen kun gælde for nye billeder.
|
25
|
+
menu_hide_children: Skjul undermenuer i menuen.
|
26
|
+
new_page_parts: Tillad oprettelse af nye indholdsektioner på sider.
|
27
|
+
page_title: Avancerede indstillinger for konfiguration af sidetitel. Her kan du angive CSS klasse eller et alternativt tag samt angive at sidehierarkiet skal vises i brødkrummen.
|
28
|
+
pages_advanced_options_include_seo: Vis søgemaskineoptimering under avancerede indstillinger for sider.
|
29
|
+
preferred_image_view: Standard billedvisning, 'gittervisning' eller 'listevisning'. Dette kan også ændres under fanebladet 'Billeder'.
|
30
|
+
refinery_enable_backend_reordering: Du fjerne muligheden for at ændre rækkefølgen af fanebladene her.
|
31
|
+
refinery_menu_cache_action_suffix: Nøglen, der benyttes til caching af menuen. Hvis du bruger et tema, bør du undgå at ændre denne indstilling.
|
32
|
+
show_contact_privacy_link: Vis link til privatlivspolitik på kontaktformularen.
|
33
|
+
site_name: Navn på websitet.
|
34
|
+
theme: Navn på det tema du vil bruge. Ændringen træder i kraft med det samme.
|
35
|
+
use_google_ajax_libraries: Brug Googles AJAX CDN.
|
36
|
+
use_marketable_urls: Benyt URLer som /about i stedet for /pages/about og håndtér automatisk sammenfald med URLer fra andre plugins.
|
37
|
+
use_resource_caching: Anbefalet i produktion. Bundler henholdsvis javascript og stylesheet assets til en enkelt fil.
|
38
|
+
approximate_ascii: Sæt til 'true', hvis du vil konvertere karakterer som ā, č og ž til a, c og z i side-URLer.
|
39
|
+
activerecord:
|
40
|
+
models:
|
41
|
+
refinery_setting: indstilling
|
42
|
+
attributes:
|
43
|
+
refinery_setting:
|
44
|
+
name: Navn
|
45
|
+
value: Værdi
|
46
|
+
restricted: Begrænset adgang
|
@@ -0,0 +1,46 @@
|
|
1
|
+
de:
|
2
|
+
plugins:
|
3
|
+
refinery_settings:
|
4
|
+
title: Einstellungen
|
5
|
+
description: Refinery-Einstellungen verwalten
|
6
|
+
admin:
|
7
|
+
refinery_settings:
|
8
|
+
delete: Diese Einstellung für immer löschen
|
9
|
+
edit: Diese Einstellung bearbeiten
|
10
|
+
index:
|
11
|
+
new: Neue Einstellung erstellen
|
12
|
+
empty_set: Es gibt noch keine Einstellungen.
|
13
|
+
create_first: Klicken Sie auf '%{link}', um Ihre erste Einstellung anzulegen.
|
14
|
+
form:
|
15
|
+
enabled: "Ja, die Einstellung aktivieren."
|
16
|
+
restart_may_be_in_order_html: "<strong>Bitte beachten Sie</strong>, dass Sie Ihre Website eventuell neu starten müssen, damit die Einstellungen angewendet werden."
|
17
|
+
yes_make_this_setting_restricted: Ja, diese Einstellung auf Administratoren einschränken.
|
18
|
+
help:
|
19
|
+
restricted: Macht diese Einstellung nur für Administratoren sichtbar und veränderbar.
|
20
|
+
activity_show_limit: Dies schränkt die Anzahl der Einträge im Amaturenbrett ein.
|
21
|
+
analytics_page_code: Dieser Code aktiviert Google Analytics innerhalb Ihrer Webseite. Wenn diese Einstellung leer gelassen wird oder auf UA-xxxxxx-x gesetzt wird, ist diese Funktion deaktiviert und es werden keine Verbindungsaufrufe zu Google Analytics gemacht.
|
22
|
+
frontend_refinery_stylesheets_enabled: "Standardmäßig enthält Refinery Stylesheets für das Frontend, welche standard CSS bereitstellen und durch diese Einstellung ein- oder ausgeschaltet werden, ohne dabei Ihren eigenen Stylesheets in die Quere zu kommen."
|
23
|
+
image_dialogue_sizes: Diese Einstellung wirkt sich auf den "Bild einfügen" Dialog aus. Sie müssen für die verschiedenen Miniaturansichten sorgen, sowie diesen Wert hier ändern.
|
24
|
+
image_thumbnails: Wenn Sie diese Einstellung verändern, müssen Sie Ihre Bilder neu erzeugen lassen, indem Sie "rake images:regenerate" (oder "rake images:update" wenn Sie nur neue Miniaturansichten hinzugefügt haben), sonst wird diese Einstellung nicht für bereits vorhandene Bilder angewendet.
|
25
|
+
menu_hide_children: Versteckt alle Unterseiten auf dem Menü, auch wenn diese vorhanden sind.
|
26
|
+
new_page_parts: Erlaubt das Hinzufügen neuer Teilbereiche (Inhalts-Abschnitte) im Seiten-Editor.
|
27
|
+
page_title: Sehr umfangreiche Möglichkeit zum Setzen des Seitentitels. Hier können Sie eine angepasste CSS-Klasse oder ein HTML-Tag angeben, oder auch eine Brotkrumen-Navigation erzeugen.
|
28
|
+
pages_advanced_options_include_seo: Dies legt fest, ob die Suchmaschinenoptimierung unter den erweiterten Einstellungen einer Seite angezeigt werden soll.
|
29
|
+
preferred_image_view: Dies legt fest, welche Ansicht des Bilder-Erweiterung für vorhandene Bilder verwendet werden soll - "grid" für eine Gitter-Ansicht und "list" für eine Listen-Ansicht. Es gibt einen Knopf in der Erweiterung selbst, um diesen Vorgang zu automatisieren.
|
30
|
+
refinery_enable_backend_reordering: Hiermit können Sie die Möglichkeit, Erweiterungen umzusortieren, entfernen.
|
31
|
+
refinery_menu_cache_action_suffix: Die steuert den Schlüssel der benutzt wird, um das Menü der Seite zwischenzuspeichern. Wenn Sie ein Thema verwenden, lassen Sie diesen Wert so - das Thema wird sich darum kümmern.
|
32
|
+
show_contact_privacy_link: Sie können den Link zu den Datenschutzbestimmungen beim Kontaktformular verstecken oder beim Absenden-Knopf anzeigen lassen.
|
33
|
+
site_name: Dies ist der Name Ihrer Webseite, der im Kopfbereich, im Administrationsbereich und bei manchen Themen im Fußbereich beim Copyright angezeigt wird.
|
34
|
+
theme: Geben Sie den Namen des Themas an, das die verwenden möchten. Dies wirkt sich sofort aus und muss auf ein vorhandenes Thema verweisen.
|
35
|
+
use_google_ajax_libraries: Wenn Sie Googles AJAX CDN verwenden wollen, setzen diesen Wert auf "true".
|
36
|
+
use_marketable_urls: Ändert Urls von /pages/about auf /about und behebt automatisch Konflikte mit anderen Erweiterungen.
|
37
|
+
use_resource_caching: Es wird empfohlen, dies in der Produktionsumgebung zu verwenden, da es Javascript- und Stylesheet Dateien zusammenfasst, um die Anzahl an Web-Anfragen zu verringern und die Geschwindigkeit zu erhöhen.
|
38
|
+
approximate_ascii: Setzen Sie dies auf wahr, wenn Sie lateinische Zeichen mit Akzenten oder anderen diakritischen Zeichen in Seitentiteln verwenden. Es wird Zeichen wie ā, č, ž in a, c, z konvertieren und dadurch werden diese in der Adresszeile mancher Browser nicht seltsam angezeigt.
|
39
|
+
activerecord:
|
40
|
+
models:
|
41
|
+
refinery_setting: Einstellungen
|
42
|
+
attributes:
|
43
|
+
refinery_setting:
|
44
|
+
name: Name
|
45
|
+
value: Wert
|
46
|
+
restricted: Eingeschränkt
|
@@ -0,0 +1,46 @@
|
|
1
|
+
el:
|
2
|
+
plugins:
|
3
|
+
refinery_settings:
|
4
|
+
title: Settings
|
5
|
+
description: Διαχείριση ρυθμίσεων του Refinery
|
6
|
+
admin:
|
7
|
+
refinery_settings:
|
8
|
+
delete: Διαγραφή ρυθμίσης
|
9
|
+
edit: Επεξεργασία ρύθμισης
|
10
|
+
index:
|
11
|
+
new: Προσθήκη ρύθμισης
|
12
|
+
empty_set: Δεν υπάρχουν ρυθμίσεις.
|
13
|
+
create_first: "Κάντε κλίκ εδώ '%{link}' για να προσθέσετε την πρώτη σας ρύθμιση."
|
14
|
+
form:
|
15
|
+
enabled: "Ναι, ενεργοποιήσαι τη ρύθμιση."
|
16
|
+
restart_may_be_in_order_html: <strong>Σημείωση</strong> ίσως θα πρέπει να επανακινήσετε το server για να πραγματοποιηθεί η αλλαγή.
|
17
|
+
yes_make_this_setting_restricted: "Yes, make this setting restricted only to superusers."
|
18
|
+
help:
|
19
|
+
restricted: This makes the setting only visible and editable by users who are superusers (like you).
|
20
|
+
activity_show_limit: This limits the number of items that can display in the Dashboard listing.
|
21
|
+
analytics_page_code: This code activates Google Analytics tracking within your website. If the setting is left blank or set to UA-xxxxxx-x then this is disabled and no remote calls to Google Analytics are made.
|
22
|
+
frontend_refinery_stylesheets_enabled: "By default, Refinery includes stylesheets for the frontend which provide default CSS without getting in the way of your own stylesheets, enabled or disabled by this setting."
|
23
|
+
image_dialogue_sizes: This setting applies to the Insert Image dialogue. You must implement the different thumbnail sizes as well as changing this.
|
24
|
+
image_thumbnails: If you modify this setting you will have to regenerate your images by running rake images:regenerate (or rake images:update if you only added more thumbnails) otherwise the setting will not apply to existing images.
|
25
|
+
menu_hide_children: Hide any subpages from the menu even if they are present.
|
26
|
+
new_page_parts: Enable adding new page parts (content sections) in the page editors.
|
27
|
+
page_title: Very complex options for setting the page title. Here you can set custom CSS class or a different tag or tell it to breadcrumb with pages in its ancestry.
|
28
|
+
pages_advanced_options_include_seo: This controls whether the SEO options are displayed in the advanced options for a page.
|
29
|
+
preferred_image_view: This controls which view the images plugin displays existing images in - grid for 'Grid View' and list for 'List View'. There is a button to automate this process on the images plugin itself.
|
30
|
+
refinery_enable_backend_reordering: You can remove the ability to reorder the plugins' display order with this.
|
31
|
+
refinery_menu_cache_action_suffix: This controls the key that is used to cache the site menu. If you are using a theme then it is better to leave this as the default as the theme will handle it.
|
32
|
+
show_contact_privacy_link: You can hide or show the link to the privacy policy page on the contact form by the submit button.
|
33
|
+
site_name: This is the name for your website and will display in the header and in the Refinery backend and in the footer copyright statement for some themes.
|
34
|
+
theme: Enter the name for the theme that you want to be enabled. This will take effect immediately and must correctly identify an existing theme for this to work.
|
35
|
+
use_google_ajax_libraries: If you want to use Google's AJAX CDN then set this to true.
|
36
|
+
use_marketable_urls: Change urls from /pages/about to /about and automatically manage conflicts with other plugins.
|
37
|
+
use_resource_caching: Recommended to enable this in production mode as it bundles javascript assets and stylesheet assets into single file packages to reduce the number of web requests on your site and speed it up.
|
38
|
+
approximate_ascii: Set this to true if you use Latin characters with accents and other diacritics in page titles. It'll convert characters like ā, č, ž into a, c, z and this way those characters won't appear strangely in the address bar of some web browsers.
|
39
|
+
activerecord:
|
40
|
+
models:
|
41
|
+
refinery_setting: ρύθμιση
|
42
|
+
attributes:
|
43
|
+
refinery_setting:
|
44
|
+
name: Όνονα
|
45
|
+
value: Τιμή
|
46
|
+
restricted: Περιορισμένο
|