ishapi 0.1.8.53 → 0.1.8.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ishapi/sites_controller.rb +2 -0
- data/app/controllers/ishapi/videos_controller.rb +26 -0
- data/app/models/ishapi/ability.rb +4 -0
- data/app/views/ishapi/reports/index.jbuilder +1 -1
- data/app/views/ishapi/reports/show.jbuilder +1 -1
- data/app/views/ishapi/sites/show.jbuilder +4 -1
- data/app/views/ishapi/videos/_index.jbuilder +4 -2
- data/app/views/ishapi/videos/index.jbuilder +3 -0
- data/config/routes.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 183ed41578658cfbf4c05b46e2e4f415044e1f6a
|
4
|
+
data.tar.gz: ce53db992cb8fce63be8af00c4161e10e4c186b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1462a727f8980131b9fb84bd94c422456a3057894474c835f1c1ffc8bb9c11875b0190071f5cc55934ae4347f0fa7309019c3f10b6649e5b6d33fac2638976f7
|
7
|
+
data.tar.gz: 1385f7170798ccc196f6075e995097b71cadcd7721ecfeb746321b1f1e6e65ba9bd91f8f69ad92752724a6cee62b62f70476b105d61730cfc45ed05a8c51d533
|
@@ -16,7 +16,9 @@ module Ishapi
|
|
16
16
|
@site = ::Site.find_by :domain => domain, :lang => :en
|
17
17
|
authorize! :show, @site
|
18
18
|
|
19
|
+
@galleries = @site.galleries.limit( 10 )
|
19
20
|
@newsitems = @site.newsitems.limit(10)
|
21
|
+
@reports = @site.reports.limit( 10 )
|
20
22
|
@langs = ::Site.where( :domain => domain ).map( &:lang )
|
21
23
|
end
|
22
24
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_dependency "ishapi/application_controller"
|
2
|
+
module Ishapi
|
3
|
+
class VideosController < ApplicationController
|
4
|
+
|
5
|
+
def show
|
6
|
+
@video = Video.unscoped.find_by :name_seo => params[:name_seo]
|
7
|
+
authorize! :show, @video
|
8
|
+
end
|
9
|
+
|
10
|
+
def index
|
11
|
+
authorize! :index, Video
|
12
|
+
@videos = Video.all
|
13
|
+
if params[:cityname]
|
14
|
+
city = City.find_by :cityname => params[:cityname]
|
15
|
+
@videos = @videos.where( :city_id => city.id )
|
16
|
+
end
|
17
|
+
if params[:domain]
|
18
|
+
site = Site.find_by :domain => params[:domain], :lang => :en
|
19
|
+
@videos = @videos.where( :site_id => site.id )
|
20
|
+
end
|
21
|
+
|
22
|
+
@videos = @videos.page( params[:videos_page] ).per( 10 )
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -18,7 +18,7 @@ json.cache! key do
|
|
18
18
|
# @TODO: move this to meta
|
19
19
|
json.created_at @report.created_at.strftime('%Y%m%d')
|
20
20
|
json.updated_at @report.updated_at.strftime('%Y%m%d')
|
21
|
-
json.username @report.user_profile.name
|
21
|
+
json.username @report.user_profile.name if @report.user_profile
|
22
22
|
json.cityname @report.city.cityname if @report.city
|
23
23
|
json.tagname @report.tag.name_seo if @report.tag
|
24
24
|
|
@@ -18,7 +18,10 @@ json.cache! key do
|
|
18
18
|
json.newsitems_per_page @site.newsitems_per_page
|
19
19
|
|
20
20
|
json.partial! 'ishapi/features/index', :features => @site.features, :resource => @site
|
21
|
-
json.partial! 'ishapi/
|
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
|
22
24
|
json.partial! 'ishapi/videos/index', :videos => @site.videos
|
25
|
+
|
23
26
|
end
|
24
27
|
end
|
data/config/routes.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.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -192,6 +192,7 @@ files:
|
|
192
192
|
- app/controllers/ishapi/users_controller.rb~
|
193
193
|
- app/controllers/ishapi/venues_controller.rb
|
194
194
|
- app/controllers/ishapi/venues_controller.rb~
|
195
|
+
- app/controllers/ishapi/videos_controller.rb
|
195
196
|
- app/helpers/ishapi/application_helper.rb
|
196
197
|
- app/helpers/ishapi/articles_helper.rb
|
197
198
|
- app/jobs/ishapi/application_job.rb
|
@@ -254,6 +255,7 @@ files:
|
|
254
255
|
- app/views/ishapi/videos/_index.jbuilder~
|
255
256
|
- app/views/ishapi/videos/_show.jbuilder
|
256
257
|
- app/views/ishapi/videos/_show.jbuilder~
|
258
|
+
- app/views/ishapi/videos/index.jbuilder
|
257
259
|
- app/views/layouts/ishapi/application.html.erb
|
258
260
|
- config/initializers/koala.rb
|
259
261
|
- config/routes.rb
|