.user-details id="user-#{tutor.id}"
.col-sm-12.col-xs-12.no-padding
- if local_assigns[:display_image]
.col-sm-3.col-xs-12.center
- if tutor != current_user
= link_to profile_path(tutor) do
= image_tag tutor.image_url(:medium), alt: tutor.full_name, class: 'img-responsive'
- else
= image_tag tutor.image_url(:medium), alt: tutor.full_name, class: 'img-responsive'
.col-xs-12.ptb10
- if tutor.tutor? && !ActsAsTenant.current_tenant.try(:prelaunch?)
- if current_user and tutor.id != current_user.id and tutor.available_for_ask_a_question?
/#
.inline.pr10
= link_to new_question_path(tutor_id: tutor.id), data:{toggle: :modal, target: '#remote-modal'}
.fs12.fa.fa-question.dullgrey alt="Ask a question"
- if current_user and tutor.id != current_user.id and tutor.available_for_video?
/#
.inline.pr10
= link_to new_video_session_path(session: {tutor_id: tutor.id}), data:{toggle: :modal, target: '#remote-modal'}
.fs12.fa.fa-video-camera.dullgrey alt="Video Session"
- if current_user and tutor.id != current_user.id
/#
.inline.pr10
= link_to new_tutor_tutoring_session_path(tutor_id: tutor.id), data:{toggle: :modal, target: '#remote-modal'}
.fs12.fa.fa-book.dullgrey alt="Book a session"
.col-xs-12 class=(local_assigns[:display_image] ? 'col-sm-9' : 'col-sm-12')
.mt15.fs18.semibold
- if tutor != current_user
= link_to profile_path(tutor) do
= tutor.full_name.try(:titleize)
- else
= tutor.full_name.try(:titleize)
- if tutor.exp_title
.regular.fs11.darkgrey.mb10
- if current_user.id == tutor.id and params[:controller] == 'dashboard'
.editable-input data-toggle="tooltip" title="Edit"
= link_to "#{tutor.exp_title}", '#', id: :exp_title, data: {type: :text, resource: :user, name: :exp_title, url: settings_path}, class: 'x-editable no-border'
- else
= tutor.exp_title
.clearfix
.col-sm-12.col-xs-12.mb10.no-padding
ul.col-sm-7.col-xs-12.education-fields
li
i.fa.fa-university data-toggle='tooltip' data-placement='left' title='University'
span.univ_details
= ActsAsTenant.current_tenant.name
- unless tutor.educations.first.try(:end_date).try(:year).blank?
| class of
= tutor.educations.first.try(:end_date).try(:year)
- if current_user.id == tutor.id and params[:controller] == 'dashboard'
= link_to edit_settings_path(partial: 'settings/popover/education_first'),class: 'edit-popover dullgrey pull-left pl5', data: {placement: 'bottom', toggle: :tooltip, title: 'Edit Education'}
i.fa.fa-pencil.edit-badge
span class = "education-first-#{tutor.id}"
= render 'tutors/education_first', tutor: tutor
- unless tutor.response_time.blank?
li
.editable-input data-toggle="tooltip" title="Edit"
i.fa.fa-clock-o data-toggle='tooltip' data-placement='left' title='Response time'
- if current_user.id == tutor.id and params[:controller] == 'dashboard'
span.school_name= link_to "#{tutor.response_time.try(:titleize)}", '#', id: :response_time, data: {type: :text, resource: :tutor, name: :response_time, url: settings_path}, class: 'x-editable no-border'
- else
span.school_name= tutor.response_time.try(:titleize)
.clearfix
- if tutor.tutor? && !ActsAsTenant.current_tenant.try(:prelaunch?)
.col-sm-5.col-xs-12.no-padding
ul.col-sm-6.col-xs-6.no-padding.edit-rate
li.numbers
- if current_user.id == tutor.id and params[:controller] == 'dashboard'
.editable-input data-toggle="tooltip" title="Edit"
span $
= link_to "#{tutor.rate_in_cents/100}", '#', id: :rate, data: {type: :text, resource: :tutor, name: :rate, url: settings_path}, class: 'x-editable'
- else
= "$#{tutor.rate}"
li.text-center.fs10
= "#{tutor.name}'s hourly Expert Wage"
ul.col-sm-6.col-xs-6.no-padding
- if tutor.recieved_reviews.exists?
li.numbers
= tutor.average_rating.round(2)
li.text-center.fs10
= "#{tutor.name}'s User Rating"
/#
ul.col-sm-4.col-xs-4.no-padding
- if tutor == current_user
li.numbers
= tutor.profile_visits.sum(:count)
li.text-center.fs10
| Profile Views
.clearfix
.col-sm-12.col-xs-12.no-padding.chathover
- if current_user and tutor.id != current_user.id
.pull-left
.fav-mark-unmark
span.marked class="#{'hide' if !current_user.is_favorite_users?(tutor) or current_user.approved_friend?(tutor)}"
= link_to unmark_user_favorites_path(tutor.id), class: "btn btn-default ", remote: true, method: :patch do
i.fa.fa-close.fa-1x.pull-left
| Friended
span.approved class="#{'hide' if !current_user.approved_friend?(tutor)}"
= link_to unmark_user_favorites_path(tutor.id), class: "btn btn-default", remote: true, method: :patch do
i.fa.fa-close.fa-1x.pull-left
| Unfriend
span.unmarked class="#{'hide' if current_user.is_favorite_users?(tutor)}"
= link_to mark_user_favorites_path(tutor.id), class: "btn btn-default", remote: true, method: :patch do
i.fa.fa-plus.fa-1x.pull-left
| Friend
.pull-left.pl5
- if tutor.id != try(:current_user).try(:id)
= link_to init_chat_path(user_ids: [tutor.id]), method: :post, class: "btn btn-default pull-left ", remote: true do
i.fa.fa-envelope.fa-1x.pull-left
= "Message"
- unless logged_in? and tutor.id == current_user.id
.pull-left.pl5
span.schedule
= link_to personal_calendar_path(user_id: tutor.id), class: "btn btn-default pull-left"
i.fa.fa-calendar.fa-1x.pull-left
= "Schedule"
/ class="#{'hide' unless current_user.approved_friend?(tutor)}" removed this condition for pay and calender icons.
.pull-left.pl5
span.invoice
= link_to invoices_path(user_id: tutor.id), class: "btn btn-default pull-left " do
i.fa.fa-dollar.fa-1x.pull-left
= "Pay"
- if tutor.tutor?
.pull-left.pl5
span.video-session class="#{'hide' unless tutor.available_for_video? }"
= link_to new_video_session_path(session: {tutor_id: tutor.id}), data:{toggle: :modal, target: '#remote-modal'}, class: "btn btn-default pull-left " do
i.fa.fa-video-camera.fa-1x.pull-left
= "#{tutor.full_name} - Online"
.clearfix