Sha256: e72ead028f1c1aa201d3f352a54a05b10ddf5dd7e9c932c34ba7be60dfb16c4f

Contents?: true

Size: 1.43 KB

Versions: 31

Compression:

Stored size: 1.43 KB

Contents

- if defined? site
  - edit_url     = ->(n) { edit_site_newsitem_path( site, n ) }
  - delete_url   = ->(n) { site_newsitem_path( site, n ) }
  - new_newsitem = new_site_newsitem_path( site.id )
- if defined? city
  - edit_url     = ->(n) { edit_city_newsitem_path( city, n ) }
  - delete_url   = ->(n) { city_newsitem_path( city, n ) }
  - new_newsitem = new_city_newsitem_path( city.id )
- if defined?( tag ) && tag.class.name == 'Tag'
  - edit_url     = ->(n) { edit_tag_newsitem_path( tag, n ) }
  - delete_url   = ->(n) { tag_newsitem_path( tag, n ) }
  - new_newsitem = new_tag_newsitem_path( tag.id )

- newsitems = newsitems.page( params[:newsitems_page] ).per( 10 )

.manager-newsitems--index
  .row
    .col-sm-12
      %h3 Newsitems (#{newsitems.count}) #{link_to image_new, new_newsitem }
      = paginate newsitems, :param_name => 'newsitems_page', :views_prefix => 'ish_manager'
      - newsitems.each do |n|
        .panel
          .panel-body
            %ul
              %li
                = link_to '[~]', edit_url.call( n )
                = button_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
                Name: #{n.name}
                Desc: #{n.descr}
              %li Report id: #{n.report_id}
              %li Gallery id: #{n.gallery_id}
              - if n.photo
                %li Photo id: #{n.photo.id}
            = render 'ish_manager/newsitems/item', :newsitem => n
  %hr

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
ish_manager-0.1.8.192 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.188 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.182 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.181 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.180 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.179 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.178 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.177 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.176 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.173 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.172 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.171 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.166 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.165 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.161 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.162 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.160 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.159 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.158 app/views/ish_manager/newsitems/_index.haml
ish_manager-0.1.8.157 app/views/ish_manager/newsitems/_index.haml