removed hard-coded help texts and made them configurable

pull/6827/head
Markus Kahl 14 years ago
parent df635d46a6
commit 01cab3618e
  1. 20
      lib/widget/settings.rb

@ -4,12 +4,12 @@ class Widget::Settings < Widget::Base
content_tag :div, :id => "query_form_content" do
fieldsets = render_widget Widget::Settings::Fieldset, @query,
{ :type => "filter", :help_text => :help_filters } do
{ :type => "filter", :help_text => self.filter_help } do
render_widget Widget::Filters, @query
end
fieldsets += render_widget Widget::Settings::Fieldset, @query,
{ :type => "group_by", :help_text => :help_group_by } do
{ :type => "group_by", :help_text => self.group_by_help } do
render_widget Widget::GroupBys, @query
end
@ -24,4 +24,20 @@ class Widget::Settings < Widget::Base
end
end
end
def filter_help
if help_text.kind_of?(Array)
help_text[0]
else
nil
end
end
def group_by_help
if help_text.kind_of?(Array)
help_text[1]
else
nil
end
end
end

Loading…
Cancel
Save