ish_manager 0.1.8.216 → 0.1.8.221

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
  SHA256:
3
- metadata.gz: 1b5a6397946f98611b448657c8ae78a4f18012c40b2e3cc696eed13b7acb78f4
4
- data.tar.gz: 046eddb0c9c5876f8fbceae118e373ee02997db43ad1ccf83b49c0c1cd064b7e
3
+ metadata.gz: 51f674f0353e8b9c333c9a984c39b0ffbc3a8add7548125a37b61a959d941bab
4
+ data.tar.gz: 4e00972b73af87a2adf88bd80465082952e34b42320336771ca8d5a2ad504dac
5
5
  SHA512:
6
- metadata.gz: 1b9ce87b17e16bd5e409cc146f7f41cf3aa8881afe9485e0040042d8342193d81845c2cb3ca389dce1508a7182c670053d6a7054a895753fa782ce11ae4e17dd
7
- data.tar.gz: fe37678bcf85c80b629afa1aecdf09544a1267953dcd45ece3c3999386d24533a0f054f2db9d83b18027fc3d539e90465007c5206387aac958e41e314e171806
6
+ metadata.gz: 39be779fd1aa26366ba966cef841b3d7bcc57096f6b885064322c2603a9f06c3b987577f6123936b788ff7a3a85f085d2fbe0a429ec5e8cda84a387c74778749
7
+ data.tar.gz: fe99f72254c7fd87f63768df7b825798b69c458828dbe26138b9942ae7461d9e2b63a50913d6e0801bf0da8ccd7f0e61b0602349479edb4f342c87208b3fd80b
@@ -16,6 +16,7 @@
16
16
  *= require ish_manager/maps
17
17
  *= require ish_manager/utils
18
18
  *= require ish_manager/jquery-ui
19
+ *= require ish_manager/galleries
19
20
  */
20
21
 
21
22
 
@@ -58,7 +59,7 @@ hr {
58
59
  border: 1px solid red;
59
60
  width: 100px;
60
61
  height: 100px;
61
- }
62
+ }
62
63
  .large-photos img {
63
64
  width: 100%;
64
65
  }
@@ -90,9 +91,6 @@ hr {
90
91
  width: 100px;
91
92
  }
92
93
 
93
- .inline {
94
- display: inline;
95
- }
96
94
  ul.inline li {
97
95
  display: inline;
98
96
  }
@@ -117,7 +115,7 @@ ul.inline li {
117
115
  }
118
116
 
119
117
  /**
120
- * manager...
118
+ * manager...
121
119
  */
122
120
 
123
121
  .manager--main-header {
@@ -0,0 +1,22 @@
1
+
2
+ .large-photos .item {
3
+ border: 1px solid red;
4
+ display: block;
5
+
6
+ padding: 10px;
7
+ margin: 10px;
8
+
9
+ height: 100vh;
10
+ max-width: 100vw;
11
+ }
12
+
13
+ .large-photos .item .wrapper {
14
+ width: 100%;
15
+ height: 100%;
16
+ background-repeat: no-repeat;
17
+ background-position: center center;
18
+ }
19
+
20
+ .large-photos .item .wrapper img {
21
+ max-height: 100%;
22
+ }
@@ -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
@@ -3,7 +3,7 @@ class IshManager::PhotosController < IshManager::ApplicationController
3
3
 
4
4
  # @TODO: this is bad? _vp_ 20170513
5
5
  skip_authorization_check :only => [ :j_create ]
6
- protect_from_forgery :except => [ :j_create]
6
+ protect_from_forgery :except => [ :j_create]
7
7
 
8
8
  def without_gallery
9
9
  @photos = Photo.unscoped.where( :gallery => nil, :is_trash => false )
@@ -12,10 +12,14 @@ class IshManager::PhotosController < IshManager::ApplicationController
12
12
  def destroy
13
13
  @photo = Photo.unscoped.find params[:id]
14
14
  authorize! :destroy, @photo
15
- g = @photo.gallery
15
+ @photo.gallery.touch if @photo.gallery
16
16
  @photo.is_trash = true
17
- @photo.save
18
- g.touch
17
+ flag = @photo.save
18
+ if flag
19
+ flash[:notice] = "Success"
20
+ else
21
+ flash[:alert] = "No luck: #{@photo.errors.messages}"
22
+ end
19
23
  redirect_to request.referrer || root_path
20
24
  end
21
25
 
@@ -36,9 +40,9 @@ class IshManager::PhotosController < IshManager::ApplicationController
36
40
  authorize! :create_photo, gallery
37
41
 
38
42
  @photo = Photo.new params[:photo].permit!
39
- @photo.is_public = true
43
+ @photo.is_public = true
40
44
  @photo.gallery = gallery
41
-
45
+
42
46
  # cache
43
47
  @photo.gallery.site.touch if @photo.gallery.site
44
48
  @photo.gallery.city.touch if @photo.gallery.city
@@ -55,7 +59,7 @@ class IshManager::PhotosController < IshManager::ApplicationController
55
59
  }
56
60
  render :json => [ j ]
57
61
  else
58
- render :json => { "errors" => @photo.errors }
62
+ render :json => { "errors" => @photo.errors }
59
63
  end
60
64
  end
61
65
 
@@ -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,11 @@ 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]
86
90
  authorize! :edit, @video
87
-
91
+
88
92
  @tags_list = Tag.unscoped.or( { :is_public => true }, { :user_id => current_user.id } ).list
89
93
  @cities_list = City.list
90
94
  end
@@ -118,5 +122,5 @@ class IshManager::VideosController < IshManager::ApplicationController
118
122
  end
119
123
  redirect_to :action => 'index'
120
124
  end
121
-
125
+
122
126
  end
@@ -14,13 +14,14 @@
14
14
  %li{ :class => params[:controller] == 'ish_manager/friends ' ? 'active' : '' }= link_to 'Friends', friends_path
15
15
 
16
16
  %ul.nav.nav-pills
17
- %li{ class: params[:controller] == 'ish_manager/newsitems' ? 'active' : '' }= link_to '+Newsitem', new_newsitem_path
17
+ %li{ class: params[:controller] == 'ish_manager/newsitems' ? 'active' : '' }= link_to '+Newsitem', new_newsitem_path
18
18
  %li{ :class => params[:controller] == 'ish_manager/sites' ? 'active' : '' }= link_to 'Sites', sites_path
19
19
  %li{ :class => params[:controller] == 'ish_manager/galleries' ? 'active' : '' }= link_to 'Galleries', galleries_path
20
20
  %li{ :class => params[:controller] == 'ish_manager/reports' ? 'active' : '' }= link_to 'Reports', reports_path
21
21
  %li{ :class => params[:controller] == 'ish_manager/videos' ? 'active' : '' }= link_to 'Videos', videos_path
22
- %li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
22
+ %li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
23
23
 
24
+ - proc do # nothing
24
25
  %ul.nav.nav-pills
25
26
  -# %li{ :class => params[:controller] == 'ish_manager/ally' ? 'active' : '' }= link_to 'Ally', ally_root_path
26
27
  -# %li{ :class => params[:controller] == 'ish_manager/stock_actions' ? 'active' : '' }= link_to 'Stock Actions', stock_actions_path
@@ -29,16 +30,18 @@
29
30
  %li{ :class => params[:controller] == 'ish_manager/iron_condors' ? 'active' : '' }= link_to 'Iron Condors', iron_condors_path
30
31
  %li{ :class => params[:controller] == 'ish_manager/covered_calls' ? 'active' : '' }= link_to 'Covered Calls', covered_calls_path
31
32
 
33
+ - proc do # nothing
32
34
  %ul.nav.nav-pills
