<div>
<br>

<% if defined?(@project.name) && !@project.name.blank?
     display_name = @project.name
   else
     display_name = "(Name Unknown)"
   end %>

<h1>Project Badge Status for <%= display_name %></h1>

<%= render 'form', project: @project, is_disabled: true %>

<p>
<%= link_to 'Back', projects_path %>
<% if logged_in? %>
  <%= link_to 'Edit', edit_project_path(@project) %>
  <%= link_to 'Remove', @project, method: :delete, data: { confirm: 'Are you sure?' } %>
<% end %>
</p>

</div>

<div>
<br>

<h1>Project Badge Status for <%=
    @project.try(:name).presence || '(Name Unknown)' %></h1>

<%= render 'form', project: @project, is_disabled: true %>

<p>
<%= link_to 'Back', projects_path %>
<% if logged_in? %>
  <%= link_to 'Edit', edit_project_path(@project) %>
  <%= link_to 'Remove', @project, method: :delete, data: { confirm: 'Are you sure?' } %>
<% end %>
</p>

</div>

Use better idiom for handling not-present
Use better idiom for handling not-present
