Sha256: b8fdf8ec0d37ee9d02c1445bbe60938304dc3800f6b244140992e5738048369a

Contents?: true

Size: 658 Bytes

Versions: 7

Compression:

Stored size: 658 Bytes

Contents

- return unless @site.is_mirrored?

- object ||= nil
  
- options = case object
  - when ::Cms::Layout
    - object.mirrors.collect{|m| [m.site.label, edit_admin_cms_site_layout_path(m.site, m)]}
  - when ::Cms::Page
    - object.mirrors.collect{|m| [m.site.label, edit_admin_cms_site_page_path(m.site, m)]}
  - when ::Cms::Snippet
    - object.mirrors.collect{|m| [m.site.label, edit_admin_cms_site_snippet_path(m.site, m)]}
  - else
    - (::Cms::Site.mirrored - [@site]).collect{|s| [s.label, url_for(params.merge(:site_id => s))]}

- options = [[@site.label, request.fullpath]] + options

#mirrors.box
  = select_tag :mirror, options_for_select(options)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.11.2 app/views/admin/cms/sites/_mirrors.html.haml
comfortable_mexican_sofa-1.11.1 app/views/admin/cms/sites/_mirrors.html.haml
comfortable_mexican_sofa-1.11.0 app/views/admin/cms/sites/_mirrors.html.haml
comfortable_mexican_sofa-1.10.3 app/views/admin/cms/sites/_mirrors.html.haml
comfortable_mexican_sofa-1.10.2 app/views/admin/cms/sites/_mirrors.html.haml
comfortable_mexican_sofa-1.10.1 app/views/admin/cms/sites/_mirrors.html.haml
comfortable_mexican_sofa-1.10.0 app/views/admin/cms/sites/_mirrors.html.haml