Retrospring/app/views/inbox/show.html.haml

35 lines
1.4 KiB
Plaintext
Raw Normal View History

2014-11-11 09:02:59 -08:00
.container.j2-page
2014-11-11 11:24:49 -08:00
= render 'layouts/messages'
2014-11-10 22:10:41 -08:00
- @inbox.each do |i|
2014-11-30 09:23:57 -08:00
.panel.inbox-box{'data-id' => i.id, class: "panel-#{i.new? ? 'primary' : 'default'}" }
2014-11-30 09:15:00 -08:00
.panel-heading
.media
- unless i.question.author_is_anonymous
%a.pull-left{href: show_user_profile_path(i.question.user.screen_name)}
%img.img-rounded.img-answerbox{src: gravatar_url(i.question.user)}
.media-body
2014-11-30 12:02:17 -08:00
%h6.text-muted.media-heading.answerbox-question-user
= user_screen_name i.question.user, i.question.author_is_anonymous
asked
= time_ago_in_words(i.question.created_at)
ago
2014-12-07 11:57:10 -08:00
- unless i.question.author_is_anonymous
- if i.question.answer_count > 0
2014-12-07 11:51:44 -08:00
·
%a{href: show_user_question_path(i.question.user.screen_name, i.question.id)}
2014-12-07 11:57:10 -08:00
#{i.question.answer_count} response(s)
2014-11-30 09:15:00 -08:00
%p.answerbox-question-text= i.question.content
2014-11-30 11:58:10 -08:00
.panel-body
2014-11-13 10:20:18 -08:00
%textarea.form-control{name: 'ib-answer', 'data-id' => i.id}
2014-11-30 09:17:39 -08:00
%br/
2014-11-11 11:24:49 -08:00
%button.btn.btn-success{name: 'ib-answer', 'data-ib-id' => i.id}
Answer
%button.btn.btn-danger{name: 'ib-destroy', 'data-ib-id' => i.id}
Delete
2014-11-11 10:53:35 -08:00
- if @inbox.empty?
2014-11-11 11:24:49 -08:00
Nothing to see here.
2014-11-30 12:08:00 -08:00
= render "shared/links"
- @inbox.update_all(new: false)