Sha256: 927246f802c718f8de9df474dd603014dd4108b66b866c43d645cd4e73133193

Contents?: true

Size: 543 Bytes

Versions: 7

Compression:

Stored size: 543 Bytes

Contents

module UploadDocumentToolHelper
  def sortable(column, title = nil)
    title ||= column.titleize
    css_class = column == sort_column ? "current #{sort_direction}" : nil
    direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
    link_to title, { sort: column, direction: direction }, class: css_class
  end

  def documents_table(documents)
    render 'upload_documents_tool/documents', documents: documents
  end

  def document_form(document)
    render 'upload_documents_tool/form', document: document
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
upload_documents_tool-0.1.8 app/helpers/upload_document_tool_helper.rb
upload_documents_tool-0.1.7 app/helpers/upload_document_tool_helper.rb
upload_documents_tool-0.1.6 app/helpers/upload_document_tool_helper.rb
upload_documents_tool-0.1.5 app/helpers/upload_document_tool_helper.rb
upload_documents_tool-0.1.4 app/helpers/upload_document_tool_helper.rb
upload_documents_tool-0.1.3 app/helpers/upload_document_tool_helper.rb
upload_documents_tool-0.1.2 app/helpers/upload_document_tool_helper.rb