2012-12-02 22:06:06 +04:00
|
|
|
# Redmine - project management software
|
2014-01-30 02:45:39 +04:00
|
|
|
# Copyright (C) 2006-2014 Jean-Philippe Lang
|
2012-12-02 22:06:06 +04:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
require 'redmine/core_ext'
|
|
|
|
|
2012-12-02 23:15:52 +04:00
|
|
|
begin
|
|
|
|
require 'RMagick' unless Object.const_defined?(:Magick)
|
|
|
|
rescue LoadError
|
|
|
|
# RMagick is not available
|
|
|
|
end
|
2013-12-23 21:07:51 +04:00
|
|
|
begin
|
2013-12-26 07:52:25 +04:00
|
|
|
require 'redcarpet' unless Object.const_defined?(:Redcarpet)
|
2013-12-23 21:07:51 +04:00
|
|
|
rescue LoadError
|
|
|
|
# Redcarpet is not available
|
|
|
|
end
|
2012-12-02 23:15:52 +04:00
|
|
|
|
2012-12-06 01:59:00 +04:00
|
|
|
require 'redmine/scm/base'
|
2007-08-29 20:52:35 +04:00
|
|
|
require 'redmine/access_control'
|
2012-12-02 22:06:06 +04:00
|
|
|
require 'redmine/access_keys'
|
2008-07-27 21:54:09 +04:00
|
|
|
require 'redmine/activity'
|
2012-12-02 22:06:06 +04:00
|
|
|
require 'redmine/activity/fetcher'
|
|
|
|
require 'redmine/ciphering'
|
|
|
|
require 'redmine/codeset_util'
|
2013-12-21 15:08:51 +04:00
|
|
|
require 'redmine/field_format'
|
2012-12-02 22:06:06 +04:00
|
|
|
require 'redmine/i18n'
|
|
|
|
require 'redmine/menu_manager'
|
|
|
|
require 'redmine/notifiable'
|
|
|
|
require 'redmine/platform'
|
|
|
|
require 'redmine/mime_type'
|
2010-09-29 00:19:55 +04:00
|
|
|
require 'redmine/notifiable'
|
2012-12-02 22:06:06 +04:00
|
|
|
require 'redmine/search'
|
|
|
|
require 'redmine/syntax_highlighting'
|
|
|
|
require 'redmine/thumbnail'
|
|
|
|
require 'redmine/unified_diff'
|
|
|
|
require 'redmine/utils'
|
|
|
|
require 'redmine/version'
|
2008-10-27 14:08:29 +03:00
|
|
|
require 'redmine/wiki_formatting'
|
2012-12-02 22:06:06 +04:00
|
|
|
|
|
|
|
require 'redmine/default_data/loader'
|
|
|
|
require 'redmine/helpers/calendar'
|
|
|
|
require 'redmine/helpers/diff'
|
|
|
|
require 'redmine/helpers/gantt'
|
|
|
|
require 'redmine/helpers/time_report'
|
|
|
|
require 'redmine/views/other_formats_builder'
|
|
|
|
require 'redmine/views/labelled_form_builder'
|
|
|
|
require 'redmine/views/builders'
|
2007-06-13 00:12:05 +04:00
|
|
|
|
2012-12-02 22:32:29 +04:00
|
|
|
require 'redmine/themes'
|
|
|
|
require 'redmine/hook'
|
|
|
|
require 'redmine/plugin'
|
|
|
|
|
2009-11-04 16:22:26 +03:00
|
|
|
if RUBY_VERSION < '1.9'
|
2012-02-19 18:44:48 +04:00
|
|
|
require 'fastercsv'
|
2009-11-04 16:22:26 +03:00
|
|
|
else
|
|
|
|
require 'csv'
|
|
|
|
FCSV = CSV
|
|
|
|
end
|
|
|
|
|
2010-02-17 01:41:59 +03:00
|
|
|
Redmine::Scm::Base.add "Subversion"
|
|
|
|
Redmine::Scm::Base.add "Darcs"
|
|
|
|
Redmine::Scm::Base.add "Mercurial"
|
|
|
|
Redmine::Scm::Base.add "Cvs"
|
|
|
|
Redmine::Scm::Base.add "Bazaar"
|
|
|
|
Redmine::Scm::Base.add "Git"
|
|
|
|
Redmine::Scm::Base.add "Filesystem"
|
2007-08-29 20:52:35 +04:00
|
|
|
|
|
|
|
# Permissions
|
|
|
|
Redmine::AccessControl.map do |map|
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_project, {:projects => [:show], :activities => [:index]}, :public => true, :read => true
|
|
|
|
map.permission :search_project, {:search => :index}, :public => true, :read => true
|
2010-09-07 19:00:27 +04:00
|
|
|
map.permission :add_project, {:projects => [:new, :create]}, :require => :loggedin
|
2010-09-08 20:01:51 +04:00
|
|
|
map.permission :edit_project, {:projects => [:settings, :edit, :update]}, :require => :member
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :close_project, {:projects => [:close, :reopen]}, :require => :member, :read => true
|
2007-09-14 15:34:08 +04:00
|
|
|
map.permission :select_project_modules, {:projects => :modules}, :require => :member
|
2014-01-11 15:47:26 +04:00
|
|
|
map.permission :view_members, {:members => [:index, :show]}, :public => true, :read => true
|
2012-02-06 13:47:10 +04:00
|
|
|
map.permission :manage_members, {:projects => :settings, :members => [:index, :show, :create, :update, :destroy, :autocomplete]}, :require => :member
|
2010-09-16 22:27:33 +04:00
|
|
|
map.permission :manage_versions, {:projects => :settings, :versions => [:new, :create, :edit, :update, :close_completed, :destroy]}, :require => :member
|
2010-09-07 19:00:27 +04:00
|
|
|
map.permission :add_subprojects, {:projects => [:new, :create]}, :require => :member
|
2011-08-31 20:05:48 +04:00
|
|
|
|
2007-09-14 15:34:08 +04:00
|
|
|
map.project_module :issue_tracking do |map|
|
|
|
|
# Issue categories
|
2011-11-20 21:09:01 +04:00
|
|
|
map.permission :manage_categories, {:projects => :settings, :issue_categories => [:index, :show, :new, :create, :edit, :update, :destroy]}, :require => :member
|
2007-09-14 15:34:08 +04:00
|
|
|
# Issues
|
2010-08-30 19:30:28 +04:00
|
|
|
map.permission :view_issues, {:issues => [:index, :show],
|
2010-08-17 19:03:58 +04:00
|
|
|
:auto_complete => [:issues],
|
2010-08-19 22:16:54 +04:00
|
|
|
:context_menus => [:issues],
|
2010-08-30 19:30:28 +04:00
|
|
|
:versions => [:index, :show, :status_by],
|
2011-02-27 16:34:41 +03:00
|
|
|
:journals => [:index, :diff],
|
2007-09-14 15:34:08 +04:00
|
|
|
:queries => :index,
|
2012-06-25 21:49:35 +04:00
|
|
|
:reports => [:issue_report, :issue_report_details]},
|
|
|
|
:read => true
|
2012-02-23 14:01:16 +04:00
|
|
|
map.permission :add_issues, {:issues => [:new, :create, :update_form], :attachments => :upload}
|
|
|
|
map.permission :edit_issues, {:issues => [:edit, :update, :bulk_edit, :bulk_update, :update_form], :journals => [:new], :attachments => :upload}
|
2011-07-04 21:44:41 +04:00
|
|
|
map.permission :manage_issue_relations, {:issue_relations => [:index, :show, :create, :destroy]}
|
2010-03-13 17:56:49 +03:00
|
|
|
map.permission :manage_subtasks, {}
|
2011-04-15 17:23:13 +04:00
|
|
|
map.permission :set_issues_private, {}
|
2011-04-15 17:30:25 +04:00
|
|
|
map.permission :set_own_issues_private, {}, :require => :loggedin
|
2013-02-16 15:35:18 +04:00
|
|
|
map.permission :add_issue_notes, {:issues => [:edit, :update, :update_form], :journals => [:new], :attachments => :upload}
|
2008-02-16 16:19:33 +03:00
|
|
|
map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
|
|
|
|
map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
|
2012-10-04 01:36:19 +04:00
|
|
|
map.permission :view_private_notes, {}, :read => true, :require => :member
|
|
|
|
map.permission :set_notes_private, {}, :require => :member
|
2012-01-07 21:27:47 +04:00
|
|
|
map.permission :move_issues, {:issues => [:bulk_edit, :bulk_update]}, :require => :loggedin
|
2007-09-14 15:34:08 +04:00
|
|
|
map.permission :delete_issues, {:issues => :destroy}, :require => :member
|
|
|
|
# Queries
|
2011-11-17 23:47:04 +04:00
|
|
|
map.permission :manage_public_queries, {:queries => [:new, :create, :edit, :update, :destroy]}, :require => :member
|
|
|
|
map.permission :save_queries, {:queries => [:new, :create, :edit, :update, :destroy]}, :require => :loggedin
|
2008-08-03 13:14:43 +04:00
|
|
|
# Watchers
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_issue_watchers, {}, :read => true
|
2013-02-10 14:31:12 +04:00
|
|
|
map.permission :add_issue_watchers, {:watchers => [:new, :create, :append, :autocomplete_for_user]}
|
2009-10-25 15:11:53 +03:00
|
|
|
map.permission :delete_issue_watchers, {:watchers => :destroy}
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
2011-08-31 20:05:48 +04:00
|
|
|
|
2007-09-14 15:34:08 +04:00
|
|
|
map.project_module :time_tracking do |map|
|
2011-11-25 01:16:44 +04:00
|
|
|
map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_time_entries, {:timelog => [:index, :report, :show]}, :read => true
|
2011-11-25 01:21:15 +04:00
|
|
|
map.permission :edit_time_entries, {:timelog => [:edit, :update, :destroy, :bulk_edit, :bulk_update]}, :require => :member
|
|
|
|
map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin
|
2010-09-10 20:00:49 +04:00
|
|
|
map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
2011-08-31 20:05:48 +04:00
|
|
|
|
2007-09-14 15:34:08 +04:00
|
|
|
map.project_module :news do |map|
|
2014-01-11 16:27:01 +04:00
|
|
|
map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy], :attachments => :upload}, :require => :member
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true
|
2010-09-22 20:25:09 +04:00
|
|
|
map.permission :comment_news, {:comments => :create}
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
map.project_module :documents do |map|
|
2014-01-11 16:27:01 +04:00
|
|
|
map.permission :add_documents, {:documents => [:new, :create, :add_attachment], :attachments => :upload}, :require => :loggedin
|
|
|
|
map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment], :attachments => :upload}, :require => :loggedin
|
2013-01-20 15:38:20 +04:00
|
|
|
map.permission :delete_documents, {:documents => [:destroy]}, :require => :loggedin
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
2011-08-31 20:05:48 +04:00
|
|
|
|
2007-09-14 15:34:08 +04:00
|
|
|
map.project_module :files do |map|
|
2014-01-11 16:27:01 +04:00
|
|
|
map.permission :manage_files, {:files => [:new, :create], :attachments => :upload}, :require => :loggedin
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_files, {:files => :index, :versions => :download}, :read => true
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
2011-08-31 20:05:48 +04:00
|
|
|
|
2007-09-14 15:34:08 +04:00
|
|
|
map.project_module :wiki do |map|
|
|
|
|
map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
|
|
|
|
map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
|
2012-10-23 22:45:14 +04:00
|
|
|
map.permission :delete_wiki_pages, {:wiki => [:destroy, :destroy_version]}, :require => :member
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true
|
|
|
|
map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true
|
|
|
|
map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true
|
2014-01-11 16:27:01 +04:00
|
|
|
map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment], :attachments => :upload
|
2008-12-09 19:54:46 +03:00
|
|
|
map.permission :delete_wiki_pages_attachments, {}
|
2008-05-04 19:05:38 +04:00
|
|
|
map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
2011-08-31 20:05:48 +04:00
|
|
|
|
2007-09-14 15:34:08 +04:00
|
|
|
map.project_module :repository do |map|
|
2012-01-15 18:23:06 +04:00
|
|
|
map.permission :manage_repository, {:repositories => [:new, :create, :edit, :update, :committers, :destroy]}, :require => :member
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :browse_repository, {:repositories => [:show, :browse, :entry, :raw, :annotate, :changes, :diff, :stats, :graph]}, :read => true
|
|
|
|
map.permission :view_changesets, {:repositories => [:show, :revisions, :revision]}, :read => true
|
2008-09-13 20:31:11 +04:00
|
|
|
map.permission :commit_access, {}
|
2012-02-05 14:56:27 +04:00
|
|
|
map.permission :manage_related_issues, {:repositories => [:add_related_issue, :remove_related_issue]}
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
map.project_module :boards do |map|
|
2011-12-02 01:14:09 +04:00
|
|
|
map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true
|
2014-01-11 16:27:01 +04:00
|
|
|
map.permission :add_messages, {:messages => [:new, :reply, :quote], :attachments => :upload}
|
|
|
|
map.permission :edit_messages, {:messages => :edit, :attachments => :upload}, :require => :member
|
|
|
|
map.permission :edit_own_messages, {:messages => :edit, :attachments => :upload}, :require => :loggedin
|
2007-11-24 15:25:07 +03:00
|
|
|
map.permission :delete_messages, {:messages => :destroy}, :require => :member
|
2008-11-11 18:07:55 +03:00
|
|
|
map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin
|
2007-09-14 15:34:08 +04:00
|
|
|
end
|
2010-08-22 22:42:00 +04:00
|
|
|
|
|
|
|
map.project_module :calendar do |map|
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_calendar, {:calendars => [:show, :update]}, :read => true
|
2010-08-22 22:42:00 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
map.project_module :gantt do |map|
|
2012-06-25 21:49:35 +04:00
|
|
|
map.permission :view_gantt, {:gantts => [:show, :update]}, :read => true
|
2010-08-22 22:42:00 +04:00
|
|
|
end
|
2007-08-29 20:52:35 +04:00
|
|
|
end
|
|
|
|
|
2008-02-12 20:58:46 +03:00
|
|
|
Redmine::MenuManager.map :top_menu do |menu|
|
2008-11-27 21:04:48 +03:00
|
|
|
menu.push :home, :home_path
|
|
|
|
menu.push :my_page, { :controller => 'my', :action => 'page' }, :if => Proc.new { User.current.logged? }
|
|
|
|
menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural
|
|
|
|
menu.push :administration, { :controller => 'admin', :action => 'index' }, :if => Proc.new { User.current.admin? }, :last => true
|
|
|
|
menu.push :help, Redmine::Info.help_url, :last => true
|
2008-02-12 20:58:46 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
Redmine::MenuManager.map :account_menu do |menu|
|
2008-11-27 21:04:48 +03:00
|
|
|
menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
|
2012-07-07 21:45:12 +04:00
|
|
|
menu.push :register, :register_path, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
2008-11-27 21:04:48 +03:00
|
|
|
menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
|
2013-01-30 21:34:48 +04:00
|
|
|
menu.push :logout, :signout_path, :html => {:method => 'post'}, :if => Proc.new { User.current.logged? }
|
2008-02-12 20:58:46 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
Redmine::MenuManager.map :application_menu do |menu|
|
|
|
|
# Empty
|
|
|
|
end
|
|
|
|
|
2008-11-11 21:10:21 +03:00
|
|
|
Redmine::MenuManager.map :admin_menu do |menu|
|
2010-08-04 04:38:22 +04:00
|
|
|
menu.push :projects, {:controller => 'admin', :action => 'projects'}, :caption => :label_project_plural
|
|
|
|
menu.push :users, {:controller => 'users'}, :caption => :label_user_plural
|
|
|
|
menu.push :groups, {:controller => 'groups'}, :caption => :label_group_plural
|
|
|
|
menu.push :roles, {:controller => 'roles'}, :caption => :label_role_and_permissions
|
|
|
|
menu.push :trackers, {:controller => 'trackers'}, :caption => :label_tracker_plural
|
|
|
|
menu.push :issue_statuses, {:controller => 'issue_statuses'}, :caption => :label_issue_status_plural,
|
|
|
|
:html => {:class => 'issue_statuses'}
|
|
|
|
menu.push :workflows, {:controller => 'workflows', :action => 'edit'}, :caption => :label_workflow
|
|
|
|
menu.push :custom_fields, {:controller => 'custom_fields'}, :caption => :label_custom_field_plural,
|
|
|
|
:html => {:class => 'custom_fields'}
|
|
|
|
menu.push :enumerations, {:controller => 'enumerations'}
|
|
|
|
menu.push :settings, {:controller => 'settings'}
|
2012-03-11 15:43:27 +04:00
|
|
|
menu.push :ldap_authentication, {:controller => 'auth_sources', :action => 'index'},
|
2010-08-04 04:38:22 +04:00
|
|
|
:html => {:class => 'server_authentication'}
|
|
|
|
menu.push :plugins, {:controller => 'admin', :action => 'plugins'}, :last => true
|
|
|
|
menu.push :info, {:controller => 'admin', :action => 'info'}, :caption => :label_information_plural, :last => true
|
2008-11-11 21:10:21 +03:00
|
|
|
end
|
|
|
|
|
2007-08-29 20:52:35 +04:00
|
|
|
Redmine::MenuManager.map :project_menu do |menu|
|
2008-02-12 20:58:46 +03:00
|
|
|
menu.push :overview, { :controller => 'projects', :action => 'show' }
|
2010-08-27 18:05:54 +04:00
|
|
|
menu.push :activity, { :controller => 'activities', :action => 'index' }
|
2010-08-30 19:30:28 +04:00
|
|
|
menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
|
2009-12-06 13:28:20 +03:00
|
|
|
:if => Proc.new { |p| p.shared_versions.any? }
|
2008-01-19 14:53:43 +03:00
|
|
|
menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
|
2012-12-22 01:17:21 +04:00
|
|
|
menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
|
2008-01-20 16:07:19 +03:00
|
|
|
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
|
2010-11-08 01:38:10 +03:00
|
|
|
menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
|
|
|
|
menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar
|
2008-01-19 14:53:43 +03:00
|
|
|
menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
|
|
|
|
menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
|
2010-10-27 20:27:06 +04:00
|
|
|
menu.push :wiki, { :controller => 'wiki', :action => 'show', :id => nil }, :param => :project_id,
|
2008-02-12 20:58:46 +03:00
|
|
|
:if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
|
2008-01-19 14:53:43 +03:00
|
|
|
menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
|
|
|
|
:if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
|
2010-09-14 20:24:07 +04:00
|
|
|
menu.push :files, { :controller => 'files', :action => 'index' }, :caption => :label_file_plural, :param => :project_id
|
2012-04-25 21:17:49 +04:00
|
|
|
menu.push :repository, { :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil },
|
2008-02-12 20:58:46 +03:00
|
|
|
:if => Proc.new { |p| p.repository && !p.repository.new_record? }
|
2008-07-13 16:12:58 +04:00
|
|
|
menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true
|
2007-08-29 20:52:35 +04:00
|
|
|
end
|
2008-07-27 21:54:09 +04:00
|
|
|
|
|
|
|
Redmine::Activity.map do |activity|
|
|
|
|
activity.register :issues, :class_name => %w(Issue Journal)
|
|
|
|
activity.register :changesets
|
|
|
|
activity.register :news
|
|
|
|
activity.register :documents, :class_name => %w(Document Attachment)
|
|
|
|
activity.register :files, :class_name => 'Attachment'
|
2008-09-13 20:45:01 +04:00
|
|
|
activity.register :wiki_edits, :class_name => 'WikiContent::Version', :default => false
|
2008-07-27 21:54:09 +04:00
|
|
|
activity.register :messages, :default => false
|
2009-09-12 14:37:49 +04:00
|
|
|
activity.register :time_entries, :default => false
|
2008-07-27 21:54:09 +04:00
|
|
|
end
|
2008-10-27 14:08:29 +03:00
|
|
|
|
2010-02-17 23:05:51 +03:00
|
|
|
Redmine::Search.map do |search|
|
|
|
|
search.register :issues
|
|
|
|
search.register :news
|
|
|
|
search.register :documents
|
|
|
|
search.register :changesets
|
|
|
|
search.register :wiki_pages
|
|
|
|
search.register :messages
|
|
|
|
search.register :projects
|
|
|
|
end
|
|
|
|
|
2008-10-27 14:08:29 +03:00
|
|
|
Redmine::WikiFormatting.map do |format|
|
|
|
|
format.register :textile, Redmine::WikiFormatting::Textile::Formatter, Redmine::WikiFormatting::Textile::Helper
|
2013-12-23 21:07:51 +04:00
|
|
|
if Object.const_defined?(:Redcarpet)
|
|
|
|
format.register :markdown, Redmine::WikiFormatting::Markdown::Formatter, Redmine::WikiFormatting::Markdown::Helper,
|
|
|
|
:label => 'Markdown (experimental)'
|
|
|
|
end
|
2008-10-27 14:08:29 +03:00
|
|
|
end
|
2010-12-03 14:25:21 +03:00
|
|
|
|
2010-12-04 20:43:39 +03:00
|
|
|
ActionView::Template.register_template_handler :rsb, Redmine::Views::ApiTemplateHandler
|