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.6 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.5 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.4 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.3 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.2 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.1 app/views/workarea/admin/shared/_active_field.html.haml
workarea-admin-3.5.0 app/views/workarea/admin/shared/_active_field.html.haml