Sha256: 5ab3ecffd0b8b731d1c8cb3582b00d16719ab75410034d860b6751f29f2c6097

Contents?: true

Size: 997 Bytes

Versions: 62

Compression:

Stored size: 997 Bytes

Contents

= content_for(:actions) do
  - if policy(Renalware::Hospitals::Ward.new).create?
    = link_to "Add",
            new_hospitals_unit_ward_path(unit),
            class: "button"

= within_admin_layout(title: "Wards", breadcrumbs: \
    breadcrumb_for(unit.name, hospitals_units_path)) do

  table.hospital-wards
    thead
      th.col-width-tiny
      th.col-width-medium Code
      th Name
      th Active
    tbody
      - wards.each do |ward|
        tr
          td
            - if policy(ward).edit?
              = link_to "Edit", edit_hospitals_unit_ward_path(unit, ward)
            / For now, no longer support deleting a ward
            / - if policy(ward).destroy?
            /   = pipe_separator
            /   = link_to "Delete",
            /             hospitals_unit_ward_path(unit, ward),
            /             method: :delete,
            /             data: { confirm: "Are you sure?" }
          td= ward.code
          td= ward.name
          td= yes_no(ward.active)

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
renalware-core-2.0.125 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.124 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.123 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.121 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.120 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.119 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.118 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.117 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.116 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.115 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.113 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.112 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.111 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.110 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.109 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.108 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.106 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.105 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.104 app/views/renalware/hospitals/wards/index.html.slim
renalware-core-2.0.103 app/views/renalware/hospitals/wards/index.html.slim