33
35
  %li{ :class => params[:controller] == 'ish_manager/invoices' ? 'active' : '' }= link_to 'Invoices', invoices_path
34
36
  %li{ :class => params[:controller] == 'ish_manager/payments' ? 'active' : '' }= link_to 'Payments', payments_path
35
37
  %li{ :class => params[:controller] == 'ish_manager/orders' ? 'active' : '' }= link_to 'Orders', orders_path
36
38
  -# %li{ :class => params[:controller] == 'ish_manager/co_tailors' ? 'active' : '' }= link_to 'Co Tailors', co_tailors_path
37
39
 
40
+ - proc do # nothing
38
41
  %ul.nav.nav-pills
39
42
  %li{ :class => params[:controller] == 'ish_manager/leads' ? 'active' : '' }= link_to 'Leads', leads_path
40
43
  %li{ :class => params[:controller] == 'ish_manager/campaigns' ? 'active' : '' }= link_to 'Campaigns', campaigns_path
41
-
42
-
44
+
45
+
43
46
  %hr
44
47
 
@@ -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
@@ -0,0 +1 @@
1
+ = render 'ish_manager/galleries/index'
@@ -0,0 +1 @@
1
+ = render 'ish_manager/galleries/index'
@@ -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 )
@@ -3,7 +3,8 @@
3
3
  .col-xs-12
4
4
  .center
5
5
  %h2
6
- #{gallery.name} (#{gallery.photos.length})
6
+ = link_to gallery.name, gallery_path(gallery)
7
+ (#{gallery.photos.length})
7
8
  = link_to '[~]', edit_gallery_path( gallery )
8
9
  [x]
9
10
  galleryname :: #{gallery.galleryname}
@@ -1,5 +1,5 @@
1
1
 
2
- = render 'title', :gallery => @gallery
2
+ = render 'title', :gallery => @gallery
3
3
  = render 'form', :gallery => @gallery, :url => gallery_path( @gallery )
4
4
  = render 'thumbs', :gallery => @gallery
5
5
  = render 'ish_manager/photos/multinew', :gallery => @gallery
@@ -1,5 +1,6 @@
1
1
 
2
2
  = render 'title', :gallery => @gallery
3
+ = render 'ish_manager/photos/multinew', :gallery => @gallery
3
4
 
4
5
  -# deleted
5
6
  .row
@@ -32,6 +33,6 @@
32
33
  .center.large-photos
33
34
  - @photos.each do |photo|
34
35
  .item
35
- = image_tag photo.photo.url( :large ), :alt => ''
36
- %br
37
- %br
36
+ .wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
37
+ = button_to '[x]', photo_path( :id => photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
38
+
@@ -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
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.216
4
+ version: 0.1.8.221
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-01 00:00:00.000000000 Z
11
+ date: 2020-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -176,6 +176,7 @@ files:
176
176
  - app/assets/javascripts/ish_manager/materialize.js
177
177
  - app/assets/stylesheets/ish_manager/application.css
178
178
  - app/assets/stylesheets/ish_manager/bootstrap.css
179
+ - app/assets/stylesheets/ish_manager/galleries.css
179
180
  - app/assets/stylesheets/ish_manager/jquery-ui.css
180
181
  - app/assets/stylesheets/ish_manager/maps.scss
181
182
  - app/assets/stylesheets/ish_manager/materialize.css
@@ -262,6 +263,8 @@ files:
262
263
  - app/views/ish_manager/friends/index.haml
263
264
  - app/views/ish_manager/galleries/_form.haml
264
265
  - app/views/ish_manager/galleries/_index.haml
266
+ - app/views/ish_manager/galleries/_index_thumbs.haml
267
+ - app/views/ish_manager/galleries/_index_title.haml
265
268
  - app/views/ish_manager/galleries/_menu.haml
266
269
  - app/views/ish_manager/galleries/_thumbs.haml
267
270
  - app/views/ish_manager/galleries/_title.haml