Class: Dunlop::DashboardController

Inherits:
ApplicationController show all
Defined in:
app/controllers/dunlop/dashboard_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#store_or_reset_params_q

Instance Method Details

#active_modeObject

POST /active_mode



33
34
35
36
# File 'app/controllers/dunlop/dashboard_controller.rb', line 33

def active_mode
  session[:archived_mode] = false
  redirect_to main_app.root_path
end

#archived_modeObject

POST /archived_mode



27
28
29
30
# File 'app/controllers/dunlop/dashboard_controller.rb', line 27

def archived_mode
  session[:archived_mode] = true
  redirect_to main_app.root_path
end

#badge_infoObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/dunlop/dashboard_controller.rb', line 5

def badge_info
  @process_class = params[:resource].to_s.classify.safe_constantize
  render nothing: true and return unless @process_class
  if params[:id].present?
    setup_badge_info_for_record
  else
    if @process_class.ancestors.include?(WorkflowInstance)
      setup_badge_info_for_scenario
    else
      setup_badge_info_for_subprocess
    end
  end
  render layout: false
end

#changelogObject



20
21
22
23
24
# File 'app/controllers/dunlop/dashboard_controller.rb', line 20

def changelog
  markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
  html = markdown.render File.read(Rails.root.join('CHANGELOG.md'))
  render html: html.html_safe, layout: true
end

#homeObject



2
3
# File 'app/controllers/dunlop/dashboard_controller.rb', line 2

def home
end