#-- copyright # OpenProject My Project Page Plugin # # Copyright (C) 2011-2014 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # 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. # # See doc/COPYRIGHT.md for more details. #++ # re-write OpenProject::Application.routes.draw do # replace the standard overview-page with the my-project-page # careful: do not over-match the reserved path like /projects/new or /projects/level_list, see http://rubular.com/r/1uoiXyApCB get 'projects/:id', to: "my_projects_overviews#index" , constraints: {id: Regexp.new("(?!(#{Project::RESERVED_IDENTIFIERS.join('|')})$)(\\w|-)+") } get 'my_projects_overview/:id/page_layout', to: "my_projects_overviews#page_layout" post 'my_projects_overview/:id/page_layout/order_blocks', to: "my_projects_overviews#order_blocks" post 'my_projects_overview/:id/page_layout/remove_block', to: "my_projects_overviews#remove_block" post 'my_projects_overview/:id/page_layout/add_block', to: "my_projects_overviews#add_block" put 'my_projects_overview/:id/page_layout/update_custom_element', to: "my_projects_overviews#update_custom_element" post 'my_projects_overview/:id/page_layout/destroy_attachment', to: "my_projects_overviews#destroy_attachment" post 'my_projects_overview/:id/page_layout/show_all_members', to: "my_projects_overviews#show_all_members" end