Move plugin to memeber plugins page.
This commit is contained in:
parent
1be1ef10eb
commit
6ba6290d0a
|
@ -1,6 +1,5 @@
|
|||
class Admin::RulingTimersController < OrbitAdminController
|
||||
class Admin::RulingTimersController < OrbitMemberController
|
||||
include Admin::RulingTimersHelper
|
||||
before_action ->(module_app = @app_title) { set_variables module_app }
|
||||
before_action :set_weekdays
|
||||
def initialize
|
||||
super
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
Rails.application.routes.draw do
|
||||
locales = Site.first.in_use_locales rescue I18n.available_locales
|
||||
s = Site.first
|
||||
save_flag = false
|
||||
if !s.orbit_bar_extra_render_files_inside.include?("ruling_timers/timer_button")
|
||||
s.orbit_bar_extra_render_files_inside << "ruling_timers/timer_button"
|
||||
save_flag = true
|
||||
end
|
||||
if !s.orbit_bar_extra_render_files_outside.include?("ruling_timers/timer_window")
|
||||
s.orbit_bar_extra_render_files_outside << "ruling_timers/timer_window"
|
||||
save_flag = true
|
||||
end
|
||||
s.save if save_flag
|
||||
begin
|
||||
s = Site.first
|
||||
save_flag = false
|
||||
if !s.orbit_bar_extra_render_files_inside.include?("ruling_timers/timer_button")
|
||||
s.orbit_bar_extra_render_files_inside << "ruling_timers/timer_button"
|
||||
save_flag = true
|
||||
end
|
||||
if !s.orbit_bar_extra_render_files_outside.include?("ruling_timers/timer_window")
|
||||
s.orbit_bar_extra_render_files_outside << "ruling_timers/timer_window"
|
||||
save_flag = true
|
||||
end
|
||||
s.save if save_flag
|
||||
rescue => e
|
||||
puts e.to_s
|
||||
end
|
||||
namespace :admin do
|
||||
resources :ruling_timers do
|
||||
member do
|
||||
|
|
|
@ -1,29 +1,52 @@
|
|||
module RulingTimer
|
||||
class Engine < ::Rails::Engine
|
||||
initializer "ruling_timer" do
|
||||
OrbitApp.registration "RulingTimer", :type => "ModuleApp" do
|
||||
module_label "ruling_timer.ruling_timer"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
authorizable
|
||||
initializer "ruling_timer" do
|
||||
begin
|
||||
OrbitApp.registration "RulingTimer", :type => "OrbitMemberModule" do
|
||||
module_label "ruling_timer.ruling_timer"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
authorizable
|
||||
side_bar do
|
||||
head_label_i18n 'ruling_timer.ruling_timer', icon_class: "icons-clock"
|
||||
available_for "users"
|
||||
active_for_controllers (['admin/ruling_timers'])
|
||||
head_link_path "admin_ruling_timers_path"
|
||||
|
||||
side_bar do
|
||||
head_label_i18n 'ruling_timer.ruling_timer', icon_class: "icons-clock"
|
||||
available_for "users"
|
||||
active_for_controllers (['admin/seminars'])
|
||||
head_link_path "admin_ruling_timers_path"
|
||||
|
||||
context_link 'restful_actions.timer_management',
|
||||
:link_path=>"timer_management_admin_ruling_timers_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/ruling_timers'=>'timer_management'},
|
||||
:available_for => 'managers'
|
||||
context_link 'restful_actions.task_management',
|
||||
:link_path=>"task_management_admin_ruling_timers_path" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{'admin/ruling_timers'=>'task_management'},
|
||||
:available_for => 'managers'
|
||||
context_link 'restful_actions.timer_management',
|
||||
:link_path=>"timer_management_admin_ruling_timers_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/ruling_timers'=>'timer_management'},
|
||||
:available_for => 'managers'
|
||||
context_link 'restful_actions.task_management',
|
||||
:link_path=>"task_management_admin_ruling_timers_path" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{'admin/ruling_timers'=>'task_management'},
|
||||
:available_for => 'managers'
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
OrbitApp.registration "RulingTimer", :type => "ModuleApp" do
|
||||
module_label "ruling_timer.ruling_timer"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
authorizable
|
||||
side_bar do
|
||||
head_label_i18n 'ruling_timer.ruling_timer', icon_class: "icons-clock"
|
||||
available_for "users"
|
||||
active_for_controllers (['admin/ruling_timers'])
|
||||
head_link_path "admin_ruling_timers_path"
|
||||
|
||||
context_link 'restful_actions.timer_management',
|
||||
:link_path=>"timer_management_admin_ruling_timers_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/ruling_timers'=>'timer_management'},
|
||||
:available_for => 'managers'
|
||||
context_link 'restful_actions.task_management',
|
||||
:link_path=>"task_management_admin_ruling_timers_path" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{'admin/ruling_timers'=>'task_management'},
|
||||
:available_for => 'managers'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue