added answerbox

This commit is contained in:
nilsding 2014-11-27 11:50:29 +01:00
parent e128686297
commit 4476e54ca5
2 changed files with 12 additions and 7 deletions

View File

@ -0,0 +1,11 @@
.panel.panel-default.answer-box{'data-id' => a.id}
.panel-body
%p
%strong= a.question.content
%small= user_screen_name a.question.user, a.question.author_is_anonymous
%hr/
%p= a.content
%br/
- if privileged?
%button.btn.btn-danger{name: 'ab-destroy', 'data-a-id' => a.id}
Delete

View File

@ -27,11 +27,5 @@
.col-md-9.col-xs-12.col-sm-9 .col-md-9.col-xs-12.col-sm-9
= render 'shared/questionbox' = render 'shared/questionbox'
- @answers.each do |a| - @answers.each do |a|
.panel.panel-default = render 'shared/answerbox', a: a
.panel-body
%p
%strong= a.question.content
%small= user_screen_name a.question.user, a.question.author_is_anonymous
%hr/
%p= a.content
.visible-xs= render 'shared/links' .visible-xs= render 'shared/links'