<h2><%= gettext("Contests") %></h2>

<div class="table-responsive">
  <table class="table">
    <thead>
      <tr>
        <th><%= gettext("Name") %></th>
        <th><%= gettext("Dates") %></th>
        <th><%= gettext("Deadline") %></th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <%= for contest <- @contests do %>
      <tr>
        <td>
          <%= link name_with_flag(contest),
            to: internal_contest_path(@conn, :show, contest)
            %>
        </td>
        <td><%= dates(contest) %></td>
        <td><%= format_date(contest.deadline) %></td>
        <td>
          <%= icon_link("pencil", nil, internal_contest_path(@conn, :edit, contest),
            class: "btn btn-default btn-xs") %>
        </td>
      </tr>
      <% end %>
    </tbody>
  </table>
</div>

<h2><%= gettext("Contests") %></h2>

<div class="table-responsive">
  <table class="table">
    <thead>
      <tr>
        <th><%= gettext("Name") %></th>
        <th><%= gettext("Dates") %></th>
        <th><%= gettext("Deadline") %></th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <%= for contest <- @contests do %>
      <tr>
        <td>
          <%= link name_with_flag(contest),
            to: internal_contest_path(@conn, :show, contest)
            %>
        </td>
        <td><%= dates(contest) %></td>
        <td><%= format_date(contest.deadline) %></td>
        <td>
          <%= if admin?(@current_user) do %>
            <%= icon_link("pencil", nil, internal_contest_path(@conn, :edit, contest),
              class: "btn btn-default btn-xs") %>
          <% end %>
        </td>
      </tr>
      <% end %>
    </tbody>
  </table>
</div>

Hide edit button in contest list from non-admins
Hide edit button in contest list from non-admins
