Use Bootstrap's thumbnail view to layout contacts in the overview page. Still needs some tweeking, though.

This commit is contained in:
Roland Jesse 2012-04-30 21:42:45 +02:00
parent c3e2c05ea4
commit 89537b5eed
2 changed files with 16 additions and 20 deletions

View file

@ -1,26 +1,22 @@
<% title t("titles.contacts.index") %>
<% ctr = 1 %>
<div class="page-header">
<h1>Overview</h1>
</div>
<div class="row">
<ul class="thumbnails">
<% @contacts.each do |c| %>
<div class="onecol avatar_summary">
<li class="span3">
<div class="thumbnail">
<%= link_to (image_tag("dummy_buddy_m.png")), c %>
<h5>
<%= link_to (c.firstname.blank? ? "&nbsp;".html_safe : c.firstname), c %>
<%= link_to (c.lastname.blank? ? "&nbsp;".html_safe : c.lastname), c %>
</h5>
<p>
<%= link_to (c.birth_date_string.blank? ? "&nbsp;".html_safe : c.birth_date_string), c %>
</p>
</div>
<% if ctr.modulo(4) == 0 %>
<div class="twocol last contact_summary">
<% else %>
<div class="twocol contact_summary">
<% end %>
<span class="name_summary"><%= link_to (c.firstname.blank? ? "&nbsp;".html_safe : c.firstname), c %></span><br />
<strong><%= link_to (c.lastname.blank? ? "&nbsp;".html_safe : c.lastname), c %></strong>
<br />
<%= link_to (c.birth_date_string.blank? ? "&nbsp;".html_safe : c.birth_date_string), c %>
</div> <%# threecol %>
<% if ctr.modulo(4) == 0 %>
</div>
<div class="row">
</li>
<% end %>
<% ctr += 1 %>
<% end %>
</div> <%# row %>
</ul>

View file

@ -21,7 +21,7 @@
<div class="container">
<div class="content">
<div class="row">
<div class="row login_row">
<div class="span12">
<%= render 'layouts/messages' %>
</div>