ish_manager 0.1.8.228 → 0.1.8.233

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: 0bcf03d88d7f1af8455dc7bc3ce17fce365eeb95d9fbc7ed16168122557035dc
4
- data.tar.gz: 61ddd32c62730cb184b02f859247ad1e9c147fd6b7d7d9e71ad9740c809b01e1
3
+ metadata.gz: f17a92c8d618a6bd6319320ee036ecbe43d8926630f1a077cc91e963507dcb4b
4
+ data.tar.gz: 601a974e35562b98b15ebad0fb307e7b9f557d687bc17977ad2268c10e4f9192
5
5
  SHA512:
6
- metadata.gz: 400f1b581a783e233e6fb37e26a19c4945b411992a7b5ed8634d3db44770a79122d2f2c29e889b6f6cc7c0b6a4865fedbeeb874d399e18b77531d2698a6b637f
7
- data.tar.gz: 984e51434aff689569fc61dd2b1a64135c95215313d5955637a848b8f4c58a452ee061860056b5f52182ddc67faddf3d1f7e821d393d615fede7b11d358f23af
6
+ metadata.gz: 2e287c543f3dea2c784b0df34ce79d7c50f2a84c387c1c8eb4ef46eedfd43ee9fe8a63a1dc6eae8a6351cbb951902578c53d048986bfe679b34d02bd48f409f7
7
+ data.tar.gz: 7d9de92299c327c44172abd06a73c331d5e0c2317a929d217af9aed9c1777c504b9e8174975d77e08c382efb6536f368b985dbab888895934e08ac1d8ab76021
@@ -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,7 +61,7 @@ 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('')
64
+ params[:gallery][:tag_ids].delete('') if params[:gallery][:tag_ids]
65
65
 
66
66
  params[:gallery][:shared_profiles].delete('')
67
67
  params[:gallery][:shared_profile_ids] = params[:gallery][:shared_profiles]
@@ -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
@@ -0,0 +1,4 @@
1
+
2
+ <div class="video-embed-half">
3
+ <iframe width="200" height="150" src="//www.youtube.com/embed/<%= video.youtube_id %>" frameborder="0" allowfullscreen></iframe>
4
+ </div>
@@ -15,7 +15,12 @@
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.present?
19
+ -## doesn't work with private videos, which are most
20
+ -# .thumb-youtube= image_tag "https://img.youtube.com/vi/#{video.youtube_id}/1.jpg"
21
+ = render 'embed_mini', video: video
22
+ - else
23
+ .thumb= image_tag video.thumb.url(:thumb)
19
24
  .a
20
25
  = link_to video.name, video_path( video )
21
26
  .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
@@ -16,5 +16,5 @@
16
16
  = link_to @video.video.url, @video.video.url
17
17
 
18
18
  %p <b>User Profile:</b> #{@video.user_profile.name}
19
-
20
- = @video.inspect
19
+ %p= image_tag @video.thumb.url(:thumb)
20
+ %p <b>Video:</b> #{@video.inspect}
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.228
4
+ version: 0.1.8.233
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-26 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
@@ -354,6 +354,7 @@ files:
354
354
  - app/views/ish_manager/venues/show.haml
355
355
  - app/views/ish_manager/videos/_embed.erb
356
356
  - app/views/ish_manager/videos/_embed_half.erb
357
+ - app/views/ish_manager/videos/_embed_mini.erb
357
358
  - app/views/ish_manager/videos/_form.haml
358
359
  - app/views/ish_manager/videos/_index.haml
359
360
  - app/views/ish_manager/videos/_index_title.haml