Velocipede's User, Sales, and Bike Inventory Web App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.6 KiB

= link_to_dashboard
%h2 Your Timesheet
%dl.dl-horizontal
%dd
%span.badge #{@hours_worked}
Total Hours Worked
%dd
%span.badge #{@credits_available}
Total Credits Available
%table.table
%tbody
- @user_time_entries.each do |entry|
%tr{ "data-id" => entry.id, "data-description" => entry.description,
"data-duration" => entry.duration_in_hours,
"data-start_date" => entry.start_date.to_date.to_formatted_s(:rfc822)}
%td #{entry.start_date.to_date.to_formatted_s(:rfc822)}
%td #{entry.duration_in_hours}
%td #{entry.type}
%td #{truncate(entry.description)}
%td
%button{ class: "btn icon-remove btn-danger work_entry-delete-btn", role: "button", "data-toggle" => "modal", "data-target" => "#confirmation" }
%a{class: "btn btn-lg btn-block btn-primary", href: new_time_entry_path } Add Time Entry
.modal{ id: "confirmation", class: "hide", role: "dialog", "aria-labelledby" => "confirmation_title", "aria-hidden" => "true", tabindex: -1 }
.modal-header
%button{ class: "close", "data-dismiss" => "modal", "aria-hidden" => "true"}x
%h4{ id: "confirmation_title" } Are you sure you want to delete?
.modal-body
%div{ id: "work_entry_start_date" }
Start Date
%div{ id: "work_entry_duration" }
Duration
%div{ id: "work_entry_description" }
Description
.modal-footer
%button{ class: "btn", "data-dismiss" => "modal", "aria-hidden" => "true"} Close
%button{ id: "confirmation_delete", class: "btn btn-primary", "data-url" => "api/v1/time_entries/" } Delete