ish_manager 0.1.8.126 → 0.1.8.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d85e73c7cdda6c1c2e8acd4e98e01db1b4204666
4
- data.tar.gz: 720f00317d0fa9d4dc4cb3240925c006389621cd
3
+ metadata.gz: 5effae3cf5bbcee5c9c0e8bf41f732494ff184a8
4
+ data.tar.gz: 6d7826b81426a06b3f6fd3fa7f45dfbd5946bf9f
5
5
  SHA512:
6
- metadata.gz: a7952405a55cd7aea0194fd2a9628b3757450f7975aeb57df246a19dce91c681acc944800273d78c4c701d9a0a45ee5e37c8ae97cb7cbc781a39737b3d35c61d
7
- data.tar.gz: fa6020ad3d65e87b3d5c7218d06090c714d712c4a5d98c7c37cbf853809f88c6dfe74979302d68d1819ee73e987d7176b16cf8bad3b1df81edbf40f55110f698
6
+ metadata.gz: 2f2a1086da0c4cc5a2c5b41384536266dd114feea20611c4872885ec6cb70bf94b3399bc41e518c42a75fe9bc3ae6eac32e6d4c5c943626017165774d2bcca96
7
+ data.tar.gz: '031960e2f6e0d92f2bc1008971d8032efc86161fbed7d8b80de298822e5c10a67e0d6303aedf43752025418b207a0a77ad38e20843a7accad8a537d677069aaa'
@@ -2,19 +2,7 @@ class IshManager::SitesController < IshManager::ApplicationController
2
2
 
3
3
  def index
4
4
  authorize! :sites_index, ::Manager
5
- sites = Site.where( :is_trash => false ).order_by( :domainname => :desc, :lang => :desc )
6
- @site_groups = []
7
- site_group = nil
8
- previous_domain = nil
9
- sites.each do |site|
10
- if previous_domain == site.domain
11
- site_group.push site
12
- else
13
- previous_domain = site.domain
14
- @site_groups.push( site_group ) if !site_group.blank?
15
- site_group = [ site ]
16
- end
17
- end
5
+ @site_groups = Site.where( :is_trash => false ).order_by( :lang => :desc ).group_by {|s|s.domain}
18
6
  end
19
7
 
20
8
  # not trash
@@ -1,11 +1,14 @@
1
1
 
2
2
  - per_row = 2
3
+
3
4
  .sites-index
4
5
  %h3
5
6
  Sites
6
7
  = link_to raw('<i class="fa fa-plus-square"></i>'), new_site_path
7
8
  .row
8
- - @site_groups.each_with_index do |sites, index|
9
+ - counter = 0
10
+ - @site_groups.each do |domain, sites|
11
+ - counter +=1
9
12
  .col-xs-12{ :class => "col-sm-#{12/per_row}" }
10
13
  .panel.panel-primary
11
14
  .panel-body
@@ -14,6 +17,6 @@
14
17
  = link_to "#{site.domain}/#{site.lang}", site_path( site )
15
18
  = link_to edit_img, edit_site_path( site )
16
19
  (R#{site.reports.count}) (G#{site.galleries.count}) (V#{site.videos.count})
17
- - if (index + 1 ) % per_row == 0
20
+ - if counter % per_row == 0
18
21
  .clearfix
19
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.126
4
+ version: 0.1.8.127
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox