ish_manager 0.1.8.220 → 0.1.8.225

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: 4876975073e83fd31af4b481785323077b766f5f010b5338337b38b8d6f07502
4
- data.tar.gz: 55bd3e1bba4f45626fcd96f7d28c3e127198d501c60f3b4bb9806a96f6ecbe62
3
+ metadata.gz: a768330e59e468bf875d1567dfe47c6394f68a5499a49b7b89f8c9d6f8420d5b
4
+ data.tar.gz: 56d32aa536a4d8026cc9fd2270dc393490261874aea5cd26a12f9a24afbdd210
5
5
  SHA512:
6
- metadata.gz: f1dd2dc7ef37ec1d64898455c009426f832c4e03794b19db00427fff1b227b3e8e32af9cdfba981f3179efed6c063283817ca1403dc0776a1591a10093e0c459
7
- data.tar.gz: a16da3139579988c8cade1ff78efc87b57ffff59448affcb621c48b8c8e2d3839d1fffde6b2322bbe011f6e791c2ada60bd075d375ed7a78bda48028e25bb78d
6
+ metadata.gz: eb5ffef746dc3ff14cf364606054e043b31397b28c81d25cdeb3840fddf3e0a742b717797b2b453f3f78b3a3e2ad4b6d413020062e15b9e64cda87adb6b756da
7
+ data.tar.gz: 0cc3783bb8eddf18ca44edf6f1986dfe4e103a2af9930ef2ecf46a1b02fbe6bc5102b1a80fb24705fcaf61fadc16cc173fcf48bb485cc1ce5fcbbe50b3e9eb42
@@ -91,9 +91,6 @@ hr {
91
91
  width: 100px;
92
92
  }
93
93
 
94
- .inline {
95
- display: inline;
96
- }
97
94
  ul.inline li {
98
95
  display: inline;
99
96
  }
@@ -1,13 +1,13 @@
1
1
  class IshManager::GalleriesController < IshManager::ApplicationController
2
2
 
3
3
  before_action :set_lists
4
-
4
+
5
5
  def index
6
6
  authorize! :index, Gallery
7
7
  @galleries = Gallery.unscoped.where( :is_trash => false, :user_profile => current_user.profile
8
8
  ).order_by( :created_at => :desc )
9
9
  if params[:q]
