crowdAI/crowdai

View on GitHub
app/concepts/challenge/views/challenge_masthead.erb

Summary

Maintainability
Test Coverage
<div class="masthead-detailed" data-cell='Challenge::Cell::ChallengeMasthead'>
  <div class="row">
    <div class="pic pic-challenge">
      <%= concept(Image::Cell,challenge,size: :medium) %>
    </div>
    <div class="info info-challenge">
      <div class="heading-w-icon">
        <h2><%= challenge.challenge %></h2>
        <% if policy(challenge).edit? %>
          <%= link_to edit_organizer_challenge_path(challenge.organizer,challenge), title: "Edit challenge", data: { turbolinks: false } do %>
            <i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i>
          <% end %>
        <% end %>
      </div>
      <p class="large"><%= challenge.tagline %></p>
      <%= organizer_view %>

      <progress max="100" value="<%= progress %>"></progress>
      <div class="stats">
        <div class="stat-fl">
          <%= remaining_units %><br>
          <span><%= remaining_text %></span>
        </div>
        <div class="stat-fr">
          <%= challenge.submission_count %><br>
          <span>Submissions</span>
        </div>
        <div class="stat-fr">
          <%= challenge.participant_count %><br>
          <span>Participants</span>
        </div>
        <div class="stat-fr">
          <%= challenge.page_views %><br>
          <span>Views</span>
        </div>
      </div>
      <div class="button-group">
        <%= concept(Vote::Cell, challenge, current_participant: current_participant) %>
        <%= concept(Follow::Cell, challenge, current_participant: current_participant) %>
      </div>
    </div>
  </div>
</div>