Sha256: 72a6d888039b924f29991f6ead5003c42dd89ebb1298e9d8cdca0b225f331c65

Contents?: true

Size: 1.66 KB

Versions: 27

Compression:

Stored size: 1.66 KB

Contents

.active-field
  = toggle_button_for "#{scope}[active]", model.active, data: { toggle_button: '' } do
    .toggle-button__more.toggle-button__more--to-right{ data: { toggle_button_positive_element: '' } }
      = link_to '#active-by-segment', data: { active_by_segment_tooltip: '' } do
        .active-field__segments-message
          - haml_tag_if model.segments.present?, :strong do
            = t('workarea.admin.shared.active_field.by_segment', name: model.segments.map(&:name).first, count: model.segments.size, more_count: model.segments.size - 1)
          - if model.segmented? && model.segments.blank?
            = link_to '#missing-segments-tooltip', data: { tooltip: '' } do
              = inline_svg('workarea/admin/icons/alert.svg', class: 'svg-icon svg-icon--small svg-icon--red')
            #missing-segments-tooltip.tooltip-content
              %p= t('workarea.admin.shared.active_field.no_segments')

      #active-by-segment.tooltip-content
        %h3
          = inline_svg('workarea/admin/icons/user.svg', class: 'svg-icon svg-icon--small svg-icon--blue')
          = t('workarea.admin.shared.active_field.active_by_segment')
        %p= t('workarea.admin.shared.active_field.description_html', segments_path: segments_path)

        .property
          = label_tag "#{scope}_active_segment_ids", t('workarea.admin.shared.active_field.only_for'), class: 'property__name'
          = select_tag "#{scope}[active_segment_ids]", options_from_collection_for_select(segments, :id, :name, model.active_segment_ids), multiple: true, data: { select: { placeholder: t('workarea.admin.shared.active_field.select_segments'), allowClear: true, dropdownParent: '#active-by-segment' } }

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.26 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.25 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.23 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.22 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.21 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.20 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.19 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.18 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.17 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.16 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.15 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.14 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.13 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.12 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.11 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.10 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.9 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.8 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.7 app/views/workarea/admin/shared/_active_field.html.haml