10
- @galleries = @galleries.where({ :name => /#{params[:q]}/i })
10
+ @galleries = @galleries.where({ :name => /#{params[:q]}/i })
11
11
  end
12
12
  @galleries = @galleries.page( params[:galleries_page] ).per( 20 )
13
13
 
@@ -16,8 +16,8 @@ class IshManager::GalleriesController < IshManager::ApplicationController
16
16
 
17
17
  def shared_with_me
18
18
  authorize! :index, Gallery
19
- @galleries = current_user.profile.shared_galleries.unscoped.where( :is_trash => false
20
- ).order_by( :created_at => :desc
19
+ @galleries = current_user.profile.shared_galleries.unscoped.where( :is_trash => false
20
+ ).order_by( :created_at => :desc
21
21
  ).page( params[:shared_galleries_page] ).per( 10 )
22
22
  render params[:render_type]
23
23
  end
@@ -68,7 +68,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
68
68
 
69
69
  # puts! params[:gallery][:shared_profiles], 'shared profiles'
70
70
  if @gallery.update_attributes( params[:gallery].permit! )
71
- new_shared_profiles = IshModels::UserProfile.find( params[:gallery][:shared_profile_ids]
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.'
@@ -78,7 +78,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
78
78
  flash[:alert] = 'No Luck. ' + @gallery.errors.messages.to_s
79
79
  render :action => :edit
80
80
  end
81
- end
81
+ end
82
82
 
83
83
  def show
84
84
  begin
@@ -2,7 +2,7 @@
2
2
  class IshManager::VideosController < IshManager::ApplicationController
3
3
 
4
4
  before_action :set_lists
5
-
5
+
6
6
  def index
7
7
  authorize! :index, Video.new
8
8
  @videos = Video.unscoped.where( is_trash: false, :user_profile => current_user.profile ).order_by( :created_at => :desc )
@@ -16,12 +16,16 @@ class IshManager::VideosController < IshManager::ApplicationController
16
16
  tag = Tag.find params[:tag_id]
17
17
  @videos = @videos.where( :tag => tag )
18
18
  end
19
-
19
+
20
20
  if params[:site_id]
21
21
  @site = Site.find params[:site_id]
22
22
  @videos = @site.videos
23
23
  end
24
-
24
+
25
+ if params[:q]
26
+ @videos = @videos.where({ :name => /#{params[:q]}/i })
27
+ end
28
+
25
29
  @videos = @videos.page( params[:videos_page] )
26
30
 
27
31
  respond_to do |format|
@@ -54,7 +58,7 @@ class IshManager::VideosController < IshManager::ApplicationController
54
58
  @tags_list = Tag.unscoped.or( { :is_public => true }, { :user_id => current_user.id } ).list
55
59
  @cities_list = City.list
56
60
  end
57
-
61
+
58
62
  def create
59
63
  @video = Video.new params[:video].permit(%i| name descr is_public is_trash is_feature x y lang youtube_id
60
64
  tags city site user_profile premium_tier premium_purchases thumb video |)
@@ -69,9 +73,9 @@ class IshManager::VideosController < IshManager::ApplicationController
69
73
  end
70
74
  end
71
75
  authorize! :create, @video
72
-
76
+
73
77
  if @video.save
74
- flash[:notice] = 'Success'
78
+ flash[:notice] = 'Success'
75
79
  redirect_to videos_path
76
80
  else
77
81
  flash[:alert] = 'No luck'
@@ -80,11 +84,12 @@ class IshManager::VideosController < IshManager::ApplicationController
80
84
  render :action => 'new'
81
85
  end
82
86
  end
83
-
87
+
84
88
  def edit
85
89
  @video = Video.unscoped.find params[:id]
90
+ @user_profiles_list = IshModels::UserProfile.list
86
91
  authorize! :edit, @video
87
-
92
+
88
93
  @tags_list = Tag.unscoped.or( { :is_public => true }, { :user_id => current_user.id } ).list
89
94
  @cities_list = City.list
90
95
  end
@@ -118,5 +123,5 @@ class IshManager::VideosController < IshManager::ApplicationController
118
123
  end
119
124
  redirect_to :action => 'index'
120
125
  end
121
-
126
+
122
127
  end
@@ -21,14 +21,13 @@
21
21
  %li{ :class => params[:controller] == 'ish_manager/videos' ? 'active' : '' }= link_to 'Videos', videos_path
22
22
  %li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
23
23
 
24
- - proc do # nothing
25
24
  %ul.nav.nav-pills
26
25
  -# %li{ :class => params[:controller] == 'ish_manager/ally' ? 'active' : '' }= link_to 'Ally', ally_root_path
27
26
  -# %li{ :class => params[:controller] == 'ish_manager/stock_actions' ? 'active' : '' }= link_to 'Stock Actions', stock_actions_path
28
27
  -# %li{ :class => params[:controller] == 'ish_manager/stock_options' ? 'active' : '' }= link_to 'Stock Options', stock_options_path
29
28
  %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches', stock_watches_path
30
- %li{ :class => params[:controller] == 'ish_manager/iron_condors' ? 'active' : '' }= link_to 'Iron Condors', iron_condors_path
31
- %li{ :class => params[:controller] == 'ish_manager/covered_calls' ? 'active' : '' }= link_to 'Covered Calls', covered_calls_path
29
+ -# %li{ :class => params[:controller] == 'ish_manager/iron_condors' ? 'active' : '' }= link_to 'Iron Condors', iron_condors_path
30
+ -# %li{ :class => params[:controller] == 'ish_manager/covered_calls' ? 'active' : '' }= link_to 'Covered Calls', covered_calls_path
32
31
 
33
32
  - proc do # nothing
34
33
  %ul.nav.nav-pills
@@ -1,6 +1,6 @@
1
1
 
2
2
  - # @TODO: definitely more abstract
3
- - path ||= galleries_path
3
+ - path ||= galleries_path
4
4
 
5
5
  = form_tag path, :method => :get, :class => :search do
6
6
  .field.search_words
@@ -3,7 +3,7 @@
3
3
  .row
4
4
  .col-sm-12.col-md-12
5
5
  %h1.center #{params[:action]} (#{@galleries.count}) #{link_to '[+]', new_gallery_path}
6
- = render 'search'
6
+ = render 'search', path: galleries_path
7
7
  %ul.menu-secondary
8
8
  %li{ class: "#{params[:render_type] == 'index_titles' ? 'active' : ''}" }
9
9
  = link_to 'titles list', galleries_index_titles_path( :render_type => Gallery::RENDER_THUMBS )
@@ -2,7 +2,7 @@
2
2
  %h5
3
3
  User Profiles (#{@user_profiles.count})
4
4
  = link_to '[+]', new_user_profile_path
5
-
5
+
6
6
 
7
7
  - @user_profiles.each do |profile|
8
8
  .panel
@@ -17,7 +17,6 @@
17
17
  %li <b>Role:</b> #{profile.role_name}
18
18
  %li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
19
19
  %li <b>City:</b> #{profile.current_city ? profile.current_city.name : nil}
20
- %li <b>About:</b> #{profile.about}
21
20
  .col-sm-8
22
21
  %h5 Shared galleries
23
22
  - profile.shared_galleries.unscoped.where( :is_trash => false ).each do |g|
@@ -1,7 +1,7 @@
1
1
 
2
2
  = form_for video do |f|
3
3
  = render 'form_errors', :item => @video
4
-
4
+
5
5
  .row
6
6
  .col-md-6
7
7
  .field
@@ -32,7 +32,10 @@
32
32
  = f.number_field :premium_tier
33
33
  .col-sm-3
34
34
  = f.label :site
35
- = select :gallery, :site_id, @sites_list
35
+ = f.select :site_id, @sites_list
36
+ .col-sm-3
37
+ = f.label :user_profile
38
+ = f.select :user_profile_id, @user_profiles_list
36
39
  .row
37
40
  .col-sm-4
38
41
  = f.check_box :is_public
@@ -6,27 +6,23 @@
6
6
  Videos (#{videos.count})
7
7
  = link_to '[+]', new_video_path
8
8
  %br
9
-
9
+
10
10
  = paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
11
-
11
+
12
12
  - videos.each do |video|
13
13
  .panel
14
14
  .panel-content
15
15
  .row
16
- .col-xs-12.col-sm-6
17
- .center
16
+ .col-sm-6
17
+ .float-left
18
+ .thumb= image_tag video.thumb.url(:thumb)
19
+ .a
18
20
  = link_to video.name, video_path( video )
19
21
  .inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
20
22
  = link_to '[~]', edit_video_path( video )
21
- = render 'meta', :item => video
22
- = image_tag video.thumb.url(:thumb)
23
- .col-xs-12.col-sm-6
24
- .center
25
- - if @current_user.profile.videos_embed
26
- = render 'ish_manager/videos/embed', :video => video
27
- - else
28
- = render 'ish_manager/videos/preview', :video => video
29
-
23
+ = render 'meta', :item => video
24
+ .c
25
+
30
26
  = paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
31
27
  %hr
32
28
 
@@ -1,4 +1,6 @@
1
1
 
2
2
  = render 'ish_manager/sites/header', :site => @site if @site
3
- = render 'index', :videos => @videos
4
3
 
4
+ = render 'search', path: videos_path
5
+
6
+ = render 'index', :videos => @videos
@@ -15,4 +15,6 @@
15
15
  %hr
16
16
  = link_to @video.video.url, @video.video.url
17
17
 
18
- -# = render 'disqus'
18
+ %p <b>User Profile:</b> #{@video.user_profile.name}
19
+
20
+ = @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.220
4
+ version: 0.1.8.225
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-25 00:00:00.000000000 Z
11
+ date: 2020-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails