app/views/projects/show.html.erb
<div class="page-header">
<h1>
<%= @project.name %>
<% if current_user.is_project_owner(@project) %>
<div class="pull-right">
<%= link_to 'Edit', edit_project_path(@project), class: "btn btn-info" %>
</div>
<% end %>
</h1>
</div>
<ol class="breadcrumb">
<li><%= link_to 'Projects', projects_path %></li>
<li class="Active"><%= @project.name %></li>
</ol>
<div>
<ul class="list-unstyled">
<li><%= link_to pluralize(@project.tasks.count,"Task"), project_tasks_path(@project) %></li>
<li><%= link_to pluralize(@project.memberships.count,"Membership"), project_memberships_path(@project) %></li>
</ul>
</div>
<% if current_user.is_project_owner(@project) %>
<div class="well">
<h4>Delete Project</h4>
<div>
<p>
Deleting this project will also delete <%= pluralize(@project.memberships.count,"membership") %>,
<%= pluralize(@project.tasks.count,"task") %> and associated comments.
</p>
</div>
<div>
<%= link_to 'Delete', @project, method: :delete,data: {confirm: "Are you sure?"}, class: "btn btn-danger" %>
</div>
</div>
<% end %>