ish_manager 0.1.8.226 → 0.1.8.231

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85b4cab8bd5d1cd3c1774dee82948ee0d59b3ef4d28d13acdab2e2208771b05a
4
- data.tar.gz: 38fb5c28ff903e6fcca7201452c627565788a13615c6c28a709668d2015c7226
3
+ metadata.gz: fa8c2d18f5b3b0f48bd15a601362e75d2790b11e49b7781ee4e70fb2a4e5088c
4
+ data.tar.gz: 29bb625a7e3541bb7929f235ee5c29b348a62bfe4c762e57118f1ba57dc780ec
5
5
  SHA512:
6
- metadata.gz: 29f1dddb16814fa2ac28444b494a284fca08a4acd80049d5d4187c47215a773d4fdfe0acc3500de83e66fe3c283946e73dc86833085c12caf0ffd795322905b7
7
- data.tar.gz: 66c57c05133f55095b575aa5856f84bb839b14d4555955e7c55b4be141e756cbfb63b842f8cc3762a26085b31e9808da72668dbd3da9b2c5d3ca38130d58667f
6
+ metadata.gz: f41c276c49a17f4255089ff57197dd3f807584e8c0441fa75587eb76c0de596418b58dff96a7344cce12cece15fe102c3a6f658d15b603ceeb12f01bf0d3f5b6
7
+ data.tar.gz: 4198f92d62880365f251c01346ad743bdf0593294f2b7123d4bb44a0fecd1554af2824a0032e125e41a48f58b1579369caa4083212d0011386d6d27164821ef1
@@ -15,8 +15,10 @@
15
15
  height: 100%;
16
16
  background-repeat: no-repeat;
17
17
  background-position: center center;
18
+ background-size: contain;
18
19
  }
19
20
 
20
21
  .large-photos .item .wrapper img {
21
22
  max-height: 100%;
23
+ max-width: 100%;
22
24
  }
@@ -63,7 +63,7 @@ module IshManager
63
63
  end
64
64
  # redirect_to resource_path( @resource )
65
65
  end
66
-
66
+
67
67
  def resource_path resource
68
68
  case resource.class.name
69
69
  when 'City'
@@ -61,18 +61,18 @@ class IshManager::GalleriesController < IshManager::ApplicationController
61
61
  old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
62
62
  authorize! :update, @gallery
63
63
 
64
+ params[:gallery][:tag_ids].delete('') if params[:gallery][:tag_ids]
65
+
64
66
  params[:gallery][:shared_profiles].delete('')
65
- # params[:gallery][:shared_profiles] = IshModels::UserProfile.find( params[:gallery][:shared_profiles] ).to_a
66
67
  params[:gallery][:shared_profile_ids] = params[:gallery][:shared_profiles]
67
68
  params[:gallery].delete :shared_profiles
68
69
 
69
- # puts! params[:gallery][:shared_profiles], 'shared profiles'
70
70
  if @gallery.update_attributes( params[:gallery].permit! )
71
71
  new_shared_profiles = IshModels::UserProfile.find( params[:gallery][:shared_profile_ids]
72
72
  ).select { |p| !old_shared_profile_ids.include?( p.id ) }
73
73
  ::IshManager::ApplicationMailer.shared_galleries( new_shared_profiles, @gallery ).deliver
74
74
  flash[:notice] = 'Success.'
75
- redirect_to galleries_path
75
+ redirect_to gallery_path(@gallery)
76
76
  else
77
77
  puts! @gallery.errors.messages, 'cannot save gallery'
78
78
  flash[:alert] = 'No Luck. ' + @gallery.errors.messages.to_s
@@ -1,5 +1,11 @@
1
+
1
2
  class IshManager::SitesController < IshManager::ApplicationController
2
-
3
+
4
+ ## params:
5
+ ## :domain, :lang, :title, :subhead, :description, :homepage_layout, :layout,
6
+ ## :n_features, :n_newsitems, :newsitems_per_page, :is_trash, :is_ads_enabled,
7
+ ## :is_private, :play_videos_in_preview, :private_user_emails,
8
+
3
9
  def index
4
10
  authorize! :sites_index, ::Manager
5
11
  @site_groups = Site.where( :is_trash => false ).order_by( :lang => :desc ).group_by {|s|s.domain}
@@ -26,14 +32,15 @@ class IshManager::SitesController < IshManager::ApplicationController
26
32
  @site = Site.unscoped.find params[:id]
27
33
  authorize! :update, @site
28
34
  end
29
-
35
+
30
36
  def new
31
- authorize! :new, Site.new
32
37
  @site = Site.new
38
+ authorize! :new, @site
33
39
  end
34
40
 
35
41
  def create
36
42
  authorize! :create, Site.new
43
+ params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ") if params[:site][:private_user_emails]
37
44
  @site = Site.new params[:site].permit!
38
45
  if @site.save
39
46
  flash[:notice] = 'Success'
@@ -46,7 +53,7 @@ class IshManager::SitesController < IshManager::ApplicationController
46
53
  def update
47
54
  @site = Site.unscoped.find params[:id]
48
55
  authorize! :update, @site
49
-
56
+
50
57
  params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ")
51
58
 
52
59
  if @site.update_attributes params[:site].permit!
@@ -57,9 +64,9 @@ class IshManager::SitesController < IshManager::ApplicationController
57
64
  redirect_to sites_path
58
65
  end
59
66
 
60
- def newsitem_delete
67
+ def newsitem_delete
61
68
  @site = Site.find params[:site_id]
62
- authorize! :update, @site
69
+ authorize! :update, @site
63
70
  n = @site.newsitems.find( params[:newsitem_id] )
64
71
  n.delete
65
72
  @site.touch
@@ -8,7 +8,7 @@ class IshManager::Ability
8
8
  # signed in user
