Patch #24007 ยป config_plugins_path.diff
| config/configuration.yml.example | ||
|---|---|---|
|
# attachments_storage_path: D:/redmine/files
|
||
|
attachments_storage_path:
|
||
|
# Absolute path to the directory where plugins are stored.
|
||
|
# The default is the 'plugins' directory in your Redmine instance.
|
||
|
# Your Redmine instance needs to have write permission on this
|
||
|
# directory.
|
||
|
# Examples:
|
||
|
# plugins_path: /var/redmine/plugins
|
||
|
# plugins_path: D:/redmine/plugins
|
||
|
plugins_path:
|
||
|
# Configuration of the autologin cookie.
|
||
|
# autologin_cookie_name: the name of the cookie (default: autologin)
|
||
|
# autologin_cookie_path: the cookie path (default: /)
|
||
| lib/generators/redmine_plugin/redmine_plugin_generator.rb | ||
|---|---|---|
|
super
|
||
|
@plugin_name = file_name.underscore
|
||
|
@plugin_pretty_name = plugin_name.titleize
|
||
|
@plugin_path = "plugins/#{plugin_name}"
|
||
|
if Redmine::Configuration['plugins_path'].nil?
|
||
|
@plugin_path = File.join(Rails.root, 'plugins', plugin_name)
|
||
|
else
|
||
|
@plugin_path = File.join(Redmine::Configuration['plugins_path'], plugin_name)
|
||
|
end
|
||
|
puts @plugin_path
|
||
|
end
|
||
|
def copy_templates
|
||
| lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb | ||
|---|---|---|
|
super
|
||
|
@plugin_name = file_name.underscore
|
||
|
@plugin_pretty_name = plugin_name.titleize
|
||
|
@plugin_path = "plugins/#{plugin_name}"
|
||
|
if Redmine::Configuration['plugins_path'].nil?
|
||
|
@plugin_path = File.join(Rails.root, 'plugins', plugin_name)
|
||
|
else
|
||
|
@plugin_path = File.join(Redmine::Configuration['plugins_path'], plugin_name)
|
||
|
end
|
||
|
@controller_class = controller.camelize
|
||
|
end
|
||
| lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb | ||
|---|---|---|
|
super
|
||
|
@plugin_name = file_name.underscore
|
||
|
@plugin_pretty_name = plugin_name.titleize
|
||
|
@plugin_path = "plugins/#{plugin_name}"
|
||
|
if Redmine::Configuration['plugins_path'].nil?
|
||
|
@plugin_path = File.join(Rails.root, 'plugins', plugin_name)
|
||
|
else
|
||
|
@plugin_path = File.join(Redmine::Configuration['plugins_path'], plugin_name)
|
||
|
end
|
||
|
@model_class = model.camelize
|
||
|
@table_name = @model_class.tableize
|
||
|
@migration_filename = "create_#{@table_name}"
|
||
| lib/redmine/plugin.rb | ||
|---|---|---|
|
# When rendered, the plugin settings value is available as the local variable +settings+
|
||
|
class Plugin
|
||
|
cattr_accessor :directory
|
||
|
self.directory = File.join(Rails.root, 'plugins')
|
||
|
self.directory = Redmine::Configuration['plugins_path'] || File.join(Rails.root, 'plugins')
|
||
|
cattr_accessor :public_directory
|
||
|
self.public_directory = File.join(Rails.root, 'public', 'plugin_assets')
|
||