added smile display to answerbox

This commit is contained in:
pixeldesu 2014-12-14 15:22:37 +01:00
parent 309fa939aa
commit d963191bd0
2 changed files with 11 additions and 0 deletions

View File

@ -46,4 +46,5 @@
.col-md-6.col-md-offset-6.col-sm-8.col-sm-offset-4.col-xs-6.col-xs-offset-6.text-right
= render 'shared/answerbox_buttons', a: a
.panel-footer{id: "ab-comments-#{a.id}", style: 'display: none'}
= render 'shared/smiles', a: a
= render 'shared/comments', a: a

View File

@ -0,0 +1,10 @@
.media
.pull-left
%i.fa.fa-smile-o
.media-body
- if a.smiles.all.count == 0
No one smiled this, yet.
- else
- a.smiles.all.each do |smile|
%a{href: show_user_profile_path(smile.user), data: {smile_id: smile.id}}
%img.img-rounded.answerbox--img-small{src: gravatar_url(smile.user)}