<h1>My code challenges</h1>

<% @code_challenges.each do |code_challenge| %>
  <%= content_tag_for :section, code_challenge, class: "panel panel-default" do %>
    <header class="panel-heading">
      <%= code_challenge.goal.humanize %>:
      <strong>#<%= code_challenge.slug %></strong>
      <div class="btn-group pull-right">
        <%= link_to [:edit, code_challenge], class: "btn btn-default" do %>
          <span class="glyphicon glyphicon-pencil"></span> Edit
        <% end %>
        <%= link_to code_challenge, class: "btn btn-default" do %>
          <span class="glyphicon glyphicon-search"></span> View
        <% end %>
        <%= link_to code_challenge, class: "btn btn-default btn-danger-on-hover", method: :delete,
          data: { confirm: "Are you sure you want to remove this code challenge?\n(This action cannot be undone.)" } do %>
          <span class="glyphicon glyphicon-trash"></span>
        <% end %>
      </div>
    </header>
    <section class="panel-content">
      <section class="row">
        <section class="col-md-6">
          <%= render_code_snippet code_challenge.left_code_sample %>
        </section>
        <section class="col-md-6">
          <%= render_code_snippet code_challenge.right_code_sample %>
        </section>
      </section>
    </section>
  <% end %>
<% end %>

<h1>My code challenges</h1>

<% @code_challenges.each do |code_challenge| %>
  <%= content_tag_for :section, code_challenge, class: "panel panel-default" do %>
    <header class="panel-heading">
      <%= code_challenge.goal.humanize %>:
      <strong>#<%= code_challenge.slug %></strong>
      <div class="btn-group pull-right">
        <%= link_to [:edit, code_challenge], class: "btn btn-default" do %>
          <span class="glyphicon glyphicon-pencil"></span> Edit
        <% end %>
        <%= link_to code_challenge, class: "btn btn-default" do %>
          <span class="glyphicon glyphicon-search"></span> View
        <% end %>
        <%= link_to code_challenge, class: "btn btn-default btn-danger-on-hover", method: :delete,
          data: { confirm: "Are you sure you want to remove this code challenge?\n(This action cannot be undone.)" } do %>
          <span class="glyphicon glyphicon-trash"></span>
        <% end %>
      </div>
    </header>
    <section class="panel-content">
      <section class="row">
        <section class="col-md-6">
          <%= render_code_snippet code_challenge.left_code_sample %>
        </section>
        <section class="col-md-6">
          <%= render_code_snippet code_challenge.right_code_sample %>
        </section>
      </section>
    </section>
  <% end %>
<% end %>

<% if @code_challenges.empty? %>
  <section class="alert alert-info" role="alert">
    You currently do not have any submitted code challenges. Why don't you submit one?
  </section>
<% end %>

Add call-to-action for user with no code challenge
Add call-to-action for user with no code challenge