ishapi 0.1.8.316 → 3.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +21 -12
  4. data/Rakefile +4 -22
  5. data/app/assets/config/ishapi_manifest.js +0 -1
  6. data/app/assets/stylesheets/ishapi/{application.scss → application.css} +2 -32
  7. data/app/controllers/ishapi/application_controller.rb +2 -139
  8. data/app/helpers/ishapi/application_helper.rb +0 -5
  9. data/app/mailers/ishapi/application_mailer.rb +4 -11
  10. data/app/models/ishapi/application_record.rb +5 -0
  11. data/app/views/layouts/ishapi/application.html.erb +15 -0
  12. data/config/routes.rb +0 -101
  13. data/lib/ishapi/engine.rb +0 -6
  14. data/lib/ishapi/version.rb +1 -1
  15. data/lib/ishapi.rb +2 -4
  16. metadata +13 -272
  17. data/app/assets/javascripts/ishapi/application.js +0 -14
  18. data/app/assets/stylesheets/ishapi/galleries.scss +0 -46
  19. data/app/assets/stylesheets/ishapi/locations.scss +0 -8
  20. data/app/assets/stylesheets/scaffold.css +0 -80
  21. data/app/controllers/ishapi/email_contexts_controller.rb +0 -28
  22. data/app/controllers/ishapi/email_conversations_controller.rb +0 -45
  23. data/app/controllers/ishapi/email_messages_controller.rb +0 -54
  24. data/app/controllers/ishapi/email_unsubscribes_controller.rb +0 -35
  25. data/app/controllers/ishapi/galleries_controller.rb +0 -56
  26. data/app/controllers/ishapi/gameui_controller.rb +0 -64
  27. data/app/controllers/ishapi/invoices_controller.rb +0 -22
  28. data/app/controllers/ishapi/lead_actions_controller.rb +0 -23
  29. data/app/controllers/ishapi/leads_controller.rb +0 -18
  30. data/app/controllers/ishapi/leadsets_controller.rb +0 -30
  31. data/app/controllers/ishapi/locations_controller.rb +0 -54
  32. data/app/controllers/ishapi/maps_controller.rb +0 -45
  33. data/app/controllers/ishapi/my/galleries_controller.rb +0 -11
  34. data/app/controllers/ishapi/my/reports_controller.rb +0 -11
  35. data/app/controllers/ishapi/my/videos_controller.rb +0 -10
  36. data/app/controllers/ishapi/newsitems_controller.rb +0 -35
  37. data/app/controllers/ishapi/obfuscated_redirects_controller.rb +0 -27
  38. data/app/controllers/ishapi/option_price_items_controller.rb +0 -44
  39. data/app/controllers/ishapi/order_items_controller.rb +0 -53
  40. data/app/controllers/ishapi/orders_controller.rb +0 -32
  41. data/app/controllers/ishapi/payments_controller.rb +0 -108
  42. data/app/controllers/ishapi/photos_controller.rb +0 -13
  43. data/app/controllers/ishapi/products_controller.rb +0 -16
  44. data/app/controllers/ishapi/stock_watches_controller.rb +0 -13
  45. data/app/controllers/ishapi/user_profiles_controller.rb +0 -27
  46. data/app/controllers/ishapi/users/registrations_controller.rb +0 -37
  47. data/app/controllers/ishapi/users/sessions_controller.rb +0 -36
  48. data/app/controllers/ishapi/users_controller.rb +0 -43
  49. data/app/controllers/ishapi/videos_controller.rb +0 -17
  50. data/app/jobs/ishapi/email_message_intake_job.rb +0 -178
  51. data/app/jobs/ishapi/email_message_intake_job.rb-todo +0 -6
  52. data/app/mailers/ishapi/confirmations_mailer.rb +0 -14
  53. data/app/models/ishapi/ability.rb +0 -130
  54. data/app/views/ishapi/addresses/_show.jbuilder +0 -12
  55. data/app/views/ishapi/application/_meta.jbuilder +0 -10
  56. data/app/views/ishapi/application/_metaline.haml +0 -12
  57. data/app/views/ishapi/application/_pagination.jbuilder +0 -11
  58. data/app/views/ishapi/application_mailer/forwarder_notify.html.erb +0 -16
  59. data/app/views/ishapi/email_contexts/summary.csv.erb +0 -4
  60. data/app/views/ishapi/email_messages/show.haml +0 -10
  61. data/app/views/ishapi/email_unsubscribes/create.haml +0 -5
  62. data/app/views/ishapi/galleries/_index.jbuilder +0 -11
  63. data/app/views/ishapi/galleries/_show.jbuilder +0 -24
  64. data/app/views/ishapi/galleries/index.jbuilder +0 -15
  65. data/app/views/ishapi/galleries/show.html.haml +0 -20
  66. data/app/views/ishapi/galleries/show.json.jbuilder +0 -12
  67. data/app/views/ishapi/galleries/show_premium_locked.jbuilder +0 -21
  68. data/app/views/ishapi/galleries/show_premium_unlocked.jbuilder +0 -17
  69. data/app/views/ishapi/locations/show.haml +0 -14
  70. data/app/views/ishapi/mailer/confirmation_instructions.html.erb +0 -6
  71. data/app/views/ishapi/mailer/email_changed.html.erb +0 -7
  72. data/app/views/ishapi/mailer/password_change.html.erb +0 -3
  73. data/app/views/ishapi/mailer/reset_password_instructions.html.erb +0 -8
  74. data/app/views/ishapi/mailer/unlock_instructions.html.erb +0 -7
  75. data/app/views/ishapi/maps/_show.jbuilder +0 -63
  76. data/app/views/ishapi/maps/_show_lite.jbuilder-trash +0 -16
  77. data/app/views/ishapi/maps/index.jbuilder +0 -12
  78. data/app/views/ishapi/maps/show.jbuilder +0 -6
  79. data/app/views/ishapi/maps/show_restricted.jbuilder +0 -44
  80. data/app/views/ishapi/markers/_card.haml +0 -28
  81. data/app/views/ishapi/markers/_index.jbuilder +0 -38
  82. data/app/views/ishapi/my/videos/index.jbuilder +0 -9
  83. data/app/views/ishapi/newsitems/_index.haml +0 -22
  84. data/app/views/ishapi/newsitems/_index.jbuilder +0 -86
  85. data/app/views/ishapi/newsitems/_show.haml +0 -10
  86. data/app/views/ishapi/newsitems/_show.haml-trash +0 -5
  87. data/app/views/ishapi/newsitems/index.jbuilder +0 -5
  88. data/app/views/ishapi/obfuscated_redirects/show.haml +0 -4
  89. data/app/views/ishapi/option_price_items/index.jbuilder +0 -17
  90. data/app/views/ishapi/option_price_items/view.jbuilder +0 -19
  91. data/app/views/ishapi/orders/_item.jbuilder +0 -8
  92. data/app/views/ishapi/orders/_show.jbuilder +0 -11
  93. data/app/views/ishapi/photos/_index.jbuilder +0 -19
  94. data/app/views/ishapi/photos/_show.jbuilder +0 -12
  95. data/app/views/ishapi/photos/show.jbuilder +0 -6
  96. data/app/views/ishapi/products/show.jbuilder +0 -16
  97. data/app/views/ishapi/reports/_index.jbuilder +0 -24
  98. data/app/views/ishapi/reports/index.jbuilder +0 -6
  99. data/app/views/ishapi/reports/show.haml +0 -15
  100. data/app/views/ishapi/reports/show.jbuilder +0 -51
  101. data/app/views/ishapi/stock_watches/index.jbuilder +0 -11
  102. data/app/views/ishapi/user_profiles/_account.jbuilder +0 -18
  103. data/app/views/ishapi/user_profiles/_index.jbuilder +0 -9
  104. data/app/views/ishapi/user_profiles/account.jbuilder +0 -2
  105. data/app/views/ishapi/user_profiles/login.jbuilder +0 -5
  106. data/app/views/ishapi/user_profiles/show.jbuilder +0 -9
  107. data/app/views/ishapi/user_profiles/show.jbuilder-bk +0 -24
  108. data/app/views/ishapi/videos/_index.jbuilder +0 -11
  109. data/app/views/ishapi/videos/_show.haml +0 -22
  110. data/app/views/ishapi/videos/_show.jbuilder +0 -37
  111. data/app/views/ishapi/videos/index.jbuilder +0 -3
  112. data/app/views/layouts/ishapi/application.html.haml +0 -38
