mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Rename projects_controller#menu to #list_row_menu
This commit is contained in:
@@ -289,7 +289,7 @@ module Projects
|
||||
# Subclasses can override inline `menu_items` or `menu_href` in order to control
|
||||
# what is displayed in the action menu.
|
||||
def menu_items = nil
|
||||
def menu_href = menu_project_path(project, status: params[:status])
|
||||
def menu_href = list_row_menu_project_path(project, status: params[:status])
|
||||
|
||||
def action_menu(src: nil, items: nil)
|
||||
raise ArgumentError, "provide either src: or items:, not both" if src && items
|
||||
|
||||
@@ -34,19 +34,19 @@ class ProjectsController < ApplicationController
|
||||
menu_item :overview
|
||||
menu_item :roadmap, only: :roadmap
|
||||
|
||||
before_action :find_project, except: %i[index new create menu destroy destroy_info]
|
||||
before_action :find_project_including_archived, only: %i[menu destroy destroy_info]
|
||||
before_action :find_project, except: %i[index new create list_row_menu destroy destroy_info]
|
||||
before_action :find_project_including_archived, only: %i[list_row_menu destroy destroy_info]
|
||||
before_action :load_query_or_deny_access, only: %i[index]
|
||||
before_action :authorize,
|
||||
only: %i[copy_form copy deactivate_work_package_attachments export_project_initiation_pdf]
|
||||
before_action :authorize_global, only: %i[new create]
|
||||
before_action :require_admin, only: %i[destroy destroy_info]
|
||||
before_action :require_admin_or_active_project, only: :menu
|
||||
before_action :require_admin_or_active_project, only: :list_row_menu
|
||||
before_action :find_optional_parent, only: :new
|
||||
before_action :find_optional_template, only: %i[new create]
|
||||
|
||||
no_authorization_required! :index
|
||||
authorization_checked! :menu
|
||||
authorization_checked! :list_row_menu
|
||||
|
||||
include SortHelper
|
||||
include PaginationHelper
|
||||
@@ -97,7 +97,7 @@ class ProjectsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def menu
|
||||
def list_row_menu
|
||||
render Projects::RowActionsComponent.new(project: @project, params:), layout: false
|
||||
end
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ Rails.application.reloader.to_prepare do
|
||||
require: :loggedin
|
||||
|
||||
map.permission :view_project,
|
||||
{ projects: %i[show menu] },
|
||||
{ projects: %i[show list_row_menu] },
|
||||
permissible_on: :project,
|
||||
public: true
|
||||
|
||||
|
||||
+1
-1
@@ -401,7 +401,7 @@ Rails.application.routes.draw do
|
||||
|
||||
get "export_project_initiation", to: "projects#export_project_initiation_pdf"
|
||||
|
||||
get :menu
|
||||
get :list_row_menu
|
||||
|
||||
get :copy, to: "projects#copy_form"
|
||||
post :copy
|
||||
|
||||
Reference in New Issue
Block a user