Object
(Not documented)
# File vendor/plugins/ubiquo_core/lib/ubiquo/filters/base_filter.rb, line 48
48: def add_filter_prefix(field)
49: if field.to_s.match(/^filter_/)
50: field
51: else
52: "filter_#{field}".to_sym
53: end
54: end
(Not documented)
# File vendor/plugins/ubiquo_core/lib/ubiquo/filters/base_filter.rb, line 18
18: def disable_link(fields)
19: if fields.map { |f| @context.params[f].blank? }.include?(false)
20: without_filters = @context.params.dup
21: fields.each { |f| without_filters[f] = nil}
22: without_filters.delete(:page)
23: without_filters.delete(:commit)
24: @context.link_to(I18n.t('ubiquo.filters.remove_filter'), without_filters, :class => 'bot_filters')
25: else
26: ""
27: end
28: end
(Not documented)
# File vendor/plugins/ubiquo_core/lib/ubiquo/filters/base_filter.rb, line 30
30: def extract_keepable_params(fields)
31: @context.params.reject do |key, values|
32: filter_fields = fields.flatten.map(&:to_s)
33: toremove = %w{commit controller action page} + filter_fields
34: toremove.include?(key)
35: end.to_hash
36: end
(Not documented)
# File vendor/plugins/ubiquo_core/lib/ubiquo/filters/base_filter.rb, line 9
9: def lateral_filter(options = {}, &block)
10: box_id = "box-" + (options[:box_id] || options[:field].to_s.dasherize)
11: fields = [options[:field]].flatten
12: title = I18n.t("ubiquo.filter", :thing => options[:caption])
13: @context.ubiquo_sidebar_box(title, :class => 'filters-box', :id => box_id, :extra_header => disable_link(fields)) do
14: yield(extract_keepable_params(fields))
15: end
16: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.