Skip to content

Commit

Permalink
Replace staging workflow delete button with link
Browse files Browse the repository at this point in the history
because the Button did not really fit in. Furthermore it uses now the delete icon
from our pattern library. Additionally it is moved now to the bottom of the page.
  • Loading branch information
ChrisBr committed Nov 13, 2018
1 parent 4f1268f commit 0b7fc47
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
%button.btn.btn-danger{ data: { toggle: 'modal', target: '#delete-staging-workflow' } }
Delete Staging Workflow

.modal.fade{ id: 'delete-staging-workflow', tabindex: -1, role: 'dialog' }
.modal-dialog.modal-dialog-centered{ role: 'document' }
.modal-content
Expand Down
18 changes: 11 additions & 7 deletions src/api/app/views/webui2/webui/staging/workflows/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
.card-body
%h3= @pagetitle

%ul.list-inline
%li.list-inline-item
= link_to(edit_staging_workflow_path(@staging_workflow), class: 'nav-link') do
%i.fas.fa-edit.text-info
Edit Staging Workflow
- if policy(@staging_workflow).destroy?
= render(partial: 'webui2/webui/staging/workflows/delete', locals: { project: @project })
%hr

%table.table.table-striped.table-bordered.table-sm.dt-responsive.w-100#staging-projects-datatable
Expand All @@ -32,6 +25,17 @@
= render partial: 'packages_list', locals: { project: staging_project }
%td.broken-packages
= render partial: 'problems', locals: { project: staging_project }

%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,
Expand Down

0 comments on commit 0b7fc47

Please sign in to comment.