2007-10-14 05:33:00 +00:00
|
|
|
class IntegrationsController < ApplicationController
|
2011-10-04 20:14:36 +02:00
|
|
|
require 'mail'
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2024-06-06 02:04:29 +03:00
|
|
|
skip_before_action :login_required, :only => [:search_plugin]
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2007-10-14 05:33:00 +00:00
|
|
|
def index
|
|
|
|
|
@page_title = 'TRACKS::Integrations'
|
|
|
|
|
end
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2007-12-05 06:48:24 +00:00
|
|
|
def rest_api
|
|
|
|
|
@page_title = 'TRACKS::REST API Documentation'
|
|
|
|
|
end
|
2014-08-14 21:05:05 -05:00
|
|
|
|
2020-07-23 22:20:28 +03:00
|
|
|
def help
|
|
|
|
|
@page_title = 'TRACKS::Help'
|
|
|
|
|
end
|
|
|
|
|
|
2008-12-10 21:30:43 +01:00
|
|
|
def search_plugin
|
2020-10-27 21:39:19 +02:00
|
|
|
@icon_data = [File.open(File.join(Rails.root, 'app', 'assets', 'images', 'done.png')).read]
|
|
|
|
|
.pack('m').gsub(/\n/, '')
|
2008-12-10 21:30:43 +01:00
|
|
|
end
|
|
|
|
|
|
2012-07-12 13:14:21 +02:00
|
|
|
private
|
2013-05-05 20:32:32 +02:00
|
|
|
|
2014-09-08 00:29:22 -04:00
|
|
|
def flatten_params(params, title = nil, result = {})
|
|
|
|
|
params.each do |key, value|
|
2020-10-27 21:39:19 +02:00
|
|
|
if value.is_a? Hash
|
2014-09-08 00:29:22 -04:00
|
|
|
key_name = title ? "#{title}[#{key}]" : key
|
|
|
|
|
flatten_params(value, key_name, result)
|
|
|
|
|
else
|
|
|
|
|
key_name = title ? "#{title}[#{key}]" : key
|
|
|
|
|
result[key_name] = value
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return result
|
|
|
|
|
end
|
2007-10-14 05:33:00 +00:00
|
|
|
end
|