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
|
include Admin::RulingTimersHelper
|
||||||
before_action ->(module_app = @app_title) { set_variables module_app }
|
|
||||||
before_action :set_weekdays
|
before_action :set_weekdays
|
||||||
def initialize
|
def initialize
|
||||||
super
|
super
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
locales = Site.first.in_use_locales rescue I18n.available_locales
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
||||||
|
begin
|
||||||
s = Site.first
|
s = Site.first
|
||||||
save_flag = false
|
save_flag = false
|
||||||
if !s.orbit_bar_extra_render_files_inside.include?("ruling_timers/timer_button")
|
if !s.orbit_bar_extra_render_files_inside.include?("ruling_timers/timer_button")
|
||||||
|
@ -11,6 +12,9 @@ Rails.application.routes.draw do
|
||||||
save_flag = true
|
save_flag = true
|
||||||
end
|
end
|
||||||
s.save if save_flag
|
s.save if save_flag
|
||||||
|
rescue => e
|
||||||
|
puts e.to_s
|
||||||
|
end
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :ruling_timers do
|
resources :ruling_timers do
|
||||||
member do
|
member do
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
module RulingTimer
|
module RulingTimer
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
initializer "ruling_timer" do
|
initializer "ruling_timer" do
|
||||||
OrbitApp.registration "RulingTimer", :type => "ModuleApp" do
|
begin
|
||||||
|
OrbitApp.registration "RulingTimer", :type => "OrbitMemberModule" do
|
||||||
module_label "ruling_timer.ruling_timer"
|
module_label "ruling_timer.ruling_timer"
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
authorizable
|
authorizable
|
||||||
|
|
||||||
side_bar do
|
side_bar do
|
||||||
head_label_i18n 'ruling_timer.ruling_timer', icon_class: "icons-clock"
|
head_label_i18n 'ruling_timer.ruling_timer', icon_class: "icons-clock"
|
||||||
available_for "users"
|
available_for "users"
|
||||||
active_for_controllers (['admin/seminars'])
|
active_for_controllers (['admin/ruling_timers'])
|
||||||
head_link_path "admin_ruling_timers_path"
|
head_link_path "admin_ruling_timers_path"
|
||||||
|
|
||||||
context_link 'restful_actions.timer_management',
|
context_link 'restful_actions.timer_management',
|
||||||
|
@ -23,7 +23,30 @@ module RulingTimer
|
||||||
:active_for_action=>{'admin/ruling_timers'=>'task_management'},
|
:active_for_action=>{'admin/ruling_timers'=>'task_management'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue