.row
.col-sm-12
.user-details id="user-#{user.id}"
.col-sm-12.col-xs-12.no-padding
- unless params[:controller] == 'pages'
.col-sm-3.col-xs-12.center
= image_tag user.image_url(:medium), alt: user.full_name, class: 'img-responsive'
.col-xs-12.col-sm-9
.mt15.fs18.semibold
.pull-left
- if user != current_user
= link_to profile_path(user)
= user.full_name.try(:titleize)
- else
.user-name class = "user-name-#{user.id}"
= user.full_name.try(:titleize)
- if current_user and current_user.id == user.id and params[:controller] == 'dashboard'
= link_to edit_settings_path(partial: 'settings/popover/edit'), class: 'edit-popover pull-left pl5',id:'edit-personal-details', data: {placement: 'bottom', toggle: :tooltip, title: 'Edit Details'}
i.fa.fa-pencil.fs10.edit-badge
.clearfix
.col-sm-12.col-xs-12.mb10.no-padding
ul.col-sm-7.col-xs-12.education-fields
.personal-details class = "personal-details-#{user.id}"
= render 'tutors/profile_details', tutor: user
- if user.tutor?
.col-sm-5.col-xs-12.no-padding.hide
ul.col-xs-12.no-padding.edit-rate class="#{ 'col-sm-6' if user.recieved_reviews.exists?}"
li.numbers
- if current_user and current_user.id == user.id and params[:controller] == 'dashboard'
.editable-input data-toggle="tooltip" title="Edit"
span $
= link_to "#{user.rate_in_cents/100}", '#', id: :rate, data: {type: :text, resource: :user, name: :rate, url: settings_path}, class: 'x-editable'
- else
= "$#{user.rate}"
li.text-center.fs10
= "#{user.name}'s hourly tutoring Wage"
- if user.recieved_reviews.exists?
ul.col-sm-6.col-xs-12.no-padding
li.numbers
= user.average_rating.round(2)
li.text-center.fs10
= "#{user.name}'s User Rating"
.row
.col-xs-12.col-sm-12
- if user.id != current_user.try(:id)
.pull-left.pl5.hide
= link_to profile_path(user), class: "btn btn-default pull-left" do
i.fa.fa-user.fa-1x.pull-left
= "About"
.pull-left.pl5
= link_to init_chat_path(user_ids: [user.id]), method: :post, class: "btn btn-default pull-left ", remote: true do
i.fa.fa-envelope.fa-1x.pull-left
= "Message"
- if user.tutor?
.pull-left.pl5
- if logged_in?
- if user.id != current_user.id
= link_to profile_path(user, tab: 'appointments'), class: "btn btn-default pull-left" do
i.fa.fa-calendar.fa-1x.pull-left
= "Schedule"
- else
= link_to login_path, class: "btn btn-default pull-left", data:{toggle: :modal, target:'#remote-modal'} do
i.fa.fa-calendar.fa-1x.pull-left
= "Schedule"
- if logged_in? and user.tutor? and user.id != current_user.id
.pull-left.pl5.hide
span.video-session class="#{'hide' unless user.available_for_video? }"
= link_to new_video_session_path(session: {tutor_id: user.id}), data:{toggle: :modal, target: '#remote-modal'}, class: "btn btn-default pull-left " do
i.fa.fa-video-camera.fa-1x.pull-left
= "Video"
.pull-left.pl5
- if logged_in?
- if user.id != current_user.id
= link_to profile_path(user, tab: 'pay'), class: "btn btn-default pull-left" do
i.fa.fa-dollar.fa-1x.pull-left
= "Pay"
- else
= link_to login_path, class: "btn btn-default pull-left", data:{toggle: :modal, target:'#remote-modal'} do
i.fa.fa-dollar.fa-1x.pull-left
= "Pay"
- if user.tutor?
.pull-left.pl5
- if logged_in?
- if user.id != current_user.id
= link_to profile_path(user, tab: 'charge'), class: "btn btn-default pull-left" do
i.fa.fa-money.fa-1x.pull-left
= "Charge"
- else
= link_to login_path, class: "btn btn-default pull-left", data:{toggle: :modal, target:'#remote-modal'} do
i.fa.fa-money.fa-1x.pull-left
= "Charge"