Module: Redmine::Generators::SortableHeaders
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/redmine/generators/sortable_headers.rb
Instance Method Summary collapse
Instance Method Details
#sortable_header(name, caption = "field_#{name}", order = nil) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/redmine/generators/sortable_headers.rb', line 8 def sortable_header(name, = "field_#{name}", order = nil) if [:sort] order = ", " + key_value(:default_order, %("#{order}")) if order %(<%= sort_header_tag "#{name}", caption: l(:#{caption})#{order} %>) else "<th><%= l(:#{caption}) %></th>" end end |