ish_manager 0.1.8.215 → 0.1.8.220

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: 9791d88698bca243d242655198761878359131f3101117d2451cef018afe5bb6
4
- data.tar.gz: 15f1b4e28488b8c160097203e304c0d874dcff4be3501b537a3ed23b9237246f
3
+ metadata.gz: 4876975073e83fd31af4b481785323077b766f5f010b5338337b38b8d6f07502
4
+ data.tar.gz: 55bd3e1bba4f45626fcd96f7d28c3e127198d501c60f3b4bb9806a96f6ecbe62
5
5
  SHA512:
6
- metadata.gz: 7169b82928108aaa8a6bbc1306037899f9bea30623ee40a16cf7ec63064a8e3332557e538f2af63264ab1b0a00f68461e8aa610546d848c4bd1d5ae651827338
7
- data.tar.gz: b86760c6d526595e2a10971fc3e493b5c11d1ae25f93204eb2e0536686ada3242936dd640087b4c2027007acd470449fdaf4eaea3bd4fd743b944965c05d09e2
6
+ metadata.gz: f1dd2dc7ef37ec1d64898455c009426f832c4e03794b19db00427fff1b227b3e8e32af9cdfba981f3179efed6c063283817ca1403dc0776a1591a10093e0c459
7
+ data.tar.gz: a16da3139579988c8cade1ff78efc87b57ffff59448affcb621c48b8c8e2d3839d1fffde6b2322bbe011f6e791c2ada60bd075d375ed7a78bda48028e25bb78d
@@ -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
  }
@@ -117,7 +118,7 @@ ul.inline li {
117
118
  }
118
119
 
119
120
  /**
120
- * manager...
121
+ * manager...
121
122
  */
122
123
 
123
124
  .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
+ }
@@ -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
 
@@ -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
 
@@ -2,7 +2,7 @@
2
2
  -#
3
3
  -# ish_manager / cities / show
4
4
  -#
5
-
5
+
6
6
  = render 'header', :city => @city
7
7
  .row
8
8
  .col-sm-6
@@ -0,0 +1,34 @@
1
+
2
+ -# = render 'ish_manager/sites/header', :site => @site if @site
3
+
4
+ = render 'ish_manager/galleries/menu'
5
+
6
+ - n_thumbs ||= 8
7
+ - param_name ||= :galleries_page
8
+
9
+ - if @galleries.length > 0
10
+ .galleries--list
11
+ - if @galleries.respond_to? :total_pages
12
+ = paginate @galleries, :param_name => param_name, :views_prefix => 'ish_manager'
13
+
14
+ - @galleries.each do |g|
15
+ .panel
16
+ .panel-body
17
+ %h3
18
+ = link_to '[~]', edit_gallery_path( g )
19
+ = link_to g.name, gallery_path(g.galleryname)
20
+ = render 'meta', :item => g
21
+
22
+ -# = render 'meta', :item => g
23
+ - if g.photos.length == 0
24
+ = image_missing
25
+ - else
26
+ - g.photos.limit( n_thumbs ).each do |photo|
27
+ = link_to image_tag(photo.photo.url(:thumb), :alt => g.name, :class => :thumb ), gallery_path(g.galleryname)
28
+
29
+ - if @galleries.respond_to? :total_pages
30
+ = paginate @galleries, :param_name => param_name, :views_prefix => 'ish_manager'
31
+
32
+ - else
33
+ %h5 No Galleries
34
+
@@ -0,0 +1 @@
1
+ = render 'ish_manager/galleries/index'
@@ -0,0 +1 @@
1
+ = render 'ish_manager/galleries/index'
@@ -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,35 +1 @@
1
-
2
- -# = render 'ish_manager/sites/header', :site => @site if @site
3
-
4
- = render 'menu'
5
-
6
-
7
- - n_thumbs ||= 8
8
- - param_name ||= :galleries_page
9
-
10
- - if @galleries.length > 0
11
- .galleries--list
12
- - if @galleries.respond_to? :total_pages
13
- = paginate @galleries, :param_name => param_name, :views_prefix => 'ish_manager'
14
-
15
- - @galleries.each do |g|
16
- .panel
17
- .panel-body
18
- %h3
19
- = link_to '[~]', edit_gallery_path( g )
20
- = link_to g.name, gallery_path(g.galleryname)
21
- = render 'meta', :item => g
22
-
23
- -# = render 'meta', :item => g
24
- - if g.photos.length == 0
25
- = image_missing
26
- - else
27
- - g.photos.limit( n_thumbs ).each do |photo|
28
- = link_to image_tag(photo.photo.url(:thumb), :alt => g.name, :class => :thumb ), gallery_path(g.galleryname)
29
-
30
- - if @galleries.respond_to? :total_pages
31
- = paginate @galleries, :param_name => param_name, :views_prefix => 'ish_manager'
32
-
33
- - else
34
- %h5 No Galleries
35
-
1
+ = render 'index'
@@ -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
+
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.215
4
+ version: 0.1.8.220
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-13 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
@@ -261,6 +262,9 @@ files:
261
262
  - app/views/ish_manager/features/show.haml
262
263
  - app/views/ish_manager/friends/index.haml
263
264
  - app/views/ish_manager/galleries/_form.haml
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
264
268
  - app/views/ish_manager/galleries/_menu.haml
265
269
  - app/views/ish_manager/galleries/_thumbs.haml
266
270
  - app/views/ish_manager/galleries/_title.haml