Sha256: b3af10f2b9ea45a61a319759c3cd6ace067fe3acb1030f8b08e812ca2ecbe63e

Contents?: true

Size: 631 Bytes

Versions: 2

Compression:

Stored size: 631 Bytes

Contents

module Admin::ContentHelper
  include ArticlesHelper

  def contents
    [@article]
  end

  def params_qsa
    { 'search[category]' => @search[:category], 
      'search[user_id]' => @search[:user_id], 
      'search[published_at]' => @search[:published_at], 
      'searched[published]' => @search[:published] }
  end

  def link_to_destroy_draft(record, controller = @controller.controller_name)
    if record.state.to_s == "Draft"
      link_to(_("Destroy this draft"), 
        { :controller => controller, :action => 'destroy', :id => record.id },
          :confirm => "Are you sure?", :method => :post )
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typo-5.1.2 app/helpers/admin/content_helper.rb
typo-5.1.3 app/helpers/admin/content_helper.rb