finish the first version of patch_file
This commit is contained in:
commit
a2d46ca121
398 files changed
+12910
No files matched your search
@@ -0,0 +1,4 @@
|
||||
require "patchfile/engine"
|
||||
|
||||
module Patchfile
|
||||
end
|
||||
@@ -0,0 +1,42 @@
|
||||
require "yaml"
|
||||
module Patchfile
|
||||
class Engine < ::Rails::Engine
|
||||
initializer "patchfile" do
|
||||
OrbitApp.registration "Patchfile", :type => "ModuleApp" do
|
||||
module_label "Patchfile.Patchfile"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
widget_methods ["widget","random_Patchfile_widget", "tag_cloud"]
|
||||
widget_settings [{"data_count"=>30}]
|
||||
taggable "Patchfile"
|
||||
categorizable
|
||||
authorizable
|
||||
frontend_enabled
|
||||
data_count 1..30
|
||||
side_bar do
|
||||
head_label_i18n 'Patchfile.Patchfile', icon_class: "icons-megaphone"
|
||||
available_for "users"
|
||||
active_for_controllers (['admin/patchfiles'])
|
||||
head_link_path "admin_patchfiles_path"
|
||||
|
||||
context_link 'Patchfile.Patchfile',
|
||||
:link_path=>"admin_patchfiles_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/patchfiles'=>'index'},
|
||||
:available_for => 'users'
|
||||
context_link 'CKEDITOR',
|
||||
:link_path=>"admin_patchfiles_showckeditor_path" ,
|
||||
#:link_to=>"admin_patchfiles_path"+"/showckeditor" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{'admin/patchfiles'=>'showckeditor'},
|
||||
:available_for => 'users'
|
||||
|
||||
end
|
||||
end
|
||||
# temp = YAML.load_file(File.join(Rails.root,"config","mongoid.yml"))
|
||||
# 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
|
||||
@@ -0,0 +1,3 @@
|
||||
module Patchfile
|
||||
VERSION = "0.0.1"
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
# desc "Explaining what the task does"
|
||||
# task :bulletin do
|
||||
# # Task goes here
|
||||
# end
|
||||
Reference in new issue
Block a user