##// END OF EJS Templates
Added the ability to copy a project in the Project Administration panel....
Added the ability to copy a project in the Project Administration panel. * Added Copy project button. * Added Project#copy_from to duplicate a project to be modified and saved by the user * Added a ProjectsController#copy based off the add method ** Used Project#copy_from to create a duplicate project in memory * Implemented Project#copy to copy data for a project from another and save it. ** Members ** Project level queries ** Project custom fields * Added a plugin hook for Project#copy. #1125 #1556 #886 #309 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2704 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r1947:bcde2f4dce7a
r2608:fa7bd1c71dca
Show More
redmine_plugin_generator.rb
31 lines | 1.2 KiB | text/x-ruby | RubyLexer
class RedminePluginGenerator < Rails::Generator::NamedBase
attr_reader :plugin_path, :plugin_name, :plugin_pretty_name
def initialize(runtime_args, runtime_options = {})
super
@plugin_name = "redmine_#{file_name.underscore}"
@plugin_pretty_name = plugin_name.titleize
@plugin_path = "vendor/plugins/#{plugin_name}"
end
def manifest
record do |m|
m.directory "#{plugin_path}/app/controllers"
m.directory "#{plugin_path}/app/helpers"
m.directory "#{plugin_path}/app/models"
m.directory "#{plugin_path}/app/views"
m.directory "#{plugin_path}/db/migrate"
m.directory "#{plugin_path}/lib/tasks"
m.directory "#{plugin_path}/assets/images"
m.directory "#{plugin_path}/assets/javascripts"
m.directory "#{plugin_path}/assets/stylesheets"
m.directory "#{plugin_path}/lang"
m.directory "#{plugin_path}/test"
m.template 'README.rdoc', "#{plugin_path}/README.rdoc"
m.template 'init.rb.erb', "#{plugin_path}/init.rb"
m.template 'en.yml', "#{plugin_path}/lang/en.yml"
m.template 'test_helper.rb.erb', "#{plugin_path}/test/test_helper.rb"
end
end
end