This commit is contained in:
BoHung Chiu 2023-01-05 19:51:06 +08:00
parent 8bf121655b
commit c8c8738800
2 changed files with 14 additions and 18 deletions

View File

@ -2,6 +2,7 @@
require 'rubyXL' require 'rubyXL'
class Admin::PatchfilesController < OrbitAdminController class Admin::PatchfilesController < OrbitAdminController
include Admin::PatchfilesHelper include Admin::PatchfilesHelper
include AdminAuthorize rescue nil
before_action :getfont , :create_first_field before_action :getfont , :create_first_field
#before_action :load_access_levels #before_action :load_access_levels
layout "structure" layout "structure"

View File

@ -1,13 +1,13 @@
require "yaml" require "yaml"
module Patchfile module Patchfile
class Engine < ::Rails::Engine class Engine < ::Rails::Engine
initializer "patchfile" do initializer "patchfile" do
OrbitApp.registration "Patchfile", :type => "ModuleApp" do OrbitApp.registration "Patchfile", :type => "ModuleApp" do
base_url File.expand_path File.dirname(__FILE__) base_url File.expand_path File.dirname(__FILE__)
# taggable "patchfilefield" # taggable "patchfilefield"
# categorizable # categorizable
# authorizable # authorizable
side_bar do side_bar do
# head_label_i18n 'patchfile.patchfile', icon_class: "icons-megaphone" # head_label_i18n 'patchfile.patchfile', icon_class: "icons-megaphone"
# available_for "users" # available_for "users"
# active_for_controllers (['admin/patchfiles']) # active_for_controllers (['admin/patchfiles'])
@ -18,20 +18,15 @@ module Patchfile
# :priority=>1, # :priority=>1,
# :active_for_action=>{'admin/patchfiles'=>'index'}, # :active_for_action=>{'admin/patchfiles'=>'index'},
# :available_for => 'users' # :available_for => 'users'
# context_link 'CKEDITOR', # context_link 'CKEDITOR',
# :link_path=>"admin_patchfiles_showckeditor_path" , # :link_path=>"admin_patchfiles_showckeditor_path" ,
# #:link_to=>"admin_patchfiles_path"+"/showckeditor" , # #:link_to=>"admin_patchfiles_path"+"/showckeditor" ,
# :priority=>2, # :priority=>2,
# :active_for_action=>{'admin/patchfiles'=>'showckeditor'}, # :active_for_action=>{'admin/patchfiles'=>'showckeditor'},
# :available_for => 'users' # :available_for => 'users'
end end
end end
# # temp = YAML.load_file(File.join(Rails.root,"config","mongoid.yml")) end
# # dbsettings = temp["production"]["sessions"]["default"]
# # s = Moped::Session.new(dbsettings["hosts"])
# # s.use dbsettings["database"]
# # s[:bulletins].indexes.create({expirable_created_at: 1},{ expireAfterSeconds: 180 })
end
end end
end end