Skip to content

Instantly share code, notes, and snippets.

@JennDudley
Created June 16, 2012 01:14
Show Gist options
  • Save JennDudley/2939494 to your computer and use it in GitHub Desktop.
Save JennDudley/2939494 to your computer and use it in GitHub Desktop.
Needs new card styles
<% if user.assignments.collect(&:group_id).include?(1) %>
<li class="four columns card-layout <%= user.groups.collect(&:name).uniq.to_sentence.downcase %> <%= user.courses.collect(&:id).uniq.join(" ") %>">
<a href="/users/<%= user.id %>"><%= image_tag "75/#{user.user_image}", :height => 75 %>
<h3><%= user.first_name %> <%= user.last_name %><br /><span><%= user.hometown %></span></h3>
</a>
</li>
<% else %>
<li class="four columns other-card-layout <%= user.groups.collect(&:name).uniq.to_sentence.downcase %> <%= user.courses.collect(&:id).uniq.join(" ") %>">
<%= image_tag "75/#{user.user_image}", :height => 75 %>
<h3><%= user.first_name %> <%= user.last_name %><br /><span><a href="http://twitter.com/<%= user.twitter %>"><%= user.twitter %></a></span></h3>
<!-- <h3><a name="<%#= user.id %>"><%#= user.first_name %> <%#= user.last_name %></a><br /><span><%#= user.twitter %></span></h3> -->
</li>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment