mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
WIP, rigged up JS/html to delete work entries
This commit is contained in:
@@ -2,30 +2,42 @@
|
||||
%span{ class:"icon-home"}
|
||||
%h2 Your Timesheet
|
||||
|
||||
%p Total Hours Worked: #{@hours_worked}
|
||||
%p Total Credits Available: #{@credits_available}
|
||||
%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
|
||||
%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 #{truncate(entry.description)}
|
||||
%td
|
||||
%button{ class: "btn icon-remove btn-danger", role: "button", "data-toggle" => "modal", "data-target" => "#confirmation" }
|
||||
%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" } header
|
||||
%h4{ id: "confirmation_title" } Are you sure you want to delete?
|
||||
.modal-body
|
||||
Are you sure?
|
||||
%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{ class: "btn btn-primary" } Delete
|
||||
%button{ id: "confirmation_delete", class: "btn btn-primary" } Delete
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user