-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6275 from mdeniz/staging_workflow/staging_manager…
…s_group Staging workflow managers group
- Loading branch information
Showing
24 changed files
with
268 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/api/app/views/webui2/webui/staging/workflows/_breadcrumb_items.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
= render partial: 'webui/project/breadcrumb_items' | ||
- if controller_name == 'workflows' && action_name == 'show' | ||
%li.breadcrumb-item.active{ 'aria-current' => 'page' } | ||
Staging Projects | ||
Staging | ||
- elsif controller_name == 'workflows' && action_name == 'new' | ||
%li.breadcrumb-item.active{ 'aria-current' => 'page' } | ||
Create Staging Projects | ||
- else | ||
%li.breadcrumb-item | ||
= link_to 'Staging Projects', staging_workflow_path(@staging_workflow) | ||
= link_to 'Staging', staging_workflow_path(@staging_workflow) | ||
- if controller_name == 'workflows' && action_name == 'edit' | ||
%li.breadcrumb-item.active{ 'aria-current' => 'page' } | ||
Edit | ||
Configure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/api/app/views/webui2/webui/staging/workflows/_staging_managers_group.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
- actual_group = staging_workflow.managers_group ? staging_workflow.managers_group.title : 'None assigned' | ||
.modal.fade#staging-managers-group-modal{ tabindex: -1, role: 'dialog', aria: { labelledby: 'staging-managers-group-modal-label', hidden: true } } | ||
.modal-dialog.modal-dialog-centered{ role: 'document' } | ||
.modal-content | ||
= form_tag(staging_workflow_path(staging_workflow), method: :put) do | ||
.modal-header | ||
%h5.modal-title#staging-managers-group-modal-label Assign other group | ||
.modal-body | ||
.form-group#assign-managers-group-modal-input | ||
.mb-4 | ||
Assigned group is: | ||
%strong= actual_group | ||
|
||
= label_tag(:managers_title, 'Replace the group with:') | ||
.input-group | ||
.input-group-prepend | ||
%span.input-group-text#assign-managers-group-search-icon | ||
%i.fa.fa-search | ||
%i.fas.fa-spinner.fa-spin.d-none | ||
= text_field_tag 'managers_title', '', required: true, placeholder: 'Type to autocomplete...', class: 'form-control', | ||
data: { autocomplete_groups_url: url_for(controller: '/webui/groups', action: 'autocomplete') } | ||
|
||
.modal-footer | ||
= render partial: 'webui2/shared/dialog_action_buttons' | ||
|
||
- content_for :ready_function do | ||
autocompleteStagingManagersGroup(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 11 additions & 5 deletions
16
src/api/app/views/webui2/webui/staging/workflows/edit.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
- @pagetitle = "Edit Staging Workflow for #{@project}" | ||
- @pagetitle = "Configure Staging for #{@project}" | ||
|
||
.row | ||
.col-xl-12 | ||
.card.mb-3 | ||
= render(partial: 'webui2/webui/project/tabs', locals: { project: @project }) | ||
.card-body | ||
%h3= @pagetitle | ||
%ul.list-inline.mb-0 | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#create-staging-projects-modal' }) do | ||
%i.fas.fa-plus-circle.text-success | ||
Create Project | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#staging-managers-group-modal' }) do | ||
%i.fas.fa-users.text-warning | ||
Managers | ||
|
||
= render(partial: 'staging_projects_table', | ||
locals: { staging_workflow: @staging_workflow, staging_projects: @staging_projects, display_actions_column: true }) | ||
|
||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#create-staging-projects-modal' }) do | ||
%i.fas.fa-plus-circle.text-success | ||
Create Staging Project | ||
|
||
= render partial: 'create_staging_project', locals: { staging_workflow: @staging_workflow } | ||
= render partial: 'staging_managers_group', locals: { staging_workflow: @staging_workflow } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
src/api/app/views/webui2/webui/staging/workflows/show.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
- @pagetitle = "Staging Projects for #{@project}" | ||
- @pagetitle = "Staging for #{@project}" | ||
|
||
.row | ||
.col-xl-10 | ||
.card.mb-3 | ||
= render(partial: 'webui2/webui/project/tabs', locals: { project: @project }) | ||
.card-body | ||
%h3= @pagetitle | ||
|
||
%hr | ||
%ul.list-inline.mb-0 | ||
- if policy(@staging_workflow).update? | ||
%li.list-inline-item | ||
= link_to(edit_staging_workflow_path(@staging_workflow), class: 'nav-link') do | ||
%i.fas.fa-edit.text-info | ||
Configure | ||
- if policy(@staging_workflow).destroy? | ||
%li.list-inline-item | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#delete-staging-workflow' }) do | ||
%i.fas.fa-times-circle.text-danger | ||
Delete | ||
= render(partial: 'delete', locals: { project: @project }) | ||
|
||
= render(partial: 'staging_projects_table', | ||
locals: { staging_workflow: @staging_workflow, staging_projects: @staging_projects, display_actions_column: false }) | ||
|
||
%ul.list-inline | ||
%li.list-inline-item | ||
= link_to(edit_staging_workflow_path(@staging_workflow)) do | ||
%i.fas.fa-edit.text-info | ||
Edit | ||
- if policy(@staging_workflow).destroy? | ||
%a{ data: { toggle: 'modal', target: '#delete-staging-workflow' }, href: '#' } | ||
%i.fas.fa-times-circle.text-danger | ||
Delete | ||
= render(partial: 'webui2/webui/staging/workflows/delete', locals: { project: @project }) | ||
.col-xl-2 | ||
= render partial: 'legend' | ||
= render partial: 'infos', locals: { staging_workflow: @staging_workflow, empty_projects: @empty_projects, | ||
unassigned_requests: @unassigned_requests, more_unassigned_requests: @more_unassigned_requests, | ||
ready_requests: @ready_requests, more_ready_requests: @more_ready_requests, | ||
ignored_requests: @ignored_requests, more_ignored_requests: @more_ignored_requests, | ||
project: @project } | ||
project: @project, managers: @managers } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/api/db/migrate/20181113095753_add_staging_managers_group.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class AddStagingManagersGroup < ActiveRecord::Migration[5.2] | ||
def change | ||
change_table :staging_workflows do |t| | ||
t.references :managers_group, index: true, type: :integer | ||
end | ||
end | ||
end |
Oops, something went wrong.