Skip to content

Commit

Permalink
Merge pull request #191 from bmic-development/kg-modify_request_catal…
Browse files Browse the repository at this point in the history
…og_overlord

KG - Enable Modify Request Button for Catalog Overlords
  • Loading branch information
Stuart-Johnson committed Apr 6, 2017
2 parents 87888c3 + 3397437 commit 361fc89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -22,7 +22,8 @@
%h4.panel-title.pull-left
= protocol_panel_header_line(service_request)
.pull-right
- if permission_to_edit || user.catalog_overlord
- permission_to_edit = permission_to_edit || user.catalog_overlord
- if permission_to_edit
%button.btn.btn-warning.btn-sm.edit-service-request{ class: permission_to_edit ? '' : 'disabled', type: 'button', data: { permission: permission_to_edit.to_s, url: modify_request_button_url(service_request) } }
= t(:dashboard)[:service_requests][:modify_request]
= link_to t(:dashboard)[:protocols][:service_requests][:coverage_report], service_request_path(service_request, format: :xlsx), class: 'btn btn-sm btn-success'
Expand Down
Expand Up @@ -103,7 +103,7 @@ def render_protocol_service_request_show(service_request, permission_to_edit=fal

render_protocol_service_request_show(service_request, true)

expect(response).to have_selector('button', text: 'Modify Request')
expect(response).to have_selector('button:not(.disabled)', text: 'Modify Request')
end
end

Expand All @@ -123,7 +123,7 @@ def render_protocol_service_request_show(service_request, permission_to_edit=fal

render_protocol_service_request_show(service_request, true)

expect(response).to have_selector('button', text: 'Modify Request')
expect(response).to have_selector('button:not(.disabled)', text: 'Modify Request')
end
end
end
Expand Down

0 comments on commit 361fc89

Please sign in to comment.