Skip to content

Commit

Permalink
Fixed #33 improved layout of company employees
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisnyman committed Dec 23, 2014
1 parent 8447bc7 commit b5d4df7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/scss/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,7 @@ td img {
img.toggle {
float: right;
width: 24px;
}
.employees {
width: 100%;
}
8 changes: 7 additions & 1 deletion app/templates/companies.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@
<% companies.each do |name, values| %>
<tr>
<td id="<%= name %>"><%= (lastMentions == values['mentions']) ? lastOrder : i %></td>
<td><%= values['link'] %> <img src="images/icon_info.png" alt="Info" title="Toggle employees" class="toggle"><div class="employees" style="display: none"><%= values['contributors'].map{|k,v| "<a href=\"http://dgo.to/@#{k}\">#{k}</a> [#{v}]"}.join(', ') %></div></td>
<td><%= values['link'] %> <img src="images/icon_info.png" alt="Info" title="Toggle employees" class="toggle">
<table class="employees" style="display: none">
<% values['contributors'].each do |contributor, mentions| %>
<tr><td><a href="http://dgo.to/@<%= contributor %>"><%= contributor %></a></td><td><%= mentions %></td></tr>
<% end %>
</table>
</td>
<td><%= values['contributors'].length %></td>
<td><%= values['mentions'] %> (~<%= values['mentions'] / values['contributors'].length %>)</td>
<td><%= ((values['mentions']/sum)*100).round(4) %>%</td>
Expand Down

0 comments on commit b5d4df7

Please sign in to comment.