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.

48 lines
1.7 KiB

8 years ago
= top_menu link_to_dashboard
8 years ago
%h1 Your Timesheet
8 years ago
.row
.col-xs-12.col-sm-6.col-lg-3
%p
%span.badge= @hours_worked
Total Hours Worked
.col-xs-12.col-sm-6.col-lg-3
%p
%span.badge= @credits_available
Total Credits Available
%table.table
%tbody
- @user_time_entries.each do |entry|
8 years ago
-# data: {start_date: ..} gets transformed to data-start-date instead of data-start_date, we don't want this
%tr{data: {id: entry.id, description: entry.description, duration: entry.duration_in_hours},
8 years ago
'data-start_date' => entry.start_date.to_date.to_formatted_s(:rfc822)}
8 years ago
%td= entry.start_date.to_date.to_formatted_s(:rfc822)
%td= entry.duration_in_hours
%td= entry.type
%td= link_to truncate(entry.description).presence || '<em>No title</em>'.html_safe, edit_task_list_path(entry)
%td
8 years ago
= link_to '#modal', class: 'text-danger work_entry-delete-btn', role: 'button', data: {toggle: 'modal', target: '#confirmation'} do
%i.glyphicon.glyphicon-remove
= link_to 'Add Time Entry', new_time_entry_path, class: 'btn btn-primary'
.modal#confirmation(role="dialog" aria-labelledby="confirmation_title" aria-hidden="true" tabindex="-1")
8 years ago
.modal-dialog
.modal-content
.modal-header
%button.close(data-dismiss="modal" aria-hidden="true") &times;
8 years ago
%h4#confirmation_title Are you sure you want to delete?
.modal-body
#work_entry_start_date Start Date
#work_entry_duration Duration
#work_entry_description Description
.modal-footer
%button.btn.btn-default(data-dismiss="modal" aria-hidden="true") Cancel
%button.btn.btn-danger#confirmation_delete(data-url="api/v1/time_entries/") Delete