Sha256: 45c5c8907015208d37d1bd9ed73e44f17ce2b145b9d3b55beb21e9ccf8b662d9

Contents?: true

Size: 1.93 KB

Versions: 3

Compression:

Stored size: 1.93 KB

Contents

- for_context ||= context

- content_for :title do
  - if for_context.confirm?
    - if for_context.confirm == :destroy
      span class="text-danger"
        i class="fa fa-exclamation-triangle"
        = ' ' + t('admin_it.destroying')
  - else
    = t('admin_it.details')

- if for_context.layout.empty?
  h4 = yield :title

- if for_context.confirm?
  - if for_context.confirm == :destroy
    p = t('admin_it.confirm.destroy.header')

- if for_context.sections.size > 0
  ul class="nav nav-tabs"
    - for_context.sections.each do |section|
      li class="#{section.name == for_context.section ? 'active' : ''}"
        a href="##{section.name}" data-toggle="tab"
          = section.display_name
  div class="tab-content"
    - for_context.sections.each do |section|
      div class="tab-pane #{section.name == for_context.section ? 'active' : ''}" id==section.name
        - if section.fields.size > 0
          dl class="dl-horizontal"
            - section.fields.each do |f_name|
              - f = for_context.field(f_name)
              - next if f.type == :relation
              dt = f.display_name
              - value = f.show(for_context.entity)
              - value = value.nil? ? ' '.html_safe : value.to_s
              = field value, tag: 'dd'
- else
  dl class="dl-horizontal"
    - for_context.fields.each do |f|
      - next if f.type == :relation
      dt = f.display_name
      - value = f.show(for_context.entity)
      - value = value.nil? ? ' '.html_safe : value.to_s
      = field value, tag: 'dd'
div class="clearfix"

- if for_context.confirm?
  - if for_context.confirm == :destroy
    p = t('admin_it.confirm.destroy.text')

- content_for :buttons do
  - if for_context.confirm?
    - if for_context.confirm == :destroy
      = link_to( \
          '<i class="fa fa-trash-o"></i> '.html_safe + t('admin_it.action.destroy'),
          for_context.path, \
          method: :delete, \
          class: 'btn btn-danger' \
        )

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
admin_it-1.1.0 app/views/admin_it/context/_show.html.slim
admin_it-1.0.11 app/views/admin_it/context/_show.html.slim
admin_it-1.0.10 app/views/admin_it/context/_show.html.slim