Created
July 17, 2012 19:51
-
-
Save trosage/3131599 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% selected = true if !logged_in? || @topic_groups || current_user.selected_topic?(topic_group_unit) %> | |
<li class="topic <%= "my-topic" if selected %>"> | |
<%= link_to topic_group_unit, :class => "collection" do %> | |
<div class="quarter primary badge-container"> | |
<%= badge_image topic_group_unit, :link => false %> | |
<!-- <span class="icon icon-new-corner"></span> --> | |
<% if current_user && current_user.has_badge?(topic_group_unit.badge) %> | |
<span class="icon icon-unlocked-corner"></span> | |
<% end %> | |
</div> | |
<h4><%= topic_group_unit.title %></h4> | |
<div class="badge-count"> | |
<%= topic_group_unit.badge_count %> | |
<span><%= topic_group_unit.badge_count > 1 ? "badge".pluralize : "badge" %></span> | |
</div> | |
<p class="two-quarter"><%= topic_group_unit.description %></p> | |
<% end %> | |
<div class="buttons-container"> | |
<% if logged_in? %> | |
<%= link_to_start_unit topic_group_unit, :text => "Start Badge", :class => "button" %> | |
<% else %> | |
<%= link_to_unit topic_group_unit, "View Badge", :class => "button" %> | |
<% end %> | |
</div> | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment