Added a new div that floats left in the name column. User's headshot is
shown at a max of 32x32 pixels. If the user does not have an avatar,
then no avatar is shown.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/users/index.html.erb | 3 +++
public/stylesheets/tables.css | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index ee02a22..2e8c466 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -17,6 +17,9 @@
<tr class="<%= cycle('odd', 'even') %>">
<td><%= user.id %></td>
<td class="name">
+ <% if user.avatar_url %>
+ <div class="small-icon"><%= image_tag user.avatar_url
%></div>
+ <% end %>
<%= link_to user.display_name, user_path(user) %>
<%= RedCloth.new(get_first_sentence(user.introduction)).to_html %>
</td>
diff --git a/public/stylesheets/tables.css b/public/stylesheets/tables.css
index 839a827..aceddbd 100644
--- a/public/stylesheets/tables.css
+++ b/public/stylesheets/tables.css
@@ -7,6 +7,12 @@ td {
text-align: center;
}
+td div.small-icon img {
+ float: left;
+ max-height: 32px;
+ max-width: 32px;
+}
+
table caption {
margin: 0;
padding: 8px 20px;
@@ -122,4 +128,3 @@ table.edit td.value {
padding-right: 15px;
text-align: left;
}
-
--
1.6.0.6