Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2019 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -26,11 +28,9 @@ Rails.application.routes.draw do
|
|||
get 'account/activation_email', :to => 'account#activation_email', :as => 'activation_email'
|
||||
|
||||
match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put, :patch]
|
||||
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put, :patch]
|
||||
match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put, :patch]
|
||||
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put, :patch]
|
||||
match '/preview/text', :to => 'previews#text', :as => 'preview_text', :via => [:get, :post, :put, :patch]
|
||||
|
||||
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
|
||||
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
||||
|
||||
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
|
||||
|
@ -64,14 +64,15 @@ Rails.application.routes.draw do
|
|||
get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report'
|
||||
get 'projects/:id/issues/report/:detail', :to => 'reports#issue_report_details', :as => 'project_issues_report_details'
|
||||
|
||||
get '/issues/imports/new', :to => 'imports#new', :as => 'new_issues_import'
|
||||
get '/issues/imports/new', :to => 'imports#new', :defaults => { :type => 'IssueImport' }, :as => 'new_issues_import'
|
||||
get '/time_entries/imports/new', :to => 'imports#new', :defaults => { :type => 'TimeEntryImport' }, :as => 'new_time_entries_import'
|
||||
post '/imports', :to => 'imports#create', :as => 'imports'
|
||||
get '/imports/:id', :to => 'imports#show', :as => 'import'
|
||||
match '/imports/:id/settings', :to => 'imports#settings', :via => [:get, :post], :as => 'import_settings'
|
||||
match '/imports/:id/mapping', :to => 'imports#mapping', :via => [:get, :post], :as => 'import_mapping'
|
||||
match '/imports/:id/run', :to => 'imports#run', :via => [:get, :post], :as => 'import_run'
|
||||
|
||||
match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :post]
|
||||
match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :put]
|
||||
match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post]
|
||||
match 'my/page', :controller => 'my', :action => 'page', :via => :get
|
||||
post 'my/page', :to => 'my#update_page'
|
||||
|
@ -107,12 +108,12 @@ Rails.application.routes.draw do
|
|||
|
||||
member do
|
||||
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
|
||||
post 'modules'
|
||||
post 'archive'
|
||||
post 'unarchive'
|
||||
post 'close'
|
||||
post 'reopen'
|
||||
match 'copy', :via => [:get, :post]
|
||||
match 'bookmark', :via => [:delete, :post]
|
||||
end
|
||||
|
||||
shallow do
|
||||
|
@ -158,7 +159,7 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get
|
||||
resources :wiki, :except => [:index, :create], :as => 'wiki_page' do
|
||||
member do
|
||||
|
@ -187,6 +188,7 @@ Rails.application.routes.draw do
|
|||
member do
|
||||
# Used when updating the form of an existing issue
|
||||
patch 'edit', :to => 'issues#edit'
|
||||
get 'tab/:name', :action => 'issue_tab', :as => 'tab'
|
||||
end
|
||||
collection do
|
||||
match 'bulk_edit', :via => [:get, :post]
|
||||
|
@ -234,6 +236,8 @@ Rails.application.routes.draw do
|
|||
match '/time_entries/destroy', :to => 'timelog#destroy', :via => :delete
|
||||
# Used to update the new time entry form
|
||||
post '/time_entries/new', :to => 'timelog#new'
|
||||
# Used to update the bulk edit time entry form
|
||||
post '/time_entries/bulk_edit', :to => 'timelog#bulk_edit'
|
||||
|
||||
get 'projects/:id/activity', :to => 'activities#index', :as => :project_activity
|
||||
get 'activity', :to => 'activities#index'
|
||||
|
@ -242,63 +246,43 @@ Rails.application.routes.draw do
|
|||
get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats'
|
||||
get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph'
|
||||
|
||||
get 'projects/:id/repository/:repository_id/changes(/*path)',
|
||||
:to => 'repositories#changes',
|
||||
:format => false
|
||||
|
||||
get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision'
|
||||
get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision'
|
||||
post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue'
|
||||
delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
|
||||
get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
|
||||
%w(browse show entry raw annotate diff).each do |action|
|
||||
%w(browse show entry raw annotate).each do |action|
|
||||
get "projects/:id/repository/:repository_id/revisions/:rev/#{action}(/*path)",
|
||||
:controller => 'repositories',
|
||||
:action => action,
|
||||
:format => false,
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/}
|
||||
:format => 'html',
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
|
||||
end
|
||||
|
||||
get 'projects/:id/repository/statistics', :to => 'repositories#stats'
|
||||
get 'projects/:id/repository/graph', :to => 'repositories#graph'
|
||||
|
||||
get 'projects/:id/repository/changes(/*path)',
|
||||
:to => 'repositories#changes',
|
||||
:format => false
|
||||
|
||||
get 'projects/:id/repository/revisions', :to => 'repositories#revisions'
|
||||
get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision'
|
||||
get 'projects/:id/repository/revision', :to => 'repositories#revision'
|
||||
post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue'
|
||||
delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
|
||||
%w(browse show entry raw annotate diff).each do |action|
|
||||
get "projects/:id/repository/revisions/:rev/#{action}(/*path)",
|
||||
:controller => 'repositories',
|
||||
:action => action,
|
||||
:format => false,
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/}
|
||||
end
|
||||
%w(browse entry raw changes annotate diff).each do |action|
|
||||
%w(browse entry raw changes annotate).each do |action|
|
||||
get "projects/:id/repository/:repository_id/#{action}(/*path)",
|
||||
:controller => 'repositories',
|
||||
:action => action,
|
||||
:format => false
|
||||
end
|
||||
%w(browse entry raw changes annotate diff).each do |action|
|
||||
get "projects/:id/repository/#{action}(/*path)",
|
||||
:controller => 'repositories',
|
||||
:action => action,
|
||||
:format => false
|
||||
:format => 'html',
|
||||
:constraints => {:path => /.*/}
|
||||
end
|
||||
|
||||
get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => false
|
||||
get 'projects/:id/repository/show/*path', :to => 'repositories#show', :format => false
|
||||
get "projects/:id/repository/:repository_id/revisions/:rev/diff(/*path)",
|
||||
:to => 'repositories#diff',
|
||||
:format => false,
|
||||
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
|
||||
get "projects/:id/repository/:repository_id/diff(/*path)",
|
||||
:to => 'repositories#diff',
|
||||
:format => false,
|
||||
:constraints => {:path => /.*/}
|
||||
|
||||
get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/}
|
||||
|
||||
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
||||
get 'projects/:id/repository', :to => 'repositories#show', :path => nil
|
||||
|
||||
# additional routes for having the file name at the end of url
|
||||
get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment'
|
||||
get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment', :format => 'html'
|
||||
get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment'
|
||||
get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/
|
||||
get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail'
|
||||
|
@ -333,7 +317,8 @@ Rails.application.routes.draw do
|
|||
end
|
||||
resources :roles do
|
||||
collection do
|
||||
match 'permissions', :via => [:get, :post]
|
||||
get 'permissions'
|
||||
post 'permissions', :to => 'roles#update_permissions'
|
||||
end
|
||||
end
|
||||
resources :enumerations, :except => :show
|
||||
|
@ -376,14 +361,14 @@ Rails.application.routes.draw do
|
|||
|
||||
match 'uploads', :to => 'attachments#upload', :via => :post
|
||||
|
||||
get 'robots.txt', :to => 'welcome#robots'
|
||||
get 'robots', :to => 'welcome#robots'
|
||||
|
||||
Dir.glob File.expand_path("#{Redmine::Plugin.directory}/*") do |plugin_dir|
|
||||
file = File.join(plugin_dir, "config/routes.rb")
|
||||
if File.exists?(file)
|
||||
begin
|
||||
instance_eval File.read(file)
|
||||
rescue Exception => e
|
||||
rescue SyntaxError, StandardError => e
|
||||
puts "An error occurred while loading the routes definition of #{File.basename(plugin_dir)} plugin (#{file}): #{e.message}."
|
||||
exit 1
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue