Sha256: 3182bf7820968fb6ccd62e6fe19f23fe0403b78d783b0865e5f7356f7a157bc4

Contents?: true

Size: 1.09 KB

Versions: 30

Compression:

Stored size: 1.09 KB

Contents

-#
-# wco / galleries / _index.haml
-#
-# _vp_ 2022-09-25 :: Small styling revision
-#

- n_thumbs  ||= 12
- galleries ||= @galleries

.galleries--index.maxwidth
  = render 'header', galleries: galleries

  .padded
    - if galleries.length > 0

      - if galleries.respond_to? :total_pages
        = paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'

      .row
        - galleries.each do |g|
          .col-sm-12.col-md-6
            .Card
              %h5
                = link_to '[~]', edit_gallery_path( g )
                = link_to g.name, gallery_path(g.slug)
                (#{g.photos.length})
              = render 'meta', item: g
              - if g.photos.length == 0
                No Photos
              - else
                .flex-row
                  - g.photos.limit( n_thumbs ).each do |photo|
                    = link_to image_tag(photo.photo.url(:thumb), :alt => g.name), gallery_path(g.slug)

      - if galleries.respond_to? :total_pages
        = paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'

    - else
      %h5 No Galleries

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wco_models-3.1.0.67 app/views/wco/galleries/_index.haml
wco_models-3.1.0.66 app/views/wco/galleries/_index.haml
wco_models-3.1.0.65 app/views/wco/galleries/_index.haml
wco_models-3.1.0.64 app/views/wco/galleries/_index.haml
wco_models-3.1.0.63 app/views/wco/galleries/_index.haml
wco_models-3.1.0.62 app/views/wco/galleries/_index.haml
wco_models-3.1.0.61 app/views/wco/galleries/_index.haml
wco_models-3.1.0.60 app/views/wco/galleries/_index.haml
wco_models-3.1.0.59 app/views/wco/galleries/_index.haml
wco_models-3.1.0.58 app/views/wco/galleries/_index.haml
wco_models-3.1.0.57 app/views/wco/galleries/_index.haml
wco_models-3.1.0.56 app/views/wco/galleries/_index.haml
wco_models-3.1.0.55 app/views/wco/galleries/_index.haml
wco_models-3.1.0.54 app/views/wco/galleries/_index.haml
wco_models-3.1.0.53 app/views/wco/galleries/_index.haml
wco_models-3.1.0.52 app/views/wco/galleries/_index.haml
wco_models-3.1.0.51 app/views/wco/galleries/_index.haml
wco_models-3.1.0.50 app/views/wco/galleries/_index.haml
wco_models-3.1.0.49 app/views/wco/galleries/_index.haml
wco_models-3.1.0.48 app/views/wco/galleries/_index.haml