##// END OF EJS Templates
Upgraded to Rails 2.3.4 (#3597)...
Upgraded to Rails 2.3.4 (#3597) * Ran the Rails upgrade * Upgraded to Rails Engines 2.3.2 * Added a plugin to let Engines override application views. * Converted tests to use the new classes: ** ActionController::TestCase for functional ** ActiveSupport::TestCase for units * Converted ActiveRecord::Error message to a string. * ActiveRecord grouping returns an ordered hash which doesn't have #sort! * Updated the I18n storage_units format. * Added some default initializers from a fresh rails app * Changed the order of check_box_tags and hidden_field_tags. The hidden tag needs to appear first in Rails 2.3, otherwise it will override any value in the check_box_tag. * Removed the custom handler for when the cookie store is tampered with. Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not load the data from it when it's been tampered with (e.g. no user login). * Fixed mail layouts, 2.3 has problems with implicit multipart emails that use layouts. Also removed some custom Redmine mailer code. * Fixed a bug that occurred in tests where the "required" span tag would be added to the :field_status translation. This resulted in an email string of: <li>Status<span class="required"> *</span><span class="required"> *</span> Instead of: <li>Status: New</li> git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2763:8faa66f68fb2
r2773:7b0cb6aba871
Show More
redmine.rb
165 lines | 8.8 KiB | text/x-ruby | RubyLexer
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 require 'redmine/access_control'
require 'redmine/menu_manager'
Jean-Philippe Lang
Activity refactoring....
r1692 require 'redmine/activity'
Jean-Philippe Lang
Text files can now be viewed online when browsing the repository....
r518 require 'redmine/mime_type'
Jean-Philippe Lang
Estimated time recognizes improved time formats (#1092)....
r1346 require 'redmine/core_ext'
Jean-Philippe Lang
Added basic Theme support....
r807 require 'redmine/themes'
Jean-Philippe Lang
Merged hooks branch @ r1785 into trunk....
r1785 require 'redmine/hook'
Jean-Philippe Lang
Basic plugin support....
r741 require 'redmine/plugin'
Jean-Philippe Lang
Makes wiki text formatter pluggable....
r1953 require 'redmine/wiki_formatting'
Jean-Philippe Lang
Added basic support for CVS and Mercurial SCMs....
r556
Jean-Philippe Lang
Gantt chart can now be exported to a graphic file (png)....
r660 begin
Jean-Philippe Lang
Fixed: RMagick not loaded on case sensitive filesystems....
r730 require_library_or_gem 'RMagick' unless Object.const_defined?(:Magick)
Jean-Philippe Lang
Gantt chart can now be exported to a graphic file (png)....
r660 rescue LoadError
# RMagick is not available
end
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 REDMINE_SUPPORTED_SCM = %w( Subversion Darcs Mercurial Cvs Bazaar Git Filesystem )
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663
# Permissions
Redmine::AccessControl.map do |map|
Jean-Philippe Lang
Removed ProjectsController#feeds. This view was incomplete and inconsistent with permissions....
r776 map.permission :view_project, {:projects => [:show, :activity]}, :public => true
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 map.permission :search_project, {:search => :index}, :public => true
Jean-Philippe Lang
Ability to allow non-admin users to create projects (#1007)....
r2651 map.permission :add_project, {:projects => :add}, :require => :loggedin
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 map.permission :select_project_modules, {:projects => :modules}, :require => :member
Jean-Philippe Lang
User groups branch merged....
r2755 map.permission :manage_members, {:projects => :settings, :members => [:new, :edit, :destroy, :autocomplete_for_member]}, :require => :member
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 map.permission :manage_versions, {:projects => [:settings, :add_version], :versions => [:edit, :destroy]}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 map.project_module :issue_tracking do |map|
# Issue categories
map.permission :manage_categories, {:projects => [:settings, :add_issue_category], :issue_categories => [:edit, :destroy]}, :require => :member
# Issues
Jean-Philippe Lang
ProjectsController#list_issues, #export_issues_csv and #export_issues_pdf merged into IssuesController#index...
r874 map.permission :view_issues, {:projects => [:changelog, :roadmap],
:issues => [:index, :changes, :show, :context_menu],
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 :versions => [:show, :status_by],
Jean-Philippe Lang
Added project module concept....
r714 :queries => :index,
:reports => :issue_report}, :public => true
Jean-Philippe Lang
ProjectsController#add_issue moved to IssuesController#new....
r1066 map.permission :add_issues, {:issues => :new}
Jean-Philippe Lang
AttachmentsController now handles attachments deletion....
r2114 map.permission :edit_issues, {:issues => [:edit, :reply, :bulk_edit]}
Jean-Philippe Lang
Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums....
r906 map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}
Jean-Philippe Lang
Adds a Reply link to each issue note (#739). Reply is pre-filled with the quoted note....
r1466 map.permission :add_issue_notes, {:issues => [:edit, :reply]}
Jean-Philippe Lang
Added the following permissions (#527, #585, #627):...
r1138 map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
Jean-Philippe Lang
Issue list now supports bulk edit/move/delete (#563, #607). For now, issues from different projects can not be bulk edited/moved/deleted at once....
r1116 map.permission :move_issues, {:issues => :move}, :require => :loggedin
Jean-Philippe Lang
Added project module concept....
r714 map.permission :delete_issues, {:issues => :destroy}, :require => :member
# Queries
Jean-Philippe Lang
Fixed: Manage pu(b)lic queries typo (Thomas Lecavelier)....
r767 map.permission :manage_public_queries, {:queries => [:new, :edit, :destroy]}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin
# Gantt & calendar
Jean-Philippe Lang
Adds support for free ticket filtering and custom queries on Gantt chart....
r1795 map.permission :view_gantt, :issues => :gantt
Jean-Philippe Lang
Adds support for free ticket filtering and custom queries on Calendar....
r1796 map.permission :view_calendar, :issues => :calendar
Jean-Philippe Lang
Adds permissions for viewing the watcher list and adding new watchers on the issue detail view (#398)....
r1711 # Watchers
map.permission :view_issue_watchers, {}
map.permission :add_issue_watchers, {:watchers => :new}
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :time_tracking do |map|
map.permission :log_time, {:timelog => :edit}, :require => :loggedin
map.permission :view_time_entries, :timelog => [:details, :report]
Jean-Philippe Lang
Adds 2 permissions (closes #859):...
r1235 map.permission :edit_time_entries, {:timelog => [:edit, :destroy]}, :require => :member
map.permission :edit_own_time_entries, {:timelog => [:edit, :destroy]}, :require => :loggedin
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :news do |map|
Jean-Philippe Lang
ProjectsController#add_news moved to NewsController#new....
r1097 map.permission :manage_news, {:news => [:new, :edit, :destroy, :destroy_comment]}, :require => :member
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 map.permission :view_news, {:news => [:index, :show]}, :public => true
Jean-Philippe Lang
Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums....
r906 map.permission :comment_news, {:news => :add_comment}
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :documents do |map|
Jean-Philippe Lang
AttachmentsController now handles attachments deletion....
r2114 map.permission :manage_documents, {:documents => [:new, :edit, :destroy, :add_attachment]}, :require => :loggedin
Jean-Philippe Lang
Moved ProjectsController#list_documents and add_document to DocumentsController#index and new....
r998 map.permission :view_documents, :documents => [:index, :show, :download]
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :files do |map|
Jean-Philippe Lang
AttachmentsController now handles attachments deletion....
r2114 map.permission :manage_files, {:projects => :add_file}, :require => :loggedin
Jean-Philippe Lang
Added project module concept....
r714 map.permission :view_files, :projects => :list_files, :versions => :download
end
map.project_module :wiki do |map|
map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
map.permission :delete_wiki_pages, {:wiki => :destroy}, :require => :member
Jean-Philippe Lang
Adds a permission 'view wiki edits' so that wiki history can be hidden to certain users (#1154)....
r1813 map.permission :view_wiki_pages, :wiki => [:index, :special]
map.permission :view_wiki_edits, :wiki => [:history, :diff, :annotate]
Jean-Philippe Lang
Adds 'Delete wiki pages attachments' permission....
r1936 map.permission :edit_wiki_pages, :wiki => [:edit, :preview, :add_attachment]
Jean-Philippe Lang
AttachmentsController now handles attachments deletion....
r2114 map.permission :delete_wiki_pages_attachments, {}
Jean-Philippe Lang
Wiki page protection (#851, patch #1146 by Mateo Murphy with slight changes)....
r1400 map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :repository do |map|
Jean-Philippe Lang
Maps repository users to Redmine users (#1383)....
r2004 map.permission :manage_repository, {:repositories => [:edit, :committers, :destroy]}, :require => :member
Jean-Philippe Lang
Added Annotate/Blame view for Subversion, CVS and Mercurial repositories....
r934 map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph]
Jean-Philippe Lang
Added project module concept....
r714 map.permission :view_changesets, :repositories => [:show, :revisions, :revision]
Jean-Philippe Lang
Merged nbc branch @ r1812 (commit access permission and reposman improvements)....
r1812 map.permission :commit_access, {}
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :boards do |map|
map.permission :manage_boards, {:boards => [:new, :edit, :destroy]}, :require => :member
map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true
Jean-Philippe Lang
Adds posts quoting functionality (#1825)....
r1771 map.permission :add_messages, {:messages => [:new, :reply, :quote]}
Jean-Philippe Lang
Forums enhancements:...
r913 map.permission :edit_messages, {:messages => :edit}, :require => :member
Jean-Philippe Lang
Adds permissions to let users edit and/or delete their messages (#854, patch by Markus Knittig with slight changes)....
r2017 map.permission :edit_own_messages, {:messages => :edit}, :require => :loggedin
Jean-Philippe Lang
Forums enhancements:...
r913 map.permission :delete_messages, {:messages => :destroy}, :require => :member
Jean-Philippe Lang
Adds permissions to let users edit and/or delete their messages (#854, patch by Markus Knittig with slight changes)....
r2017 map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin
Jean-Philippe Lang
Added project module concept....
r714 end
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 end
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 Redmine::MenuManager.map :top_menu do |menu|
Jean-Philippe Lang
Adds a css class on menu items in order to apply item specific styles (eg. icons)....
r2057 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
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 end
Redmine::MenuManager.map :account_menu do |menu|
Jean-Philippe Lang
Adds a css class on menu items in order to apply item specific styles (eg. icons)....
r2057 menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
menu.push :register, { :controller => 'account', :action => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
menu.push :logout, :signout_path, :if => Proc.new { User.current.logged? }
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 end
Redmine::MenuManager.map :application_menu do |menu|
# Empty
end
Jean-Philippe Lang
Pluggable admin menu (patch #2031 by Yuki Sonoda with slight changes)....
r2020 Redmine::MenuManager.map :admin_menu do |menu|
# Empty
end
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 Redmine::MenuManager.map :project_menu do |menu|
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 menu.push :overview, { :controller => 'projects', :action => 'show' }
menu.push :activity, { :controller => 'projects', :action => 'activity' }
Jean-Philippe Lang
Do not show Roadmap menu item if the project doesn't define any versions....
r1093 menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' },
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 :if => Proc.new { |p| p.versions.any? }
Jean-Philippe Lang
Highlight the current item of the main menu....
r1062 menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
Jean-Philippe Lang
Added a 'New issue' link in the main menu (accesskey 7)....
r1067 menu.push :new_issue, { :controller => 'issues', :action => 'new' }, :param => :project_id, :caption => :label_issue_new,
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
Jean-Philippe Lang
Highlight the current item of the main menu....
r1062 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
menu.push :wiki, { :controller => 'wiki', :action => 'index', :page => nil },
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 :if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
Jean-Philippe Lang
Highlight the current item of the main menu....
r1062 menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
:if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
menu.push :files, { :controller => 'projects', :action => 'list_files' }, :caption => :label_attachment_plural
menu.push :repository, { :controller => 'repositories', :action => 'show' },
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 :if => Proc.new { |p| p.repository && !p.repository.new_record? }
Jean-Philippe Lang
Menu mapper: add support for :before, :after and :last options to #push method and add #delete method....
r1646 menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 end
Jean-Philippe Lang
Activity refactoring....
r1692
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'
Jean-Philippe Lang
Adds a permission 'view wiki edits' so that wiki history can be hidden to certain users (#1154)....
r1813 activity.register :wiki_edits, :class_name => 'WikiContent::Version', :default => false
Jean-Philippe Lang
Activity refactoring....
r1692 activity.register :messages, :default => false
Jean-Philippe Lang
Adds spent time to the activity view (#3809)....
r2763 activity.register :time_entries, :default => false
Jean-Philippe Lang
Activity refactoring....
r1692 end
Jean-Philippe Lang
Makes wiki text formatter pluggable....
r1953
Redmine::WikiFormatting.map do |format|
format.register :textile, Redmine::WikiFormatting::Textile::Formatter, Redmine::WikiFormatting::Textile::Helper
end