@@ -1,17 +0,0 @@
1
- #
2
- # ishapi / galleries / show_premium_unlocked
3
- #
4
-
5
- this_key = [ @gallery, params.permit! ]
6
- json.cache! this_key do
7
- json.gallery do
8
- json.message "Thanks for purchasing!"
9
- json.premium_tier @gallery.premium_tier
10
- json.is_premium @gallery.is_premium
11
- json.is_purchased true
12
-
13
- json.partial! 'ishapi/galleries/show', gallery: @gallery
14
- json.partial! 'ishapi/photos/index', :photos => @gallery.photos
15
- end
16
- end
17
-
@@ -1,14 +0,0 @@
1
-
2
- .locations-show
3
- .max-width
4
- .header
5
- %h3.title Location #{@location.slug}
6
-
7
- .map
8
- .markers
9
- .title Markers (#{@markers.length}):
10
- .items
11
- - @markers.each do |marker|
12
- = render 'ishapi/markers/card', marker: marker
13
- .actions
14
- .newsitems
@@ -1,6 +0,0 @@
1
-
2
- <p>Welcome <%= @email %>!</p>
3
-
4
- <p>You can confirm your account email through the link below:</p>
5
-
6
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @email %>!</p>
2
-
3
- <% if @resource.try(:unconfirmed_email?) %>
4
- <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
- <% else %>
6
- <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
- <% end %>
@@ -1,3 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>We're contacting you to notify you that your password has been changed.</p>
@@ -1,8 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
-
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
-
7
- <p>If you didn't request this, please ignore this email.</p>
8
- <p>Your password won't change until you access the link above and create a new one.</p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
-
5
- <p>Click the link below to unlock your account:</p>
6
-
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,63 +0,0 @@
1
- #
2
- # ishapi / maps / _show
3
- #
4
-
5
- this_key = [ map.id, map.updated_at ]
6
- json.cache! this_key do
7
-
8
- json.map do
9
- json.id map.id.to_s
10
- json.slug map.slug
11
- json.parent_slug map.parent_slug
12
- json.description map.description
13
- json.w map.w
14
- json.h map.h
15
- # json.x map.x
16
- # json.y map.y
17
- # json.z map.z
18
- # json.map_type map.map_type
19
- json.img_path map.image.image.url(:original)
20
- json.updated_at map.updated_at
21
- json.rated map.rated
22
- json.name map.name
23
-
24
- json.premium_tier map.premium_tier
25
- json.is_premium map.is_premium
26
- json.is_purchased @current_profile&.has_premium_purchase( map )
27
-
28
- json.breadcrumbs do
29
- json.array! map.breadcrumbs do |b|
30
- json.name b[:name]
31
- json.slug b[:slug]
32
- json.link b[:link]
33
- end
34
- end
35
-
36
- if markers
37
- json.partial! 'ishapi/markers/index', markers: markers
38
- end
39
-
40
- if newsitems
41
- json.partial! 'ishapi/newsitems/index', newsitems: newsitems
42
- end
43
-
44
- if map.map
45
- json.partial! 'ishapi/maps/show', map: map.map
46
- end
47
-
48
- ## _vp_ 2021-10-14 I removed json parsing from here!
49
- ## _vp_ 2021-10-19 I added json parsing here!
50
- ## _vp_ 2022-09-13 Must use my own config, example: 3D -> geodesic. Parent is MapPanelNoZoom, but self is ThreePanelV1
51
- ## Maybe it's if map_slug is present, rather than parent_slug?
52
- if map.map_slug.present?
53
- json.config JSON.parse map.map.config
54
- json.labels JSON.parse map.map.labels
55
- else
56
- json.config JSON.parse map.config
57
- json.labels JSON.parse map.labels
58
- end
59
-
60
- end
61
- end
62
-
63
-
@@ -1,16 +0,0 @@
1
-
2
- ##
3
- ## @deprecated? I've never used this. _vp_ 2022-09-06
4
- ##
5
-
6
- json.map do
7
- json.id map.id.to_s
8
- json.slug map.slug
9
- json.parent_slug map.parent_slug
10
- json.description map.description
11
- json.w map.w
12
- json.h map.h
13
- json.img_path map.image.image.url(:original)
14
- json.updated_at map.updated_at
15
- json.rated map.rated
16
- end
@@ -1,12 +0,0 @@
1
- #
2
- # ishapi / maps / index
3
- #
4
-
5
- json.maps do
6
- @maps.each do |map|
7
- json.id map.id.to_s
8
- json.slug map.slug
9
- end
10
- end
11
-
12
-
@@ -1,6 +0,0 @@
1
- #
2
- # ishapi / maps / show
3
- #
4
-
5
- json.partial! 'ishapi/maps/show', map: @map, markers: @markers, newsitems: @newsitems
6
-
@@ -1,44 +0,0 @@
1
- #
2
- # ishapi / maps / show_restricted
3
- #
4
- map = @map
5
-
6
- this_key = [ map.id, map.updated_at ]
7
- json.cache! this_key do
8
-
9
- json.map do
10
- json.id map.id.to_s
11
- json.slug map.slug
12
- json.parent_slug map.parent_slug
13
- json.updated_at map.updated_at
14
- json.rated map.rated
15
- json.name map.name
16
- json.premium_tier map.premium_tier
17
- json.is_premium map.is_premium
18
-
19
- json.breadcrumbs do
20
- json.array! map.breadcrumbs do |b|
21
- json.name b[:name]
22
- json.slug b[:slug]
23
- json.link b[:link]
24
- end
25
- end
26
-
27
- ## _vp_ 2021-10-14 I removed json parsing from here!
28
- ## _vp_ 2021-10-19 I added json parsing here!
29
- ## _vp_ 2022-09-13 Must use my own config, example: 3D -> geodesic. Parent is MapPanelNoZoom, but self is ThreePanelV1
30
- ## Maybe it's if map_slug is present, rather than parent_slug?
31
- if map.map_slug.present?
32
- json.config JSON.parse map.map.config
33
- json.labels JSON.parse map.map.labels
34
- else
35
- json.config JSON.parse map.config
36
- json.labels JSON.parse map.labels
37
- end
38
-
39
- # json.map({ config: {} })
40
-
41
- end
42
- end
43
-
44
-
@@ -1,28 +0,0 @@
1
-
2
- - destination = marker.destination
3
-
4
- .markers--card.Card
5
- - if destination.premium_tier && !@current_profile&.has_premium_purchase( destination )
6
- #{marker.name} [purchase]
7
- - else
8
- - if marker.url
9
- #{marker.url} [external]
10
- - else
11
- = link_to marker.name, location_path(destination)
12
-
13
-
14
-
15
- -# const goto = (e) => {
16
- -# e.preventDefault()
17
- -# if (marker.premium_tier && !marker.is_purchased) {
18
- -# setItemToUnlock(marker)
19
- -# } else {
20
- -# if (marker.url) {
21
- -# setShowUrl(marker.url) // @TODO: this should be encoded in the (server-side) router eventually. _vp_ 2022-09-11
22
- -# }
23
- -# else {
24
- -# history.push(href)
25
- -# }
26
- -# }
27
- -# }
28
-
@@ -1,38 +0,0 @@
1
- #
2
- # ishapi / markers / _index
3
- #
4
-
5
- json.markers do
6
- json.array! markers do |marker|
7
- json.name marker.name
8
- json.x marker.x
9
- json.y marker.y
10
- json.z marker.z
11
- json.w marker.w
12
- json.h marker.h
13
- json.castShadow marker.castShadow
14
- json.receiveShadow marker.receiveShadow
15
- json.centerOffsetX marker.centerOffsetX
16
- json.centerOffsetY marker.centerOffsetY
17
- json.img_path marker.image ? marker.image.image.url(:original) : image_missing
18
- json.title_img_path marker.title_image ? marker.title_image.image.url(:thumb) : image_missing
19
- json.item_type marker.item_type
20
- json.url marker.url
21
- json.asset3d_path marker.asset3d ? marker.asset3d.object.url : ''
22
-
23
- ## @TODO: this is copy-pasted and should be abstracted.
24
- if destination = marker.destination
25
- json.destination_slug destination.slug # @TODO: this looks obsolete, if I'm using slug instead. _vp_ 2022-09-23
26
- json.slug destination.slug
27
- json.premium_tier destination.premium_tier
28
- json.is_premium destination.is_premium
29
- json.id destination.id.to_s
30
- if destination.is_premium
31
- if @current_profile
32
- json.is_purchased @current_profile.has_premium_purchase( destination )
33
- end
34
- end
35
- end
36
-
37
- end
38
- end
@@ -1,9 +0,0 @@
1
-
2
- json.videos(@videos) do |video|
3
- json.created_at video.created_at
4
- json.id video.id.to_s
5
- json.name video.name
6
- json.thumb_url video.thumb
7
- json.video_url video.video
8
- end
9
-
@@ -1,22 +0,0 @@
1
-
2
-
3
- %section.newsitems.newsitems--index
4
-
5
- .header
6
- %h3.title Newsitems
7
-
8
- .items
9
- - newsitems.each do |newsitem|
10
- .Card14
11
- - if newsitem.video
12
- [vid]
13
- = link_to newsitem.video.name, video_path( newsitem.video )
14
- - if newsitem.report
15
- [txt]
16
- = link_to newsitem.report.name, report_path( newsitem.report )
17
- - if newsitem.iframe_src
18
- = link_to newsitem.name, newsitem_path( newsitem )
19
-
20
- = raw newsitem.descr
21
-
22
-
@@ -1,86 +0,0 @@
1
- #
2
- # ishapi / newsitems / _index
3
- #
4
-
5
- json.newsitems_pagination do
6
- json.partial! "ishapi/application/pagination", collection: newsitems
7
- end
8
- json.newsitems do
9
-
10
- json.array! newsitems do |item|
11
- json.newsitem_id item.id.to_s
12
- json.name item.name
13
- json.created_at item.created_at
14
- json.updated_at item.updated_at
15
-
16
- json.description item.description
17
-
18
- json.votes_score item.votes_score
19
- if @current_profile
20
- json.current_user_vote_value item.vote_value(@current_profile.id)
21
- end
22
-
23
-
24
- if item.gallery
25
- json.id item.gallery_id.to_s
26
- json.item_type item.gallery.class.name
27
- json.name item.gallery.name
28
- json.slug item.gallery.slug
29
- json.username item.username || item.gallery.username || 'donor-default'
30
- json.n_photos item.gallery.photos.length
31
- json.slug item.gallery.slug
32
- json.subhead item.gallery.subhead
33
- json.partial! 'ishapi/application/meta', :item => item.gallery
34
- if item.gallery.is_premium
35
- json.premium_tier item.gallery.premium_tier
36
- json.is_premium item.gallery.premium_tier > 0
37
- json.is_purchased @current_profile&.has_premium_purchase( item.gallery )
38
- json.partial! 'ishapi/photos/index', :photos => [ item.gallery.photos[0] ]
39
- else
40
- json.partial! 'ishapi/photos/index', :photos => item.gallery.photos[0...3]
41
- end
42
- end
43
-
44
- if item.report
45
- if item.report.item_type == 'longscroll' # this allows you to have a wall of scrollable text instead of clickable items
46
- json.description item.report.descr
47
-
48
- else
49
- json.id item.report_id.to_s
50
- json.item_type item.report.class.name
51
- json.name item.report.name
52
- json.slug item.report.slug
53
- json.subhead item.report.subhead
54
- json.username item.report.user_profile.name if item.report.user_profile
55
-
56
- if item.report.photo
57
- json.photo_s169_url item.report.photo.photo.url( :s169 )
58
- json.photo_thumb2_url item.report.photo.photo.url( :thumb2 )
59
- end
60
-
61
- json.partial! 'ishapi/application/meta', :item => item.report
62
-
63
- if item.report.is_premium
64
- json.premium_tier item.report.premium_tier
65
- json.is_premium item.report.premium_tier > 0
66
- json.is_purchased @current_profile&.has_premium_purchase( item.report )
67
- end
68
- end
69
- end
70
-
71
- if item.video
72
- json.id item.video_id.to_s
73
- ## @TODO: why is this relation here? It's non-performant.
74
- video = Video.unscoped.find( item.video_id )
75
- json.item_type "Video"
76
- json.partial! 'ishapi/videos/show', :video => video
77
- end
78
-
79
- if item.photo
80
- json.id item.photo.id.to_s
81
- json.item_type item.photo.class.name
82
- json.partial! 'ishapi/photos/index', :photos => [ item.photo ]
83
- end
84
-
85
- end
86
- end
@@ -1,10 +0,0 @@
1
-
2
- - newsitem ||= @newsitem
3
- .newsitems--show
4
- .header
5
- %h2.title= @newsitem.name
6
- %iframe{ src: newsitem.iframe_src,
7
- width: "90%",
8
- height: "90%",
9
- style: "margin: auto;",
10
- }
@@ -1,5 +0,0 @@
1
-
2
- .newsitems--show
3
- .Card14.item
4
- = newsitem.name
5
- = raw newsitem.descr
@@ -1,5 +0,0 @@
1
- #
2
- # ishapi / newsitems / index
3
- #
4
-
5
- json.partial! 'index', :newsitems => @newsitems
@@ -1,4 +0,0 @@
1
-
2
- = link_to @obf.to, @obf.to
3
- %br
4
- = @obf.inspect
@@ -1,17 +0,0 @@
1
- #
2
- # ishapi / option_price_items / index
3
- #
4
-
5
- json.array! @outs do |out|
6
- json.strikePrice opi.strikePrice
7
- json.symbol opi.symbol
8
- json.bid opi.bid
9
- json.ask opi.ask
10
- json.natural ((opi.bid + opi.ask )/2).round(3)
11
- json.last opi.last
12
- # json.lastPrice opi.lastPrice
13
- # json.open opi.openPrice
14
- json.timestamp opi.timestamp.strftime('%H:%M:%S')
15
- json.seconds opi.timestamp.to_i
16
- end
17
-
@@ -1,19 +0,0 @@
1
- #
2
- # ishapi / option_price_items / view
3
- #
4
-
5
-
6
- json.array! @opis do |opi|
7
- json.ticker opi.ticker
8
- json.putCall opi.putCall
9
- json.strikePrice opi.strikePrice
10
- json.symbol opi.symbol
11
- json.bid opi.bid
12
- json.ask opi.ask
13
- json.last opi.last
14
- # json.lastPrice opi.lastPrice
15
- # json.open opi.openPrice
16
- json.timestamp opi.timestamp.strftime('%H:%M:%S')
17
- json.seconds opi.timestamp.to_i
18
- end
19
-
@@ -1,8 +0,0 @@
1
-
2
- json.kind item.kind
3
- json.fabric item.fabric
4
- json.quantity item.quantity
5
- json.cost item.cost
6
- if item.measurement
7
- json.neck_around item.measurement.neck_around
8
- end
@@ -1,11 +0,0 @@
1
-
2
- # ishapi / orders / _show
3
-
4
- json.n_items order.items.length
5
- json.order_total order.items.map { |i| i.cost }.reduce( :+ )
6
-
7
- json.order do
8
- json.array! order.items do |item|
9
- json.partial! 'ishapi/orders/item', :item => item
10
- end
11
- end
@@ -1,19 +0,0 @@
1
-
2
- #
3
- # ishapi / photos / _index
4
- # @deprecated, ishapi / galleries / _show is preferred
5
- #
6
-
7
- json.photos do
8
- json.array! photos do |photo|
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
-
18
- end
19
- end
@@ -1,12 +0,0 @@
1
-
2
- #
3
- # ishapi / photos / _show
4
- #
5
-
6
- json.mini_url photo.photo.url( :mini )
7
- json.thumb_url photo.photo.url( :thumb )
8
- json.small_url photo.photo.url( :small )
9
- json.large_url photo.photo.url( :large )
10
- json.original_url photo.photo.url( :original )
11
-
12
- json.subhead photo.subhead
@@ -1,6 +0,0 @@
1
-
2
- json.photo do
3
- json.partial! 'ishapi/photos/show', photo: @photo
4
- json.item_type 'Photo'
5
- end
6
-
@@ -1,16 +0,0 @@
1
-
2
- params.permit!
3
- json.cache! [ params, @product ] do
4
-
5
- json.id @product.id.to_s
6
- json.name @product.name
7
-
8
- json.prices do
9
- json.array! @product.prices do |price|
10
- json.id price.id.to_s
11
- json.name price.name
12
- end
13
- end
14
-
15
- end
16
-
@@ -1,24 +0,0 @@
1
-
2
- #
3
- # ishapi / reports / _index
4
- #
5
-
6
- json.n_reports reports.count
7
- json.reports do
8
- json.array! reports do |report|
9
- # json.id report.id.to_s
10
- json.created_at report.created_at
11
- json.name report.name
12
- json.slug report.slug
13
- json.description report.descr
14
-
15
- if report.photo
16
- json.photo do
17
- json.thumb_url report.photo.photo.url :thumb
18
- json.small_url report.photo.photo.url :small
19
- json.large_url report.photo.photo.url :large
20
- end
21
- end
22
-
23
- end
24
- end
@@ -1,6 +0,0 @@
1
-
2
- #
3
- # ishapi / reports / index.jbuilder
4
- #
5
-
6
- json.partial! 'ishapi/reports/index', reports: @reports
@@ -1,15 +0,0 @@
1
-
2
- .reports-show.max-width
3
-
4
- %h1.flex-row
5
- = @report.name
6
-
7
- = render 'ishapi/application/metaline', item: @report
8
-
9
- - if @report.subhead.length > 3
10
- .subhead= @report.subhead
11
-
12
- .descr
13
- - if @report.photo
14
- .float-left= image_tag @report.photo.photo.url( :small )
15
- = raw @report.descr
@@ -1,51 +0,0 @@
1
-
2
- #
3
- # ishapi / reports / show
4
- #
5
-
6
- params.permit!
7
- key = [ @report, params ]
8
- json.cache! key do
9
- json.report do
10
- json.id @report.id.to_s
11
- json.item_type @report.class.name
12
- json.name @report.name
13
- json.reportname @report.slug # @TODO: @deprecated, remove
14
- json.slug @report.slug
15
- if @report.photo
16
- json.photo_url @report.photo.photo.url( :small )
17
- json.thumb_url @report.photo.photo.url( :thumb )
18
- end
19
-
20
- # @TODO: move this to meta
21
- json.created_at @report.created_at
22
- json.updated_at @report.updated_at
23
- json.username @report.user_profile.name if @report.user_profile
24
- json.subhead @report.subhead
25
-
26
- case @report.item_type
27
- when 'wordpress'
28
- json.raw_json JSON.parse(@report.raw_json)
29
- else
30
- json.description @report.descr
31
- end
32
-
33
- if @report.photo
34
- json.photo do
35
- json.thumb_url @report.photo.photo.url :thumb
36
- json.small_url @report.photo.photo.url :small
37
- json.large_url @report.photo.photo.url :large
38
- end
39
- end
40
- end
41
-
42
- # @deprecated, but specs use this _vp_ 20180423
43
- if @report.photo
44
- json.photo do
45
- json.thumb_url @report.photo.photo.url :thumb
46
- json.small_url @report.photo.photo.url :small
47
- json.large_url @report.photo.photo.url :large
48
- end
49
- end
50
-
51
- end
@@ -1,11 +0,0 @@
1
-
2
- #
3
- # ishapi / stock_watches / index
4
- #
5
-
6
- json.array! @stock_watches do |w|
7
- json.i w
8
- json.price w[:price]
9
- json.ticker w[:ticker]
10
- end
11
-