Skip to content

Commit

Permalink
show timesheets only for users with tsheets_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav K committed Oct 27, 2017
1 parent e544b18 commit 50bbfaf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/views/users/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@
a aria-controls="entered" data-toggle="tab" href="#entered" role="tab" Recent Jobs Entered
li
a aria-controls="assigned" data-toggle="tab" href="#assigned" role="tab" Recent Jobs Assigned
li
a aria-controls="tsheets" data-toggle="tab" href="#tsheets" role="tab" Timesheet
- if @user.tsheets_id
li
a aria-controls="tsheets" data-toggle="tab" href="#tsheets" role="tab" Timesheet
.panel-body
.tab-content
#entered.tab-pane.fade.in.active
= render partial: 'jobs', locals: {jobs: @user.jobs_entered_by_user}
#assigned.tab-pane.fade
= render partial: 'jobs', locals: {jobs: @user.jobs_owned_by_user}
#tsheets.tab-pane.fade
= render partial: 'tsheets_timesheet', locals: { user: @user }
- if @user.tsheets_id
#tsheets.tab-pane.fade
= render partial: 'tsheets_timesheet', locals: { user: @user }
javascript:
| $("#menu-toggle").click(function (e) {
| e.preventDefault();
Expand Down

0 comments on commit 50bbfaf

Please sign in to comment.