Growstuff/growstuff

View on GitHub
app/views/activities/_actions.haml

Summary

Maintainability
Test Coverage
- if can?(:edit, activity)
  %span.dropdown.activity-actions
    %a#activity-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'} Actions
    .dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "planting-actions-button"}
      = activity_edit_button(activity, classes: 'dropdown-item')
      - if activity.active
        = activity_finish_button(activity, classes: 'dropdown-item')
      .dropdown-divider
      = delete_button(activity, classes: 'dropdown-item text-danger')