Commit 0168a240 authored by Lin Jen-Shin's avatar Lin Jen-Shin Committed by James Edwards-Jones

Only show the message if user is not the owner

Closes #323
parent caedc996
- if can?(current_user, :remove_pages, @project) && @project.pages_deployed? - if can?(current_user, :remove_pages, @project)
.panel.panel-default.panel.panel-danger - if @project.pages_deployed?
.panel-heading Remove pages .panel.panel-default.panel.panel-danger
.errors-holder .panel-heading Remove pages
.panel-body .errors-holder
%p .panel-body
Removing the pages will prevent from exposing them to outside world. %p
.form-actions Removing the pages will prevent from exposing them to outside world.
= link_to 'Remove pages', namespace_project_pages_path(@project.namespace, @project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove" .form-actions
= link_to 'Remove pages', namespace_project_pages_path(@project.namespace, @project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove"
- else - else
.nothing-here-block Only the project owner can remove pages .nothing-here-block Only the project owner can remove pages
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment