Skip to content

Commit

Permalink
Merge pull request #13897 from eduardoj/feature/support_action_add_role
Browse files Browse the repository at this point in the history
Show Add Role request actions in the multi action dropdown
  • Loading branch information
eduardoj committed Feb 28, 2023
2 parents da2eb97 + bb1abf9 commit 5e197a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions src/api/app/views/webui/request/_action_text.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,20 @@
- else
%p.mt-0.mb-0.fw-normal
%span.me-2 ##{action_index + 1}
= action.name
- if action.type == 'add_role'
#{action.type.titleize} for
= project_or_package_text(action.target_project, action.target_package)
- else
= action.name
-# add_role, delete and set_bugowner are actions on the target repo, so they don't need to mention where they are coming from
- unless %w[add_role delete set_bugowner].include?(action.type)
- unless %w[delete set_bugowner].include?(action.type)
%p.mb-0.mt-0.small
from
= action.source_project
- if action.source_package
\/
= action.source_package
- if action.type == 'add_role'
#{action.person_name} as #{action.role} for
= project_or_package_text(action.target_project, action.target_package)
- else
from
= project_or_package_text(action.source_project, action.source_package)
- if details
%p.mb-0.mt-0.small
by
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui/request/_actions_details.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:ruby
submit_actions = bs_request.bs_request_actions.where(type: 'submit')
submit_actions = bs_request.bs_request_actions.where(type: [:add_role, :submit])
submit_actions_count = submit_actions.count

- if submit_actions_count > 1
Expand Down

0 comments on commit 5e197a7

Please sign in to comment.