filles added
This commit is contained in:
parent
f247e6c5ff
commit
c2fe9de0ff
2 changed files with 18 additions and 1 deletions
|
@ -2,7 +2,7 @@ require 'digest/md5'
|
|||
module ApplicationHelper
|
||||
|
||||
def get_color(user)
|
||||
@color = Digest::MD5.hexdigest(user.name)[0..5]
|
||||
@color = Digest::MD5.hexdigest(user.nickname)[0..5]
|
||||
end
|
||||
|
||||
def get_color_style(user)
|
||||
|
|
17
app/views/orders/_user_list.html.erb
Normal file
17
app/views/orders/_user_list.html.erb
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div class="col-md-6 ">
|
||||
<h3 class="center" >sort by name</h3>
|
||||
|
||||
<% users.each do |user| %>
|
||||
<div class="thumbnail overview">
|
||||
<%= link_to image_tag("http://placekitten.com/g/50/50", class: "img-circle dagschotel"),
|
||||
user %>
|
||||
<%= link_to image_tag("http://babeholder.pixoil.com/img/100/100", class: "img-circle user_img"),
|
||||
new_user_order_path(user) %>
|
||||
|
||||
|
||||
<%= link_to user.nickname , new_user_order_path(user), class: "btn btn-info",
|
||||
style: get_color_style(user) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
Loading…
Reference in a new issue