ish_manager 0.1.8.224 → 0.1.8.229

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: 17ef25f7e30757abd440718a014ccc6c01e6358bc225ab7a43235dc64cefd15b
4
- data.tar.gz: aeed4163d947a42ebc86b63a732899c9b0f2ea95fd21ab42662d3a5cac4e3765
3
+ metadata.gz: 9be117fe6d2f6a0cd5133bd15e0e1fef949bae677cd964f43a3321d1f7d729f2
4
+ data.tar.gz: 3b66ca0da2b1c935204eed4376e986959c259cbf786fb5318942c56efd09d480
5
5
  SHA512:
6
- metadata.gz: a6b1a8b719762cc760d79025901245a30e6ef1e67e3d5be093c2fab960596e3f79692459d69a50f6253e933fd892ced4d6c0c49d00f7243652f378b5109e3914
7
- data.tar.gz: 9b52b74a65ab93bc63fbbf22b79185440a69c6aaad01fe90d6500a0e4ac23045c1191be9dbb71dff6cbaaa11f62a25621a555bd2fe4acfb1b7b8bf50ecb57b3c
6
+ metadata.gz: df98c52939e5d91092bad302958365da1dc137cf191bbd75b1dec8aaa13474372f3967e749b99eade069cbddac35303dc6c36f867b2a4999bde18ea083f436a6
7
+ data.tar.gz: b93bd28f89c76950137c0710f58a60123a1f8177cb390039c430c35a72ae6d292747a33343b86c1747d295a7cc68133943ade3c7b5d757aa3a63f68737772a67
@@ -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'
@@ -41,7 +41,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
41
41
  if @gallery.save
42
42
  ::IshManager::ApplicationMailer.shared_galleries( params[:gallery][:shared_profiles], @gallery ).deliver
43
43
  flash[:notice] = 'Success'
44
- redirect_to galleries_path
44
+ redirect_to edit_gallery_path(@gallery)
45
45
  else
46
46
  puts! @gallery.errors.messages
47
47
  flash[:alert] = 'No Luck. ' + @gallery.errors.inspect
@@ -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('')
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
@@ -87,6 +87,7 @@ class IshManager::VideosController < IshManager::ApplicationController
87
87
 
88
88
  def edit
89
89
  @video = Video.unscoped.find params[:id]
90
+ @user_profiles_list = IshModels::UserProfile.list
90
91
  authorize! :edit, @video
91
92
 
92
93
  @tags_list = Tag.unscoped.or( { :is_public => true }, { :user_id => current_user.id } ).list
@@ -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
@@ -24,7 +24,8 @@
24
24
  - @photos.each do |photo|
25
25
  .col-xs-4
26
26
  .item{ :style => "border: 1px solid red;" }
27
- = button_to '[x]', photo_path( :id => photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
27
+ .float-left= button_to '[x]', photo_path( :id => photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
28
+ = link_to "go to", "#large_#{photo.id}"
28
29
  %br
29
30
  = image_tag photo.photo.url( :thumb ), :alt => ''
30
31
  .spacer{ :style => 'height: 100px' }
@@ -33,6 +34,7 @@
33
34
  .center.large-photos
34
35
  - @photos.each do |photo|
35
36
  .item
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
-
37
+ %a{id: "large_#{photo.id}" }
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 )}')" }
@@ -24,10 +24,10 @@
24
24
  .panel-body
25
25
  %ul
26
26
  %li
27
- = link_to '[~]', edit_url.call( n )
28
- = button_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
27
+ .float-left= link_to '[~]', edit_url.call( n )
28
+ .float-left= button_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
29
29
  Name: #{n.name}
30
- Desc: #{n.descr}
30
+ %li Desc: #{n.descr}
31
31
  %li Report id: #{n.report_id}
32
32
  %li Gallery id: #{n.gallery_id}
33
33
  %li username: #{n.username}
@@ -8,24 +8,29 @@
8
8
  - if n.photo.gallery.blank?
9
9
  = link_to image_tag( n.photo.photo.url(:small) ), n.photo.photo.url(:large), :rel => 'lightbox[newsitem]'
10
10
  - else
11
- = link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.galleryname, n.photo.gallery.photos.index(n.photo) )
11
+ = link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.galleryname, n.photo.gallery.photos.index(n.photo) )
12
12
  .meta= render 'ish_manager/photos/meta', :photo => n.photo
13
-
14
- - if !n.report.blank?
15
- .Nreport
16
- %h3= link_to n.report.name, report_path(n.report.name_seo)
13
+
14
+ - if n.report
15
+ .Nreport.newsitem-report
16
+ %ul
17
+ %li <b>Report</b> #{n.report.id}
18
+ %li Premium Tier #{n.report.premium_tier}
19
+ %h5
20
+ = link_to n.report.name, report_path(n.report.name_seo)
21
+ = link_to "[~]", edit_report_path(n.report)
17
22
  .meta
18
- New Report on #{pretty_date n.report.created_at} by #{n.report.username}
23
+ on #{pretty_date n.report.created_at} by #{n.report.username}
19
24
  - unless n.report.photo.blank?
20
25
  .thumb= link_to image_tag(n.report.photo.photo.url(:thumb), :alt => ''), report_path( n.report.name_seo )
21
26
  .subhead= n.report.subhead
22
27
  .c
23
-
28
+
24
29
  - if !n.gallery.blank?
25
30
  .Ngallery
26
31
 
27
32
  %h3= link_to n.gallery.name, gallery_path(n.gallery.galleryname, 0)
