OfficeMomsandDads/scheduler

View on GitHub
app/views/shifts/index.html.haml

Summary

Maintainability
Test Coverage
- content_for :page_header do
  .header-text Shift Management
- content_for :nav_buttons do
  = link_to 'Back to Need', need_path(@need), class: 'button primary'
  = link_to 'Edit Need', edit_need_path(@need), class: 'button secondary' unless @need.shifts.last.expired?
.shifts-container
  - if @need.expired?
    = render partial: 'view_shifts', locals: { shifts: @shifts }
  - else
    = render partial: 'manage_shifts', locals: { shifts: @shifts }