9
9
  #
10
10
  unless user.blank?
11
-
11
+
12
12
  #
13
13
  # only sudoer... total power
14
14
  #
@@ -17,7 +17,7 @@ class IshManager::Ability
17
17
  end
18
18
 
19
19
  can [ :home ], ::IshManager::Ability
20
-
20
+
21
21
  #
22
22
  # role admin
23
23
  #
@@ -34,7 +34,7 @@ class IshManager::Ability
34
34
  can [ :edit, :update ], ::Gallery do |g|
35
35
  !g.is_trash && ( g.is_public || g.user_profile == user.profile )
36
36
  end
37
-
37
+
38
38
  can [ :cities_index, :home, :sites_index ], ::Manager
39
39
 
40
40
  can [ :new ], Newsitem
@@ -44,7 +44,7 @@ class IshManager::Ability
44
44
  !g.is_trash && ( g.is_public || g.user_profile == user.profile )
45
45
  end
46
46
 
47
- can [ :show, :edit, :update, :create_newsitem, :new_feature, :create_feature, :newsitems_index ], ::Site do |site|
47
+ can [ :new, :show, :edit, :update, :create_newsitem, :new_feature, :create_feature, :newsitems_index ], ::Site do |site|
48
48
  !site.is_private && !site.is_trash
49
49
  end
50
50
  can [ :manage ], Ish::StockWatch
@@ -85,15 +85,16 @@ class IshManager::Ability
85
85
  # can [ :index ], ::Report
86
86
 
87
87
  # can [ :index ], ::Video
88
-
88
+
89
89
  end
90
90
 
91
91
  end
92
+
92
93
  #
93
94
  # anonymous user
94
95
  #
95
96
  user ||= ::User.new
96
-
97
+
97
98
  can [ :show ], ::Gallery do |gallery|
98
99
  gallery.is_public
99
100
  end
@@ -101,6 +102,6 @@ class IshManager::Ability
101
102
  can [ :show ], ::Report do |report|
102
103
  report.is_public
103
104
  end
104
-
105
+
105
106
  end
106
107
  end
@@ -35,8 +35,6 @@
35
35
  - @photos.each do |photo|
36
36
  .item
37
37
  %a{id: "large_#{photo.id}" }
38
- -# .wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
39
- .wrapper
40
- = button_to '[x]', photo_path( :id => photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
41
- = image_tag photo.photo.url(:large)
42
- = link_to "large", photo.photo.url(:large)
38
+ .float-left= button_to '[x]', photo_path( :id => photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
39
+ = link_to "large", photo.photo.url(:large)
40
+ .wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
@@ -2,33 +2,31 @@
2
2
  -# ish_manager / tags / show
3
3
 
4
4
  - content_for :title do
5
- Topic #{@tag.name}
6
-
5
+ Tag #{@tag.name}
6
+
7
7
  .row
8
8
  .col-sm-12
9
9
  %h5.center
10
10
  Tag
11
11
  = @tag.name
12
12
  = link_to image_edit, edit_tag_path( @tag )
13
- -# = link_to_delete( @tag )
14
- .inline= button_to 'X', tag_path( @tag ), :method => :delete, :data => { :confirm => 'Are you sure?' }
15
- -# = render 'ads/leaderboard'
13
+ .inline= button_to 'X', tag_path( @tag ), :method => :delete, :data => { :confirm => 'Are you sure?' }
16
14
  -# .descr= @tag.descr # I don't wanna show this every time to everyone, they know what they are here for.
17
- = render 'ish_manager/features/index', :features => @tag.features[0, Tag.n_features]
18
-
15
+ -# = render 'ish_manager/features/index', :features => @tag.features[0, Tag.n_features]
16
+
17
+ - proc do # nothing
18
+ .row
19
+ .col-sm-12
20
+ = render 'ish_manager/newsitems/index', :newsitems => @tag.newsitems, :resource => @tag, :tag => @tag
21
+
19
22
  .row
20
23
  .col-sm-12
21
- = render 'ish_manager/newsitems/index', :newsitems => @tag.newsitems, :resource => @tag, :tag => @tag
22
-
23
- .row
24
- .col-sm-6
25
24
  = render 'ish_manager/reports/index', :reports => @tag.reports, :n_ads => 0
26
-
27
- .col-sm-6
25
+
26
+ .row
27
+ .col-sm-12
28
28
  = render 'ish_manager/galleries/index_title', :galleries => @galleries, :n_thumbs => 4
29
-
29
+
30
30
  .row
31
- .col-sm-6
31
+ .col-sm-12
32
32
  = render 'ish_manager/videos/index_title', :videos => @videos
33
- .col-sm-6
34
- %h5 Here, nothing yet
@@ -15,7 +15,10 @@
15
15
  .row
16
16
  .col-sm-6
17
17
  .float-left
18
- .thumb= image_tag video.thumb.url(:thumb)
18
+ - if video.youtube_id
19
+ .thumb-youtube= image_tag "https://img.youtube.com/vi/#{video.youtube_id}/1.jpg"
20
+ - else
21
+ .thumb= image_tag video.thumb.url(:thumb)
19
22
  .a
20
23
  = link_to video.name, video_path( video )
21
24
  .inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
@@ -1,6 +1,7 @@
1
1
 
2
- = render 'ish_manager/sites/header', :site => @site if @site
2
+ .videos-index
3
+ = render 'ish_manager/sites/header', :site => @site if @site
3
4
 
4
- = render 'search', path: videos_path
5
+ = render 'search', path: videos_path
5
6
 
6
- = render 'index', :videos => @videos
7
+ = render 'index', :videos => @videos
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.226
4
+ version: 0.1.8.231
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-25 00:00:00.000000000 Z
11
+ date: 2021-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails