Sha256: 11b9c425a0e3478ee761f804707789ea545731aaa812ad8436bd625396c9f2cf

Contents?: true

Size: 1.3 KB

Versions: 28

Compression:

Stored size: 1.3 KB

Contents

= content_for(:actions) do
  = link_to "Add",
          new_hd_dialysate_path,
          class: "button"

= within_new_admin_layout(title: "HD Dialysates") do

  table.hd-dialysates
    thead
      th.col-width-tiny
      th.col-width-medium Name
      th.col-width-medium Description
      - %i(sodium bicarbonate potassium calcium glocose).each do |element|
        th.col-width-tiny= element.to_s.capitalize
    tbody
      - dialysates.each do |dialysate|
        tr
          td
            - if policy(dialysate).edit?
              = link_to "Edit", edit_hd_dialysate_path(dialysate)
            / Disabling destroy for now as it seems to let you delete a dialysate that is in use
            / Need to add a FK first
            / - if policy(dialysate).destroy?
            /   = pipe_separator
            /   = link_to "Delete",
            /             hd_dialysate_path(dialysate),
            /             method: :delete,
            /             data: { confirm: "Are you sure?" }
          td= dialysate.name
          td= dialysate.description
          - %i(sodium bicarbonate potassium calcium glucose).each do |element|
            - line = [ \
              dialysate.public_send(:"#{element}_content"), \
              dialysate.public_send(:"#{element}_content_uom")].compact.join(" ")
            td= line

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
renalware-core-2.0.167 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.166 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.165 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.164 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.163 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.162 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.161 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.160 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.159 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.158 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.157 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.156 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.155 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.153 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.152 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.151 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.149 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.148 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.147 app/views/renalware/hd/dialysates/index.html.slim
renalware-core-2.0.146 app/views/renalware/hd/dialysates/index.html.slim