ishapi 0.1.8.193 → 0.1.8.195
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 +4 -4
- data/Rakefile +0 -3
- data/app/controllers/ishapi/application_controller.rb +11 -13
- data/app/controllers/ishapi/galleries_controller.rb +0 -4
- data/app/controllers/ishapi/maps_controller.rb +2 -6
- data/app/controllers/ishapi/users/registrations_controller.rb +1 -1
- data/app/controllers/ishapi/users/sessions_controller.rb +3 -3
- data/app/controllers/ishapi/users_controller.rb +32 -34
- data/app/controllers/ishapi/videos_controller.rb +0 -9
- data/app/helpers/ishapi/application_helper.rb +1 -1
- data/app/models/ishapi/ability.rb +8 -25
- data/app/views/ishapi/application/_meta.jbuilder +0 -10
- data/app/views/ishapi/galleries/_show.jbuilder +1 -1
- data/app/views/ishapi/galleries/index.jbuilder +1 -4
- data/app/views/ishapi/maps/_show.jbuilder +1 -5
- data/app/views/ishapi/maps/show.jbuilder +1 -1
- data/app/views/ishapi/markers/_index.jbuilder +2 -2
- data/app/views/ishapi/newsitems/_index.jbuilder +4 -4
- data/app/views/ishapi/reports/_index.jbuilder +0 -2
- data/app/views/ishapi/reports/show.jbuilder +0 -3
- data/app/views/ishapi/user_profiles/_account.jbuilder +21 -0
- data/app/views/ishapi/{users → user_profiles}/_index.jbuilder +0 -0
- data/app/views/ishapi/user_profiles/account.jbuilder +2 -0
- data/app/views/ishapi/user_profiles/login.jbuilder +5 -0
- data/app/views/ishapi/user_profiles/show.jbuilder +0 -4
- data/app/views/ishapi/{users/show.jbuilder → user_profiles/show.jbuilder-bk} +1 -4
- data/app/views/ishapi/videos/_show.jbuilder +2 -10
- data/config/routes.rb +6 -22
- data/lib/ishapi/engine.rb +1 -1
- metadata +7 -35
- data/app/controllers/ishapi/application_controller.rb-trash +0 -275
- data/app/controllers/ishapi/articles_controller.rb +0 -62
- data/app/controllers/ishapi/cities_controller.rb +0 -35
- data/app/controllers/ishapi/events_controller.rb +0 -21
- data/app/controllers/ishapi/measurements_controller.rb +0 -26
- data/app/controllers/ishapi/sites_controller.rb +0 -55
- data/app/controllers/ishapi/tags_controller.rb +0 -24
- data/app/controllers/ishapi/venues_controller.rb +0 -20
- data/app/views/ishapi/articles/_form.html.erb +0 -27
- data/app/views/ishapi/articles/edit.html.erb +0 -6
- data/app/views/ishapi/articles/index.html.erb +0 -29
- data/app/views/ishapi/articles/new.html.erb +0 -5
- data/app/views/ishapi/articles/show.html.erb +0 -14
- data/app/views/ishapi/cities/_index.jbuilder +0 -16
- data/app/views/ishapi/cities/features.jbuilder +0 -9
- data/app/views/ishapi/cities/index.jbuilder +0 -9
- data/app/views/ishapi/cities/show.jbuilder +0 -30
- data/app/views/ishapi/events/_index.jbuilder +0 -13
- data/app/views/ishapi/events/show.jbuilder +0 -11
- data/app/views/ishapi/features/_index.jbuilder +0 -41
- data/app/views/ishapi/sites/show.jbuilder +0 -31
- data/app/views/ishapi/tags/_index.jbuilder +0 -14
- data/app/views/ishapi/tags/_widget.jbuilder +0 -11
- data/app/views/ishapi/tags/index.jbuilder +0 -10
- data/app/views/ishapi/tags/show.jbuilder +0 -14
- data/app/views/ishapi/users/_account.jbuilder +0 -21
- data/app/views/ishapi/users/account.jbuilder +0 -2
- data/app/views/ishapi/users/login.jbuilder +0 -5
- data/app/views/ishapi/venues/_index.jbuilder +0 -21
- data/app/views/ishapi/venues/index.jbuilder +0 -2
- data/app/views/ishapi/venues/show.jbuilder +0 -15
@@ -1,14 +0,0 @@
|
|
1
|
-
<p id="notice"><%= notice %></p>
|
2
|
-
|
3
|
-
<p>
|
4
|
-
<strong>Title:</strong>
|
5
|
-
<%= @article.title %>
|
6
|
-
</p>
|
7
|
-
|
8
|
-
<p>
|
9
|
-
<strong>Text:</strong>
|
10
|
-
<%= @article.text %>
|
11
|
-
</p>
|
12
|
-
|
13
|
-
<%= link_to 'Edit', edit_article_path(@article) %> |
|
14
|
-
<%= link_to 'Back', articles_path %>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
json.array! @cities do |city|
|
3
|
-
json.id city.id.to_s
|
4
|
-
json.name city.name
|
5
|
-
# json.cityname city.cityname
|
6
|
-
json.slug city.cityname
|
7
|
-
json.x city.x
|
8
|
-
json.y city.y
|
9
|
-
json.n_reports city.reports.length
|
10
|
-
json.n_galleries city.galleries.length
|
11
|
-
json.n_videos city.videos.length
|
12
|
-
if city.profile_photo
|
13
|
-
json.photo city.profile_photo.photo.url( :thumb2 )
|
14
|
-
json.thumb_img city.profile_photo.photo.url( :thumb2 )
|
15
|
-
end
|
16
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# ishapi / cities / show
|
4
|
-
#
|
5
|
-
|
6
|
-
key = [ @city, params.permit! ]
|
7
|
-
json.cache! key do
|
8
|
-
json.city do
|
9
|
-
json.id @city.id.to_s
|
10
|
-
json.name @city.name
|
11
|
-
json.cityname @city.cityname
|
12
|
-
json.slug @city.cityname
|
13
|
-
json.description @city.description
|
14
|
-
json.x @city.x
|
15
|
-
json.y @city.y
|
16
|
-
|
17
|
-
json.thumb_img @city.profile_photo.photo.url( :thumb2 ) if @city.profile_photo
|
18
|
-
json.hero_img @city.profile_photo.photo.url( :large ) if @city.profile_photo
|
19
|
-
|
20
|
-
json.partial! 'ishapi/events/index', :events => @city.events
|
21
|
-
json.partial! 'ishapi/features/index', :features => @city.features, :resource => @city
|
22
|
-
json.partial! 'ishapi/galleries/index', :galleries => @city.galleries
|
23
|
-
json.partial! 'ishapi/newsitems/index', :newsitems => @city.newsitems
|
24
|
-
json.partial! 'ishapi/reports/index', :reports => @city.reports
|
25
|
-
json.partial! 'ishapi/users/index', :users => @city.current_users
|
26
|
-
json.partial! 'ishapi/venues/index', :venues => @city.venues
|
27
|
-
json.partial! 'ishapi/videos/index', :videos => @city.videos
|
28
|
-
json.partial! 'ishapi/tags/index', :tags => @city.tags
|
29
|
-
end
|
30
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
json.events events do |event|
|
3
|
-
json.id event.id.to_s
|
4
|
-
json.name event.name
|
5
|
-
json.eventname event.eventname
|
6
|
-
json.date event.date
|
7
|
-
json.description event.description
|
8
|
-
json.x event.x
|
9
|
-
json.y event.y
|
10
|
-
if event.profile_photo
|
11
|
-
json.photo event.profile_photo.photo.url(:thumb)
|
12
|
-
end
|
13
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# ishapi / features / _index
|
4
|
-
#
|
5
|
-
|
6
|
-
resource ||= site if defined? site
|
7
|
-
resource ||= city if defined? city
|
8
|
-
|
9
|
-
json.n_features features.count
|
10
|
-
json.features do
|
11
|
-
json.array! features.limit( resource.n_features ) do |feature|
|
12
|
-
|
13
|
-
json.name feature.name unless feature.name.blank?
|
14
|
-
json.subhead feature.subhead unless feature.subhead.blank?
|
15
|
-
json.link_path feature.link_path unless feature.link_path.blank?
|
16
|
-
json.inner_html feature.inner_html unless feature.inner_html.blank?
|
17
|
-
json.photo_url feature.image_path unless feature.image_path.blank?
|
18
|
-
json.created_at feature.created_at
|
19
|
-
|
20
|
-
if feature.report
|
21
|
-
r = feature.report
|
22
|
-
json.name r.name
|
23
|
-
json.subhead r.subhead
|
24
|
-
json.reportname r.slug
|
25
|
-
if r.photo
|
26
|
-
json.photo_url r.photo.photo.url( :thumb )
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
if feature.gallery
|
31
|
-
r = feature.gallery
|
32
|
-
json.name r.name
|
33
|
-
json.subhead r.subhead
|
34
|
-
json.slug r.slug
|
35
|
-
if r.photos[0]
|
36
|
-
json.photo_url r.photos[0].photo.url( :thumb )
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# ishapi / sites / show
|
4
|
-
#
|
5
|
-
|
6
|
-
key = [ @site.id, @site.updated_at, params.permit! ]
|
7
|
-
json.cache! key do
|
8
|
-
json.id @site.id.to_s
|
9
|
-
json.domain @site.domain
|
10
|
-
json.lang @site.lang
|
11
|
-
json.langs @langs
|
12
|
-
json.title @site.title
|
13
|
-
json.subhead @site.subhead
|
14
|
-
json.description @site.description
|
15
|
-
|
16
|
-
json.is_ads_enabled @site.is_ads_enabled
|
17
|
-
json.play_videos_in_preview @site.play_videos_in_preview
|
18
|
-
json.newsitems_per_page @site.newsitems_per_page
|
19
|
-
|
20
|
-
json.partial! 'ishapi/features/index', :features => @site.features, :resource => @site
|
21
|
-
json.partial! 'ishapi/galleries/index', :galleries => @galleries, :resource => @site
|
22
|
-
json.partial! 'ishapi/newsitems/index', :newsitems => @newsitems, :resource => @site
|
23
|
-
json.partial! 'ishapi/reports/index', :reports => @reports, :resource => @site
|
24
|
-
json.partial! 'ishapi/videos/index', :videos => @site.videos
|
25
|
-
|
26
|
-
json.feature_tags do
|
27
|
-
json.array! @feature_tags do |feature_tag|
|
28
|
-
json.partial! 'ishapi/tags/widget', :tag => feature_tag
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# _vp_ 20180204
|
4
|
-
# ishapi / tags / show
|
5
|
-
#
|
6
|
-
|
7
|
-
json.name @tag.name
|
8
|
-
json.slug @tag.slug
|
9
|
-
|
10
|
-
json.partial! 'ishapi/features/index', :features => @tag.features, :resource => @tag
|
11
|
-
json.partial! 'ishapi/newsitems/index', :newsitems => @tag.newsitems.page( params[:newsitems_page] ).per( params[:newsitems_per] || 25 )
|
12
|
-
json.partial! 'ishapi/reports/index', :reports => @tag.reports.page( params[:reports_page] ).per( params[:reports_per] || 25 )
|
13
|
-
json.partial! 'ishapi/galleries/index', :galleries => @tag.galleries.page( params[:galleries_page] ).per( params[:galleries_per] || 25 )
|
14
|
-
json.partial! 'ishapi/videos/index', :videos => @tag.videos.page( params[:videos_page] ).per( params[:videos_per] || 25 )
|
@@ -1,21 +0,0 @@
|
|
1
|
-
|
2
|
-
json.id @profile.id.to_s
|
3
|
-
json.name @profile.name
|
4
|
-
json.email @profile.email
|
5
|
-
json.profile_photo_url @profile.profile_photo.photo.url( :thumb ) if @profile.profile_photo
|
6
|
-
|
7
|
-
json.n_reports @profile.reports.count
|
8
|
-
json.n_galleries @profile.galleries.count
|
9
|
-
json.n_videos @profile.videos.count
|
10
|
-
# json.n_stars @profile.n_stars # @TODO: which one is deprecated?
|
11
|
-
json.n_unlocks @profile.n_unlocks # @TODO: which one is deprecated?
|
12
|
-
json.is_purchasing @profile.is_purchasing
|
13
|
-
if @profile.current_city
|
14
|
-
json.current_city @profile.current_city
|
15
|
-
end
|
16
|
-
|
17
|
-
json.bookmarks @profile.bookmarks do |b|
|
18
|
-
json.name b.name
|
19
|
-
json.slug b.slug
|
20
|
-
end
|
21
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# ishapi / venues / _index
|
4
|
-
#
|
5
|
-
|
6
|
-
json.n_venues venues.count
|
7
|
-
json.venues do
|
8
|
-
json.array! venues do |venue|
|
9
|
-
json.id venue.id.to_s
|
10
|
-
|
11
|
-
json.address venue.address if venue.address.present?
|
12
|
-
json.name venue.name
|
13
|
-
json.slug venue.slug
|
14
|
-
json.subhead venue.subhead
|
15
|
-
json.description venue.descr
|
16
|
-
json.x venue.x
|
17
|
-
json.y venue.y
|
18
|
-
json.photo venue.profile_photo ? venue.profile_photo.photo.url( :thumb ) : image_url('missing.png')
|
19
|
-
json.partial! 'ishapi/tags/index', :tags => venue.tags
|
20
|
-
end
|
21
|
-
end
|