li id="notification-#{notification.id}"
  span.date-time-text
    - if !notification.sent?
      ' Scheduled to be sent on
    - else
      ' Already sent on

    span.trigger-at
      = notification.formatted_trigger_time
  span.actions
    = link_to "Edit", "#", class: "edit-notification if-no-js-hide"

    - if policy(notification).destroy?
      span.if-no-js-hide
        '  |
      = button_to "Delete", admin_settings_email_notification_path(notification), { onclick: "return confirm('Are you sure?')", method: :delete, remote: true }
  .notification-edit-form.well
    = simple_form_for notification, url: admin_settings_email_notification_path(notification, year: params[:year]), remote: true, authenticity_token: true do |f|
      .control-date
        label.control-label Edit schedule
        = f.input :trigger_at,
                  as: :separated_date_time,
                  input_html: { id: '' }
      .control-action
        = link_to "Cancel", "#", class: "btn btn-default btn-cancel if-no-js-hide"
        = f.submit "Save", class: "btn btn-primary btn-submit"
      .clear

li id="notification-#{notification.id}"
  span.date-time-text
    - if !notification.sent?
      ' Scheduled to be sent on
    - else
      ' Already sent on

    span.trigger-at
      = notification.formatted_trigger_time
  - if !notification.sent?
    span.actions
      = link_to "Edit", "#", class: "edit-notification if-no-js-hide"

      - if policy(notification).destroy?
        span.if-no-js-hide
          '  |
        = button_to "Delete", admin_settings_email_notification_path(notification), { onclick: "return confirm('Are you sure?')", method: :delete, remote: true }
    .notification-edit-form.well
      = simple_form_for notification, url: admin_settings_email_notification_path(notification, year: params[:year]), remote: true, authenticity_token: true do |f|
        .control-date
          label.control-label Edit schedule
          = f.input :trigger_at,
                    as: :separated_date_time,
                    input_html: { id: '' }
        .control-action
          = link_to "Cancel", "#", class: "btn btn-default btn-cancel if-no-js-hide"
          = f.submit "Save", class: "btn btn-primary btn-submit"
        .clear

Hide settings email date's edit and delete links when email sent
Hide settings email date's edit and delete links when email sent

bitzesty/qae,bitzesty/qae,bitzesty/qae,bitzesty/qae