Sha256: aeda16c07ee40c737db7d84dbbe7039f2d19975acf48f33e188d49dba53fb89d

Contents?: true

Size: 437 Bytes

Versions: 6

Compression:

Stored size: 437 Bytes

Contents

- unless current_user.site
  %label{:for=>'layout_site_id', :class => 'admin_only'}
    Site
    :ruby
      user_sites = current_user.admins_sites.pluck(:site_id)
      sites = Site.where(:id => user_sites).map { |s| [s.name, s.id] }
      selection = {:include_blank => Layout.is_shareable?}
      selection[:selected] = current_site.id if @layout.new_record? && ! Layout.is_shareable?
    = select :layout, :site_id, sites, selection

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trusty-cms-7.0.8 app/views/admin/layouts/_choose_site.html.haml
trusty-cms-7.0.7 app/views/admin/layouts/_choose_site.html.haml
trusty-cms-7.0.6 app/views/admin/layouts/_choose_site.html.haml
trusty-cms-7.0.5 app/views/admin/layouts/_choose_site.html.haml
trusty-cms-7.0.4 app/views/admin/layouts/_choose_site.html.haml
trusty-cms-7.0.3 app/views/admin/layouts/_choose_site.html.haml