2018-06-23 12:33:00 +02:00
|
|
|
Rails.configuration.to_prepare do
|
|
|
|
require_dependency "glossary_macros"
|
2019-10-27 13:48:51 +01:00
|
|
|
Redmine::Activity.register :glossary_terms
|
|
|
|
Redmine::Search.available_search_types << 'glossary_terms'
|
2018-06-23 12:33:00 +02:00
|
|
|
end
|
2018-06-11 14:31:38 +02:00
|
|
|
|
2018-04-30 14:34:14 +02:00
|
|
|
Redmine::Plugin.register :redmine_glossary do
|
|
|
|
name 'Redmine Glossary plugin'
|
|
|
|
author 'Toru Takahashi'
|
|
|
|
description 'This is a plugin for Redmine to create a glossary that is a list of terms in a project.'
|
2020-01-02 18:49:36 +01:00
|
|
|
version '1.1.0'
|
2018-04-30 14:34:14 +02:00
|
|
|
url 'https://github.com/torutk/redmine_glossary'
|
|
|
|
author_url 'http://www.torutk.com'
|
2020-01-02 18:49:36 +01:00
|
|
|
requires_redmine version_or_higher: '4.0'
|
2018-05-13 13:19:58 +02:00
|
|
|
|
|
|
|
project_module :glossary do
|
2019-10-27 13:48:51 +01:00
|
|
|
permission :view_glossary_terms, {
|
2018-05-20 15:19:01 +02:00
|
|
|
glossary_terms: [:index, :show],
|
|
|
|
glossary_categories: [:index, :show]
|
|
|
|
}
|
2019-10-27 13:48:51 +01:00
|
|
|
permission :manage_glossary_terms, {
|
2019-12-01 13:51:18 +01:00
|
|
|
glossary_terms: [:new, :create, :edit, :update, :destroy, :import],
|
2018-05-20 15:19:01 +02:00
|
|
|
glossary_categories: [:new, :create, :edit, :update, :destroy],
|
|
|
|
},
|
|
|
|
require: :member
|
|
|
|
|
2018-05-13 13:19:58 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
menu :project_menu, :glossary,
|
|
|
|
{ controller: :glossary_terms, action: :index },
|
|
|
|
caption: :glossary_title,
|
|
|
|
param: :project_id
|
|
|
|
|
2018-04-30 14:34:14 +02:00
|
|
|
end
|