ishapi 0.1.8.118 → 0.1.8.119
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f5b81ff8ff4d08f7c2047a997030d679336b57fd8fedc4f550353e2aee6eaf7
|
|
4
|
+
data.tar.gz: 51a9cfad896137f46ce99db885060d09c5e74f276314ff43a45bffaf2430ad79
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7541abed98b9c6ce8d34aa57c2d458447433f00436d084e7eb1677e6ca996eae35a58539f6ecbef9b3467e9796f2d919e4f61e39ff2e2e987a6f7b0365c1cdb
|
|
7
|
+
data.tar.gz: 565df196c961730b8890ac98d32a7b22b24db4f25a974c74a100ac980c3c95f0594fea49ae13a5239356c3230e38ea7216ec6460ebb7da0af15a30e65522e891
|
|
@@ -35,7 +35,7 @@ module Ishapi
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
@galleries = @site.galleries.limit( 10 )
|
|
38
|
-
@newsitems = @site.newsitems.limit(
|
|
38
|
+
@newsitems = @site.newsitems.limit( @site.newsitems_per_page )
|
|
39
39
|
@reports = @site.reports.limit( 10 )
|
|
40
40
|
@langs = ::Site.where( :domain => domain ).map( &:lang )
|
|
41
41
|
@feature_tags = @site.tags.where( :is_feature => true )
|
|
@@ -9,6 +9,7 @@ json.newsitems do
|
|
|
9
9
|
json.id item.id.to_s
|
|
10
10
|
json.name item.name
|
|
11
11
|
json.created_at item.created_at
|
|
12
|
+
json.updated_at item.updated_at
|
|
12
13
|
|
|
13
14
|
if item.gallery
|
|
14
15
|
json.item_type 'gallery'
|
|
@@ -43,8 +44,8 @@ json.newsitems do
|
|
|
43
44
|
json.username item.report.user_profile.name if item.report.user_profile
|
|
44
45
|
|
|
45
46
|
if item.report.photo
|
|
46
|
-
json.
|
|
47
|
-
json.
|
|
47
|
+
json.photo_s169_url item.report.photo.photo.url( :s169 )
|
|
48
|
+
json.photo_thumb2_url item.report.photo.photo.url( :thumb2 )
|
|
48
49
|
end
|
|
49
50
|
|
|
50
51
|
json.partial! 'ishapi/application/meta', :item => item.report
|
|
@@ -52,18 +53,16 @@ json.newsitems do
|
|
|
52
53
|
{ slug: 'bars-and-clubs', name: 'Bars & Clubs' },
|
|
53
54
|
{ slug: 'food', name: 'Food' },
|
|
54
55
|
{ slug: 'late-night', name: 'Late Night' } ]
|
|
56
|
+
|
|
57
|
+
if item.report.is_premium
|
|
58
|
+
json.premium_tier item.report.premium_tier
|
|
59
|
+
json.is_premium item.report.premium_tier > 0
|
|
60
|
+
json.is_purchased current_user.profile.has_premium_purchase( item.report )
|
|
61
|
+
end
|
|
55
62
|
end
|
|
56
63
|
|
|
57
64
|
if item.video_id
|
|
58
65
|
json.partial! 'ishapi/videos/show', :video => Video.unscoped.find( item.video_id )
|
|
59
|
-
|
|
60
|
-
# json.item_type 'video'
|
|
61
|
-
# json.name item.video.name
|
|
62
|
-
# json.descr item.video.descr
|
|
63
|
-
# json.x item.video.x
|
|
64
|
-
# json.y item.video.y
|
|
65
|
-
# json.youtube_id item.video.youtube_id
|
|
66
|
-
# json.url item.video.video.url
|
|
67
66
|
end
|
|
68
67
|
|
|
69
68
|
if item.photo
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
|
|
2
|
+
#
|
|
3
|
+
# ish_api / videos / _show
|
|
4
|
+
#
|
|
5
|
+
|
|
2
6
|
json.id video.id.to_s
|
|
7
|
+
json.slug video.id.to_s
|
|
3
8
|
json.youtube_id video.youtube_id
|
|
4
9
|
json.name video.name
|
|
5
10
|
json.description video.descr
|
|
11
|
+
json.subhead video.subhead
|
|
6
12
|
json.x video.x
|
|
7
13
|
json.y video.y
|
|
8
14
|
json.url video.video.url
|
|
9
15
|
json.item_type 'video'
|
|
10
16
|
|
|
11
17
|
if video.city
|
|
12
|
-
json.
|
|
18
|
+
json.cityname video.city.cityname
|
|
19
|
+
json.city do
|
|
20
|
+
json.name video.city.name
|
|
21
|
+
json.slug video.city.cityname
|
|
22
|
+
end
|
|
13
23
|
end
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
json.tags [ { slug: 'adventure', name: 'Adventure' },
|
|
26
|
+
{ slug: 'bars-and-clubs', name: 'Bars & Clubs' },
|
|
27
|
+
{ slug: 'food', name: 'Food' },
|
|
28
|
+
{ slug: 'late-night', name: 'Late Night' } ]
|
|
18
29
|
|
|
19
30
|
if video.user_profile
|
|
20
31
|
json.username video.user_profile.name
|
|
21
32
|
end
|
|
33
|
+
|
|
34
|
+
if video.is_premium
|
|
35
|
+
json.premium_tier video.premium_tier
|
|
36
|
+
json.is_premium video.premium_tier > 0
|
|
37
|
+
if current_user && current_user.profile
|
|
38
|
+
json.is_purchased current_user.profile.has_premium_purchase( item.video )
|
|
39
|
+
end
|
|
40
|
+
end
|