28
- .meta
33
+ .meta
29
34
  #{t('newsitems.gallery', :username => n.gallery.username, :date => pretty_date(n.gallery.created_at))}
30
35
  - unless n.gallery.city.blank?
31
36
  = t('cities.in')
@@ -39,7 +44,7 @@
39
44
  = link_to image_tag( photo.photo.url(:thumb), :alt => photo.name ), photo.photo.url(:small), :rel => "lightbox[#{n.gallery.galleryname}]"
40
45
  -# .subhead= n.descr
41
46
  .c
42
-
47
+
43
48
  - if n.video_id
44
49
  - video = Video.unscoped.find n.video_id
45
50
  .Nvideo
@@ -48,10 +53,10 @@
48
53
  = render 'ish_manager/application/meta', :item => video
49
54
  = render 'ish_manager/videos/embed_half', :video => video
50
55
  .c
51
-
56
+
52
57
  - if !n.descr.blank? && n.gallery.blank? && n.report.blank?
53
58
  .Ndescr.panel
54
59
  .meta= pretty_date n.created_at
55
60
  .subhead= simple_format n.descr
56
61
  .c
57
-
62
+
@@ -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
@@ -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
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.224
4
+ version: 0.1.8.229
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-04 00:00:00.000000000 Z
11
+ date: 2021-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -219,7 +219,6 @@ files:
219
219
  - app/mailers/ish_manager/application_mailer.rb
220
220
  - app/models/ish_manager/ability.rb
221
221
  - app/models/ish_manager/application_record.rb
222
- - app/views/ish_manager/ally/home.haml
223
222
  - app/views/ish_manager/application/_analytics.html
224
223
  - app/views/ish_manager/application/_form_errors.haml
225
224
  - app/views/ish_manager/application/_main_footer.haml
@@ -245,9 +244,6 @@ files:
245
244
  - app/views/ish_manager/cities/new_feature.haml
246
245
  - app/views/ish_manager/cities/new_newsitem.haml
247
246
  - app/views/ish_manager/cities/show.haml
248
- - app/views/ish_manager/co_tailors/_product_form.haml
249
- - app/views/ish_manager/co_tailors/home.haml
250
- - app/views/ish_manager/covered_calls/index.haml
251
247
  - app/views/ish_manager/events/_form.haml
252
248
  - app/views/ish_manager/events/_index.haml
253
249
  - app/views/ish_manager/events/edit.haml
@@ -260,7 +256,6 @@ files:
260
256
  - app/views/ish_manager/features/index.haml
261
257
  - app/views/ish_manager/features/new.haml
262
258
  - app/views/ish_manager/features/show.haml
263
- - app/views/ish_manager/friends/index.haml
264
259
  - app/views/ish_manager/galleries/_form.haml
265
260
  - app/views/ish_manager/galleries/_index.haml
266
261
  - app/views/ish_manager/galleries/_index_thumbs.haml
@@ -277,8 +272,6 @@ files:
277
272
  - app/views/ish_manager/invoices/_form.haml
278
273
  - app/views/ish_manager/invoices/index.haml
279
274
  - app/views/ish_manager/invoices/new.haml
280
- - app/views/ish_manager/iron_condors/_form.haml
281
- - app/views/ish_manager/iron_condors/index.haml
282
275
  - app/views/ish_manager/kaminari/_first_page.html.erb
283
276
  - app/views/ish_manager/kaminari/_gap.html.erb
284
277
  - app/views/ish_manager/kaminari/_last_page.html.erb
@@ -305,7 +298,6 @@ files:
305
298
  - app/views/ish_manager/newsitems/edit.haml
306
299
  - app/views/ish_manager/newsitems/index.haml
307
300
  - app/views/ish_manager/newsitems/new.haml
308
- - app/views/ish_manager/orders/index.haml
309
301
  - app/views/ish_manager/payments/index.haml
310
302
  - app/views/ish_manager/photos/_meta.haml
311
303
  - app/views/ish_manager/photos/_multinew.haml
@@ -340,6 +332,14 @@ files:
340
332
  - app/views/ish_manager/tags/index.haml
341
333
  - app/views/ish_manager/tags/new.haml
342
334
  - app/views/ish_manager/tags/show.haml
335
+ - app/views/ish_manager/trash/ally/home.haml
336
+ - app/views/ish_manager/trash/co_tailors/_product_form.haml
337
+ - app/views/ish_manager/trash/co_tailors/home.haml
338
+ - app/views/ish_manager/trash/covered_calls/index.haml
339
+ - app/views/ish_manager/trash/friends/index.haml
340
+ - app/views/ish_manager/trash/iron_condors/_form.haml
341
+ - app/views/ish_manager/trash/iron_condors/index.haml
342
+ - app/views/ish_manager/trash/orders/index.haml
343
343
  - app/views/ish_manager/user_profiles/_form.haml
344
344
  - app/views/ish_manager/user_profiles/edit.haml
345
345
  - app/views/ish_manager/user_profiles/index.haml
@@ -377,7 +377,7 @@ homepage: http://wasya.co
377
377
  licenses:
378
378
  - MIT
379
379
  metadata: {}
380
- post_install_message:
380
+ post_install_message:
381
381
  rdoc_options: []
382
382
  require_paths:
383
383
  - lib
@@ -393,7 +393,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
393
  version: '0'
394
394
  requirements: []
395
395
  rubygems_version: 3.0.6
396
- signing_key:
396
+ signing_key:
397
397
  specification_version: 4
398
398
  summary: Summary of IshManager.
399
399
  test_files: []