#question-show data-id=@question.id .col-sm-12 .question .qtext = @question.text .qprice - unless @question.owner?(current_user) = "You will get paid #{@question.payable_amount.format} for answering this question." - else = "You will get charged #{@question.rate.format} for asking this question." .clearfix .center.ref-diagram-wrapper - if @question.canvas and @question.canvas.image_data .ptb20.semibold span.tdia | Reference Diagram .clearfix = image_tag @question.canvas.image_data .clearfix - if @question.attachments.exists? .center.ref-diagram-wrapper .ptb20.semibold span.tdia | Attachments .clearfix - @question.attachments.each do |attachment| .filename = link_to attachment.attachment_file_name, attachment.url, target: :_blank .filetype = attachment.attachment_content_type.split('/').last .filesize = number_to_human_size(attachment.attachment_file_size) .clearfix .col-sm-12.center.pt10.txt-red - if @question.pending? - unless @question.owner?(current_user) .offer-to-answer - if @question.responded_by?(current_user) | Your response has already been registered, and notified to the student. - else = link_to 'Offer to Answer', offer_to_answer_question_path(@question), method: :patch, remote: true, class: 'btn btn-default' .clearfix #question-sidebar - if @question.owner?(current_user) - if @question.pending? - if @question.question_offers.exists? span.tdia.w90pct.center-block.center.mtb10 Offers From Tutors .col-xs-6.col-sm-4 - @question.question_offers.includes(:tutor).each do |offer| .col-xs-12.center = image_tag offer.tutor.image_url(:thumb), alt: offer.tutor.name .col-xs-12.center = offer.tutor.full_name .col-xs-12.center.mt5 = link_to 'Accept Offer', accept_offer_question_path(@question, offer_id: offer.id), method: :patch, remote: true, class: 'btn btn-default fs9 mb20' - elsif @question.answered? .show-answer = render template: 'questions/answers/show' - elsif @question.tutor?(current_user) - if @question.assigned? - unless @question.answered? .question-show-link .fa.fa-eye.inline.mr5 .inline.fs9 = link_to 'Answer This Question','#', data: {toggle: 'class:hide', target: '.show-answer, .question-show-link'} .show-answer.hide = render template: 'questions/answers/new' - else .show-answer = render template: 'questions/answers/show'