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

44 lines
1.9 KiB
Plaintext
Raw Normal View History

2014-12-09 14:21:41 -08:00
.panel.inbox-box{class: "panel-#{i.new? ? 'primary' : 'default'}", data: { id: i.id }}
.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)}
.media-body
%h6.text-muted.media-heading.answerbox--question-user
= user_screen_name i.question.user, i.question.author_is_anonymous
asked
2015-02-19 15:40:41 -08:00
%span{title: i.question.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(i.question.created_at)
2014-12-09 14:21:41 -08:00
ago
- unless i.question.author_is_anonymous
- if i.question.answer_count > 0
·
%a{href: show_user_question_path(i.question.user.screen_name, i.question.id)}
#{i.question.answer_count} response(s)
%p.answerbox--question-text= i.question.content
.panel-body
%textarea.form-control{name: 'ib-answer', placeholder: 'Write your answer here...', data: { id: i.id }}
2014-12-09 14:21:41 -08:00
%br/
%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 }}
2014-12-12 15:01:54 -08:00
Delete
2015-01-27 09:25:20 -08:00
%button.btn.btn-default{name: 'ib-options', data: { ib_id: i.id, state: :hidden }}
2015-01-27 21:49:17 -08:00
%i.fa.fa-cog
%span.sr-only Options
2015-01-27 09:25:20 -08:00
.panel-footer{id: "ib-options-#{i.id}", style: 'display: none'}
2015-01-27 09:13:24 -08:00
%h4 Sharing
2015-01-27 21:49:17 -08:00
- if current_user.services.count > 0
2015-01-27 09:13:24 -08:00
.row
2015-01-30 11:32:10 -08:00
- current_user.services.each do |service|
2015-01-30 11:34:28 -08:00
.col-md-3.col-sm-4.col-xs-6
2015-01-30 11:32:10 -08:00
%label
%input{type: 'checkbox', name: 'ib-share', checked: :checked, data: { ib_id: i.id, service: service.provider }}
Post to
= service.provider.capitalize
2015-01-27 09:13:24 -08:00
- else
%p
You have not connected any services yet. Visit your
= link_to "service settings", services_path
to connect one.