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-12-08 07:01:27 -08:00
.panel.inbox-box{class: "panel-#{i.new? ? 'primary' : 'default'}", data: { id: i.id }}
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.answerbox--img{src: gravatar_url(i.question.user)}
2014-11-30 09:15:00 -08:00
.media-body
%h6.text-muted.media-heading.answerbox--question-user
2014-11-30 12:02:17 -08:00
= 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)
%p.answerbox--question-text= i.question.content
2014-11-30 11:58:10 -08:00
.panel-body
2014-12-08 07:01:27 -08:00
%textarea.form-control{name: 'ib-answer', data: { id: i.id }}
2014-11-30 09:17:39 -08:00
%br/
2014-12-08 08:18:26 -08:00
%button.btn.btn-success{name: 'ib-answer', data: { ib_id: i.id }}
2014-11-11 11:24:49 -08:00
Answer
2014-12-08 08:18:26 -08:00
%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)