.mgn_t_20.white_bg.pad_h_40.pad_v_20 %h1 = image_tag @student.image.url(:thumb, class: 'thumbnail') = @student.name.titlecase .mid_hr %hr/ .row-fluid .span7 .mgn_t_20.white_bg.pad_h_40.pad_v_20 #tutoring_sessions %h2 #{TutoringSession.model_name.human.pluralize} .quick_hr %hr/ %table#tutoring_sessions_list.table.table-condensed.table-striped %thead %tr %th Date %th Time %th Length (min) %th Status %th %th %th %th %th - @tutoring_sessions.each do |tutoring_session| %tr %td= l tutoring_session.date %td= tutoring_session.start_time_str %td= tutoring_session.length %td= tutoring_session.status_label - unless tutoring_session.confirmed? %td.btn_holder = tutoring_session_confirmation_link(tutoring_session, :class => 'ts_btn pull-right mgn_r_5', :submit_label => "Confirm") - else %td %td - if !Configurations::Stripe.enabled? or !(tutoring_session.invoice and tutoring_session.invoice.paid?) = link_to 'Reject', reject_tutor_tutoring_session_path(tutoring_session), method: 'post', class: 'btn btn-warning', id: "reject_tutoring_session_#{tutoring_session.id}" %td= link_to "", tutor_tutoring_session_path(tutoring_session), class: 'icon-zoom-in', title: 'View' - if !tutoring_session.confirmed? %td= link_to '', edit_tutor_tutoring_session_path(tutoring_session), id: "edit_tutoring_session_#{tutoring_session.id}", class: 'icon-pencil', title: "Change date, time or length" - else %td %td .mgn_t_20.white_bg.pad_h_20.pad_v_20 #invoices %h2 Payments .quick_hr %hr/ %table.table.table-condensed.table-striped %thead %tr %th Session %th Date %th Amount %th Status - @invoices.each do |invoice| %tr %td= link_to "##{invoice.invoiceable_id}", tutor_tutoring_session_path(invoice.invoiceable) %td= l invoice.created_at.to_date %td= Money.new invoice.payable_amount %td - if invoice.paid? %span.label.label-success.span1 paid - else %span.label.label-important.span1 pending .span5{:style => "float: right"} .mgn_t_20.white_bg.pad_h_40.pad_v_20 %h2 Chat .quick_hr %hr/ = render 'comments/form' #comments.mgn_l_10 = render partial: '/comments/index', :locals => {:user => @student.id}