ishapi 0.1.8.214 → 0.1.8.215
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/ishapi/application.css +1 -1
- data/app/assets/stylesheets/ishapi/galleries.scss +46 -0
- data/app/controllers/ishapi/galleries_controller.rb +30 -8
- data/app/controllers/ishapi/option_price_items_controller.rb +1 -0
- data/app/models/ishapi/ability.rb +1 -1
- data/app/views/ishapi/galleries/_show.jbuilder +3 -3
- data/app/views/ishapi/galleries/show.html.haml +20 -0
- data/app/views/ishapi/galleries/{show.jbuilder → show.json.jbuilder} +1 -1
- data/app/views/ishapi/option_price_items/view.jbuilder +2 -1
- data/app/views/ishapi/photos/_index.jbuilder +9 -1
- data/app/views/layouts/ishapi/application.html.haml +38 -0
- data/config/routes.rb +1 -1
- data/lib/ishapi.rb +0 -1
- metadata +6 -4
- data/app/assets/stylesheets/ishapi/articles.css +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 908d42fcfe99cabb27c82e7c99144efe71ff92ce74b96bfcf85162b2dd14141c
|
4
|
+
data.tar.gz: cea7d86798ed13c2835396d141bfc6e796bb45f4ce42508fc9c46ed3a5523ab7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5e3a23fcba44eea22651cdb19e4458bb3e62df19b402ecd64749f9d47ae0c2da185f97a9e47bda05e385c98cadbe51d7e8cca5ea9f225b3862aa4b4d741d26c
|
7
|
+
data.tar.gz: eb0658150810d1ec02dbe487161fffb4992cb0d67734987b1992f24f7097a88e53cea1010b1de6988b5b6db5d39df9b1577c07eab2ef494f39f4b84e79abcf2d
|
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
.galleries-show {
|
3
|
+
// border: 1px solid gray;
|
4
|
+
|
5
|
+
width: 910px;
|
6
|
+
margin: auto;
|
7
|
+
|
8
|
+
padding: 3em 0;
|
9
|
+
|
10
|
+
.photos-mini {
|
11
|
+
display: flex;
|
12
|
+
flex-wrap: wrap;
|
13
|
+
|
14
|
+
margin-bottom: 1em;
|
15
|
+
}
|
16
|
+
|
17
|
+
.photos-thumb {
|
18
|
+
display: flex;
|
19
|
+
flex-wrap: wrap;
|
20
|
+
|
21
|
+
margin-bottom: 1em;
|
22
|
+
|
23
|
+
img {
|
24
|
+
width: 100px;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
.photos-large {
|
29
|
+
.item {
|
30
|
+
background: #eee;
|
31
|
+
border: 1px solid gray;
|
32
|
+
|
33
|
+
margin: 1em 0;
|
34
|
+
|
35
|
+
display: flex;
|
36
|
+
flex-direction: column;
|
37
|
+
align-items: center;
|
38
|
+
|
39
|
+
img {
|
40
|
+
margin: 2em;
|
41
|
+
}
|
42
|
+
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
}
|
@@ -17,16 +17,38 @@ module Ishapi
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def show
|
20
|
-
@gallery = ::Gallery.unscoped.
|
20
|
+
@gallery = ::Gallery.unscoped.where( slug: params[:slug] ).first
|
21
|
+
@gallery ||= ::Gallery.unscoped.where( id: params[:slug] ).first
|
21
22
|
authorize! :show, @gallery
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
|
24
|
+
@photos = @gallery.photos.order_by( ordering: :asc )
|
25
|
+
respond_to do |format|
|
26
|
+
format.json do
|
27
|
+
|
28
|
+
if @gallery.premium?
|
29
|
+
if @current_user&.profile&.has_premium_purchase( @gallery )
|
30
|
+
render 'show_premium_unlocked'
|
31
|
+
else
|
32
|
+
render 'show_premium_locked'
|
33
|
+
end
|
34
|
+
else
|
35
|
+
render 'show'
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
format.html do
|
40
|
+
|
41
|
+
if @gallery.premium?
|
42
|
+
if @current_user&.profile&.has_premium_purchase( @gallery )
|
43
|
+
render 'show_premium_unlocked'
|
44
|
+
else
|
45
|
+
render 'show_premium_locked'
|
46
|
+
end
|
47
|
+
else
|
48
|
+
render 'show'
|
49
|
+
end
|
50
|
+
|
27
51
|
end
|
28
|
-
else
|
29
|
-
render 'show'
|
30
52
|
end
|
31
53
|
end
|
32
54
|
|
@@ -10,7 +10,7 @@ json.name gallery.name
|
|
10
10
|
json.slug gallery.slug
|
11
11
|
json.description gallery.description
|
12
12
|
json.username gallery.username || 'piousbox'
|
13
|
-
json.n_photos
|
13
|
+
json.n_photos photos.length
|
14
14
|
json.slug gallery.slug
|
15
15
|
json.subhead gallery.subhead
|
16
16
|
json.partial! 'ishapi/application/meta', :item => gallery
|
@@ -18,7 +18,7 @@ if gallery.is_premium
|
|
18
18
|
json.premium_tier gallery.premium_tier
|
19
19
|
json.is_premium gallery.premium_tier > 0
|
20
20
|
json.is_purchased @current_profile&.has_premium_purchase( gallery )
|
21
|
-
json.partial! 'ishapi/photos/index', :photos => [
|
21
|
+
json.partial! 'ishapi/photos/index', :photos => [ photos[0] ]
|
22
22
|
else
|
23
|
-
json.partial! 'ishapi/photos/index', :photos =>
|
23
|
+
json.partial! 'ishapi/photos/index', :photos => photos
|
24
24
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
.galleries-show
|
3
|
+
|
4
|
+
.header
|
5
|
+
%h2.title= @gallery.name
|
6
|
+
|
7
|
+
.photos-mini
|
8
|
+
- @photos.each do |photo|
|
9
|
+
.item= image_tag photo.photo.url( :mini )
|
10
|
+
.photos-thumb
|
11
|
+
- @photos.each do |photo|
|
12
|
+
.item= image_tag photo.photo.url( :thumb2 )
|
13
|
+
.photos-large
|
14
|
+
- @photos.each do |photo|
|
15
|
+
.item= image_tag photo.photo.url( :large )
|
16
|
+
|
17
|
+
-# json.thumb_url photo.photo.url( :thumb )
|
18
|
+
-# json.small_url photo.photo.url( :small )
|
19
|
+
-# json.large_url photo.photo.url( :large )
|
20
|
+
-# json.original_url photo.photo.url( :original )
|
@@ -6,7 +6,7 @@ this_key = [ @gallery, params.permit! ]
|
|
6
6
|
json.cache! this_key do
|
7
7
|
json.gallery do
|
8
8
|
json.partial! 'ishapi/application/meta', item: @gallery
|
9
|
-
json.partial! 'ishapi/galleries/show', gallery: @gallery
|
9
|
+
json.partial! 'ishapi/galleries/show', gallery: @gallery, photos: @photos
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -6,6 +6,14 @@
|
|
6
6
|
|
7
7
|
json.photos do
|
8
8
|
json.array! photos do |photo|
|
9
|
-
|
9
|
+
|
10
|
+
json.mini_url photo.photo.url( :mini )
|
11
|
+
json.thumb_url photo.photo.url( :thumb2 )
|
12
|
+
json.small_url photo.photo.url( :small )
|
13
|
+
json.large_url photo.photo.url( :large )
|
14
|
+
json.original_url photo.photo.url( :original )
|
15
|
+
|
16
|
+
json.name photo.name
|
17
|
+
|
10
18
|
end
|
11
19
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
-#
|
2
|
+
-# copied from ish_manager layout application
|
3
|
+
-#
|
4
|
+
|
5
|
+
!!!
|
6
|
+
%html
|
7
|
+
%head
|
8
|
+
%title #{@page_title}| PiousboxCMS
|
9
|
+
%link{ :rel => 'icon', :href => "/favicon_#{ENV['RAILS_ENV']}.gif" }
|
10
|
+
%meta{ :name => :viewport, :content => 'width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=2' }
|
11
|
+
%meta{ :charset => 'UTF-8' }
|
12
|
+
%meta{ :description => @page_description }
|
13
|
+
|
14
|
+
= javascript_include_tag "//code.jquery.com/jquery-3.3.1.min.js"
|
15
|
+
|
16
|
+
= stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
|
17
|
+
= stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
|
18
|
+
|
19
|
+
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"
|
20
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
|
21
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"
|
22
|
+
|
23
|
+
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/css/select2.min.css"
|
24
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/js/select2.min.js"
|
25
|
+
|
26
|
+
- # @TODO: document? test-drive?
|
27
|
+
- if @include_materialize
|
28
|
+
= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
|
29
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"
|
30
|
+
|
31
|
+
= stylesheet_link_tag "ishapi/application", media: "all"
|
32
|
+
= javascript_include_tag "ishapi/application"
|
33
|
+
|
34
|
+
= csrf_meta_tags
|
35
|
+
%body
|
36
|
+
= yield
|
37
|
+
|
38
|
+
|
data/config/routes.rb
CHANGED
@@ -50,7 +50,7 @@ Ishapi::Engine.routes.draw do
|
|
50
50
|
|
51
51
|
|
52
52
|
# resources :option_price_items
|
53
|
-
get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol' ## the symbol is detailed eg 'GME_011924P30'
|
53
|
+
get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol', :constraints => { :symbol => /[^\/]+/ } ## the symbol is detailed eg 'GME_011924P30'
|
54
54
|
get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
|
55
55
|
|
56
56
|
|
data/lib/ishapi.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.215
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -205,7 +205,7 @@ files:
|
|
205
205
|
- app/assets/config/ishapi_manifest.js
|
206
206
|
- app/assets/javascripts/ishapi/application.js
|
207
207
|
- app/assets/stylesheets/ishapi/application.css
|
208
|
-
- app/assets/stylesheets/ishapi/
|
208
|
+
- app/assets/stylesheets/ishapi/galleries.scss
|
209
209
|
- app/assets/stylesheets/scaffold.css
|
210
210
|
- app/controllers/ishapi/addresses_controller.rb
|
211
211
|
- app/controllers/ishapi/application_controller.rb
|
@@ -244,7 +244,8 @@ files:
|
|
244
244
|
- app/views/ishapi/galleries/_index.jbuilder
|
245
245
|
- app/views/ishapi/galleries/_show.jbuilder
|
246
246
|
- app/views/ishapi/galleries/index.jbuilder
|
247
|
-
- app/views/ishapi/galleries/show.
|
247
|
+
- app/views/ishapi/galleries/show.html.haml
|
248
|
+
- app/views/ishapi/galleries/show.json.jbuilder
|
248
249
|
- app/views/ishapi/galleries/show_premium_locked.jbuilder
|
249
250
|
- app/views/ishapi/galleries/show_premium_unlocked.jbuilder
|
250
251
|
- app/views/ishapi/mailer/confirmation_instructions.html.erb
|
@@ -281,6 +282,7 @@ files:
|
|
281
282
|
- app/views/ishapi/videos/_index.jbuilder
|
282
283
|
- app/views/ishapi/videos/_show.jbuilder
|
283
284
|
- app/views/ishapi/videos/index.jbuilder
|
285
|
+
- app/views/layouts/ishapi/application.html.haml
|
284
286
|
- config/routes.rb
|
285
287
|
- lib/ishapi.rb
|
286
288
|
- lib/ishapi/engine.rb
|