Sha256: c9a47433c1662975c2954a1136818ff78c21c8bf6b41fec565a339036dec4cbe

Contents?: true

Size: 1002 Bytes

Versions: 16

Compression:

Stored size: 1002 Bytes

Contents

#
# ishapi / newsitems / _index
#

json.n_newsitems newsitems.count
json.newsitems do
  json.array! newsitems do |item|
    if item.gallery
      json.item_type  'gallery' #@TODO: should be a constant
      json.name        item.gallery.name
      json.galleryname item.gallery.galleryname
     
      json.partial!    'ishapi/application/meta', :item => item.gallery
      json.partial!    'ishapi/photos/index',     :photos => item.gallery.photos.limit( 6 )
    end
    if item.report
      json.item_type  'report'
      json.name       item.report.name
      json.reportname item.report.name_seo
      json.report_id  item.report_id.to_s
    end
    if item.video
      json.partial! 'ishapi/videos/show', :video => item.video
    
      json.item_type  'video'
      json.name       item.video.name
      json.descr      item.video.descr
      json.x          item.video.x
      json.y          item.video.y
      json.youtube_id item.video.youtube_id
    end
    json.descr item.descr
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ishapi-0.1.8.30 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.29 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.28 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.27 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.26 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.25 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.24 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.23 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.22 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.21 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.20 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.19 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.18 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.17 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.16 app/views/ishapi/newsitems/_index.jbuilder
ishapi-0.1.8.15 app/views/ishapi/newsitems/_index.jbuilder