Sha256: 90301acee748077655a2dddb33fc05d8cf3412f2cc7e9d7d4d18c9e0e2e24d64

Contents?: true

Size: 1.87 KB

Versions: 7

Compression:

Stored size: 1.87 KB

Contents

= content_for :nav_title do
  = @role.name.titleize
= content_for :nav_links do
  .buttons
    = authz_link_to 'Edit', edit_role_path(@role), {class: 'button is-primary'}, skip_scoping: true
    = authz_link_to 'Destroy', role_path(@role),
                    {method: :delete, class: 'button is-danger', data: { confirm: '¿Are you sure? This action is undoable' }},
                    skip_scoping: true

section.section
  .columns
    .column
      h2.title.is-4 Business Processes
      - if @associated_business_processes.blank?
        = render 'authz/business_processes/empty_association', parent_edit_link: edit_controller_action_path(@role)
      - else
        = render 'authz/business_processes/table', business_processes: @associated_business_processes
    .column
      h2.title.is-4 Controller Actions
      - if @associated_controller_actions.blank?
        = render 'authz/controller_actions/empty_association', parent_edit_link: edit_controller_action_path(@role)
      - else
        = render 'authz/controller_actions/table', controller_actions: @associated_controller_actions
section.section
  h2.title.is-4 Scoping Rules
  .card
    table.table.is-fullwidth
      thead
        tr
          th Name
          th Value
          th
      tbody
        - @scoping_rules.each do |rule_name, instance|
          tr
            td = rule_name
            td = instance.try(:keyword) || 'Not created yet'
            td
              - if instance
                = authz_link_to 'Edit', edit_role_scoping_rule_path(@role, instance), {class: 'button is-primary'}, skip_scoping: true
              - else
                = authz_link_to 'New', new_role_scoping_rule_path(@role, scopable: rule_name), {class: 'button is-primary'}, skip_scoping: true
section.section
  - Authz.rolables.each do |rolable|
    = render 'authz/rolables/table_from_association', rolable: rolable, parent_instance: @role

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
authz-0.0.5 app/views/authz/roles/show.html.slim
authz-0.0.4 app/views/authz/roles/show.html.slim
authz-0.0.3 app/views/authz/roles/show.html.slim
authz-0.0.2 app/views/authz/roles/show.html.slim
authz-0.0.1 app/views/authz/roles/show.html.slim
authz-0.0.1.alpha5 app/views/authz/roles/show.html.slim
authz-0.0.1.alpha4 app/views/authz/roles/show.html.slim