redmine_issue_templates/init.rb

48 lines
2.0 KiB
Ruby
Raw Normal View History

2012-12-22 00:41:02 +00:00
# Redmine Issue Template Plugin
#
# This is a plugin for Redmine to generate and use issue templates
# for each project to assist issue creation.
# Created by Akiko Takano.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2012-03-12 11:36:16 +00:00
require 'redmine'
require 'issue_templates_issues_hook'
require 'issue_templates_projects_helper_patch'
Redmine::Plugin.register :redmine_issue_templates do
name 'Redmine Issue Templates plugin'
author 'Akiko Takano'
description 'Plugin to generate and use issue templates for each project to assist issue creation.'
2014-02-19 07:34:43 +00:00
version '0.0.7'
2012-03-12 11:36:16 +00:00
author_url 'http://twitter.com/akiko_pusu'
requires_redmine :version_or_higher => '2.1.0'
url 'https://bitbucket.org/akiko_pusu/redmine_issue_templates'
2012-03-12 11:36:16 +00:00
project_module :issue_templates do
permission :edit_issue_templates, {:issue_templates => [:new, :edit, :destroy, :move]}
2012-03-12 11:36:16 +00:00
permission :show_issue_templates, {:issue_templates => [:index, :show, :load, :set_pulldown]}
permission :manage_issue_templates,
{:issue_templates_settings => [:show, :edit]}, :require => :member
end
2012-12-22 00:41:02 +00:00
Rails.configuration.to_prepare do
require_dependency 'projects_helper'
unless ProjectsHelper.included_modules.include? IssueTemplatesProjectsHelperPatch
ProjectsHelper.send(:include, IssueTemplatesProjectsHelperPatch)
end
end
2012-03-12 11:36:16 +00:00
end