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'
|
2012-03-18 11:48:51 +00:00
|
|
|
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'
|
2012-11-27 23:36:58 +00:00
|
|
|
requires_redmine :version_or_higher => '2.1.0'
|
2012-03-18 11:48:51 +00:00
|
|
|
url 'https://bitbucket.org/akiko_pusu/redmine_issue_templates'
|
2012-03-12 11:36:16 +00:00
|
|
|
|
|
|
|
project_module :issue_templates do
|
2012-07-18 22:11:35 +00:00
|
|
|
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
|
|
|
|
2012-06-25 03:27:21 +00:00
|
|
|
Rails.configuration.to_prepare do
|
2012-07-01 11:55:21 +00:00
|
|
|
require_dependency 'projects_helper'
|
2012-06-25 03:27:21 +00:00
|
|
|
unless ProjectsHelper.included_modules.include? IssueTemplatesProjectsHelperPatch
|
|
|
|
ProjectsHelper.send(:include, IssueTemplatesProjectsHelperPatch)
|
2012-07-01 11:55:21 +00:00
|
|
|
end
|
2012-06-25 03:27:21 +00:00
|
|
|
end
|
2012-03-12 11:36:16 +00:00
|
|
|
end
|