ish_manager 0.1.8.321 → 0.1.8.323
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/ish_manager/application.scss +1 -0
- data/app/assets/stylesheets/ish_manager/email_templates.scss +2 -1
- data/app/assets/stylesheets/ish_manager/maps.scss +10 -0
- data/app/controllers/ish_manager/application_controller.rb +1 -8
- data/app/controllers/ish_manager/email_campaigns_controller.rb +2 -2
- data/app/controllers/ish_manager/email_contexts_controller.rb +26 -5
- data/app/controllers/ish_manager/galleries_controller.rb +3 -5
- data/app/controllers/ish_manager/leads_controller.rb +2 -2
- data/app/controllers/ish_manager/maps_controller.rb +13 -12
- data/app/controllers/ish_manager/markers_controller.rb +1 -1
- data/app/controllers/ish_manager/newsitems_controller.rb +9 -47
- data/app/controllers/ish_manager/photos_controller.rb +0 -2
- data/app/controllers/ish_manager/reports_controller.rb +2 -2
- data/app/controllers/ish_manager/user_profiles_controller.rb +7 -7
- data/app/controllers/ish_manager/videos_controller.rb +2 -29
- data/app/helpers/ish_manager/application_helper.rb +0 -15
- data/app/models/ish_manager/ability.rb +1 -1
- data/app/views/ish_manager/application/_main_header_admin.haml +4 -3
- data/app/views/ish_manager/application/_meta.haml +2 -2
- data/app/views/ish_manager/application/_paginate.haml +4 -0
- data/app/views/ish_manager/email_contexts/index.haml +20 -14
- data/app/views/ish_manager/{unsubscribes → email_unsubscribes}/new.haml +0 -0
- data/app/views/ish_manager/galleries/_form.haml +0 -4
- data/app/views/ish_manager/maps/_form.haml +9 -6
- data/app/views/ish_manager/markers/_form.haml +3 -0
- data/app/views/ish_manager/markers/_index.haml +7 -3
- data/app/views/ish_manager/newsitems/_form.haml +0 -6
- data/app/views/ish_manager/newsitems/_item.haml +0 -7
- data/app/views/ish_manager/newsitems/edit.haml +1 -10
- data/app/views/ish_manager/newsitems/index.haml +1 -7
- data/app/views/ish_manager/newsitems/new.haml +0 -4
- data/app/views/ish_manager/reports/_form.haml +0 -4
- data/app/views/ish_manager/reports/_index.haml +2 -5
- data/app/views/ish_manager/user_profiles/_form.haml +0 -4
- data/app/views/ish_manager/user_profiles/edit.haml +2 -3
- data/app/views/ish_manager/user_profiles/index.haml +1 -1
- data/app/views/ish_manager/videos/_form.haml +0 -6
- data/app/views/ish_manager/videos/_list.haml +1 -1
- data/app/views/ish_manager/videos/show.haml +1 -1
- data/config/routes.rb +2 -0
- data/lib/ish_manager.rb +1 -0
- metadata +18 -58
- data/app/controllers/ish_manager/trash/cities_controller.rb +0 -107
- data/app/controllers/ish_manager/trash/orders_controller.rb +0 -12
- data/app/controllers/ish_manager/trash/sites_controller.rb +0 -95
- data/app/controllers/ish_manager/trash/tags_controller.rb +0 -91
- data/app/controllers/ish_manager/trash/users_controller.rb +0 -15
- data/app/controllers/ish_manager/trash/venues_controller.rb +0 -72
- data/app/views/ish_manager/features/_form.haml +0 -70
- data/app/views/ish_manager/features/_index.haml +0 -43
- data/app/views/ish_manager/features/_item.haml +0 -16
- data/app/views/ish_manager/features/edit.haml +0 -7
- data/app/views/ish_manager/features/index.haml +0 -5
- data/app/views/ish_manager/features/new.haml +0 -11
- data/app/views/ish_manager/features/show.haml +0 -0
- data/app/views/ish_manager/markers/_index_small.haml-trash +0 -28
- data/app/views/ish_manager/tags/_features.haml +0 -12
- data/app/views/ish_manager/tags/_form.haml +0 -44
- data/app/views/ish_manager/tags/_index.haml +0 -16
- data/app/views/ish_manager/tags/_item.haml +0 -16
- data/app/views/ish_manager/tags/_list.haml +0 -8
- data/app/views/ish_manager/tags/_list_simple.haml +0 -5
- data/app/views/ish_manager/tags/_meta.haml +0 -9
- data/app/views/ish_manager/tags/edit.haml +0 -4
- data/app/views/ish_manager/tags/index.haml +0 -22
- data/app/views/ish_manager/tags/new.haml +0 -3
- data/app/views/ish_manager/tags/show.haml +0 -23
- data/app/views/ish_manager/trash/cities/_form.haml +0 -38
- data/app/views/ish_manager/trash/cities/_header.haml +0 -39
- data/app/views/ish_manager/trash/cities/edit.haml +0 -4
- data/app/views/ish_manager/trash/cities/edit_feature.haml +0 -4
- data/app/views/ish_manager/trash/cities/index.haml +0 -27
- data/app/views/ish_manager/trash/cities/new.haml +0 -5
- data/app/views/ish_manager/trash/cities/new_feature.haml +0 -5
- data/app/views/ish_manager/trash/cities/new_newsitem.haml +0 -23
- data/app/views/ish_manager/trash/cities/show.haml +0 -63
- data/app/views/ish_manager/trash/events/_form.haml +0 -45
- data/app/views/ish_manager/trash/events/_index.haml +0 -18
- data/app/views/ish_manager/trash/events/edit.haml +0 -2
- data/app/views/ish_manager/trash/events/index.haml +0 -2
- data/app/views/ish_manager/trash/events/new.haml +0 -2
- data/app/views/ish_manager/trash/meeting_mailer/README.txt +0 -5
- data/app/views/ish_manager/trash/sites/_form.haml +0 -63
- data/app/views/ish_manager/trash/sites/_header.haml +0 -21
- data/app/views/ish_manager/trash/sites/edit.haml +0 -3
- data/app/views/ish_manager/trash/sites/galleries.haml +0 -19
- data/app/views/ish_manager/trash/sites/index.haml +0 -26
- data/app/views/ish_manager/trash/sites/new.haml +0 -4
- data/app/views/ish_manager/trash/sites/show.haml +0 -18
- data/app/views/ish_manager/trash/venues/_form.haml +0 -43
- data/app/views/ish_manager/trash/venues/_index.haml +0 -13
- data/app/views/ish_manager/trash/venues/_search.haml +0 -7
- data/app/views/ish_manager/trash/venues/edit.haml +0 -5
- data/app/views/ish_manager/trash/venues/index.haml +0 -9
- data/app/views/ish_manager/trash/venues/new.haml +0 -5
- data/app/views/ish_manager/trash/venues/show.haml +0 -2
- data/app/views/layouts/ish_manager/application.haml-trash +0 -46
@@ -42,7 +42,7 @@
|
|
42
42
|
= f.select :rated, options_for_select(Location::RATED_OPTIONS, selected: @map.rated)
|
43
43
|
.field
|
44
44
|
= f.label :creator_profile
|
45
|
-
= f.select :creator_profile, options_for_select(@user_profiles_list, selected: @
|
45
|
+
= f.select :creator_profile, options_for_select(@user_profiles_list, selected: @current_profile.id)
|
46
46
|
|
47
47
|
.col-sm-4
|
48
48
|
.field
|
@@ -64,10 +64,6 @@
|
|
64
64
|
= file_field_tag :image
|
65
65
|
= image_tag @map.image.image.url(:thumb) rescue nil
|
66
66
|
|
67
|
-
.col-sm-4
|
68
|
-
= f.label :tags
|
69
|
-
= f.select :tag_ids, @tags_list, {}, { multiple: true }
|
70
|
-
|
71
67
|
.col-sm-12
|
72
68
|
= render 'ish_manager/application/form_nonpublic', f: f, model: @map
|
73
69
|
|
@@ -88,9 +84,16 @@
|
|
88
84
|
.col.s6
|
89
85
|
= f.label "Config"
|
90
86
|
= f.text_area :config, class: 'large'
|
87
|
+
|
91
88
|
%pre.small
|
92
89
|
:plain
|
93
|
-
|
90
|
+
studio.hasFloor: bool
|
91
|
+
studio.studioLength: centimeters
|
92
|
+
studio.studioWidth: centimeters
|
93
|
+
|
94
|
+
<label>.collapsible: bool
|
95
|
+
eg: description.collapsible: bool
|
96
|
+
|
94
97
|
map_panel_type: "Equirectangular" | "Panoramic" |
|
95
98
|
"MapPanel" | "MapPanelNoZoom" |
|
96
99
|
"ThreePanelV1" | "ThreePanelV1Fullscreen" |
|
@@ -2,16 +2,20 @@
|
|
2
2
|
|
3
3
|
.markers--index.row
|
4
4
|
- markers.each do |marker|
|
5
|
-
.col-sm-
|
5
|
+
.col-sm-3
|
6
6
|
.Card
|
7
7
|
- if marker.title_image
|
8
8
|
= image_tag marker.title_image.image.url(:thumb)
|
9
9
|
- else
|
10
10
|
= image_missing_tag
|
11
11
|
.flex-row
|
12
|
-
.
|
12
|
+
%div{ class: marker.is_active ? 'is_active' : 'not_is_active' } #{marker.name}
|
13
|
+
- if marker.destination
|
14
|
+
.a <b>=></b> #{marker.destination&.name}
|
15
|
+
.flex-row
|
16
|
+
%div{ class: marker.is_3d ? 'is_3d' : 'not_is_3d' } [3d]
|
13
17
|
.a= button_to '~', edit_marker_path(marker), method: :get
|
14
18
|
.a= button_to 'x', marker_path(marker), method: :delete, data: { confirm: 'Are you sure?' }
|
15
19
|
.flex-row
|
16
20
|
.a= link_to '[api]', api_marker_path(marker)
|
17
|
-
.a= link_to '[
|
21
|
+
.a= link_to '[show]', edit_map_path(marker.destination) if marker.destination
|
@@ -8,12 +8,6 @@
|
|
8
8
|
.field
|
9
9
|
= f.label :map
|
10
10
|
= f.select :map_id, options_for_select( @maps_list, selected:( newsitem[:map_id] || params[:map_id] ) ), {}, class: 'select2'
|
11
|
-
-# .field
|
12
|
-
-# = f.label :site
|
13
|
-
-# = f.select :site_id, options_for_select( @sites_list, :selected => ( newsitem[:site_id] || params[:site_id] ) )
|
14
|
-
-# .field
|
15
|
-
-# = f.label :city
|
16
|
-
-# = f.select :city_id, options_for_select( @cities_list, :selected => ( newsitem[:city_id] || params[:city_id] ) )
|
17
11
|
.col-sm-6
|
18
12
|
= f.submit :submit
|
19
13
|
|
@@ -36,13 +36,6 @@
|
|
36
36
|
%h3= link_to n.gallery.name, gallery_path(n.gallery.slug, 0)
|
37
37
|
.meta
|
38
38
|
#{t('newsitems.gallery', :username => n.gallery.username, :date => pretty_date(n.gallery.created_at))}
|
39
|
-
- unless n.gallery.city.blank?
|
40
|
-
= t('cities.in')
|
41
|
-
= link_to n.gallery.city.name, city_path(n.gallery.city.cityname, :lang => :en)
|
42
|
-
- unless n.gallery.tags.blank?
|
43
|
-
= t('tags.in')
|
44
|
-
- n.gallery.tags do |tag|
|
45
|
-
= link_to tag, tag_path(tag.slug)
|
46
39
|
- unless 0 == n.gallery.photos.length
|
47
40
|
.thumbnails
|
48
41
|
- n.gallery.photos.where( :is_trash => false )[0...8].each do |photo|
|
@@ -1,17 +1,8 @@
|
|
1
1
|
|
2
|
-
- if defined? @city
|
3
|
-
- url = city_newsitem_path( @city, @newsitem ) if @city
|
4
|
-
- if defined? @site
|
5
|
-
- url = site_newsitem_path( @site, @newsitem ) if @site
|
6
|
-
|
7
2
|
.newsitems-edit
|
8
3
|
%h1
|
9
4
|
Edit Newsitem
|
10
|
-
|
11
|
-
For site: #{@site.domain} #{@site.lang} <br />
|
12
|
-
- if @city
|
13
|
-
For city: #{@city.name} <br />
|
14
|
-
= render 'form', :newsitem => @newsitem, :url => url
|
5
|
+
= render 'form', :newsitem => @newsitem
|
15
6
|
|
16
7
|
.debug
|
17
8
|
= @newsitem.inspect
|
@@ -1,8 +1,2 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
= render 'ish_manager/sites/header', :site => @resource
|
4
|
-
= render 'index', :newsitems => @newsitems, :site => @resource
|
5
|
-
|
6
|
-
- if @resource.class.name == 'City'
|
7
|
-
= render 'ish_manager/cities/header', :city => @resource
|
8
|
-
= render 'index', :newsitems => @newsitems, :city => @resource
|
2
|
+
= render 'ish_manager/newsitems/index', newsitems: @newsitems
|
@@ -1,11 +1,8 @@
|
|
1
1
|
|
2
2
|
- reports ||= @reports
|
3
3
|
- reports = reports.page( params[:reports_page] ).per( 10 )
|
4
|
-
-
|
5
|
-
|
6
|
-
- else
|
7
|
-
- new_path = new_report_path
|
8
|
-
|
4
|
+
- new_path = new_report_path
|
5
|
+
|
9
6
|
.manager-reports--index
|
10
7
|
.row
|
11
8
|
.col.s12
|
@@ -27,10 +27,6 @@
|
|
27
27
|
= f.select :role_name, options_for_select( [[nil, nil]] + Ish::UserProfile::ROLES.map { |r| [ r, r ] }, :selected => profile.role_name )
|
28
28
|
%label role name
|
29
29
|
|
30
|
-
.input-field
|
31
|
-
= f.select :current_city, options_for_select( @cities_list, :selected => profile.current_city_id )
|
32
|
-
%label City
|
33
|
-
|
34
30
|
.input-field
|
35
31
|
= f.label :fb_access_token
|
36
32
|
= f.text_field :fb_access_token
|
@@ -20,16 +20,10 @@
|
|
20
20
|
.field
|
21
21
|
= f.label :thumb
|
22
22
|
= f.file_field :thumb
|
23
|
-
.field
|
24
|
-
= f.label :tags
|
25
|
-
= f.select :tag_ids, @tags_list, {}, { multiple: true }
|
26
23
|
.row
|
27
24
|
.col.s3
|
28
25
|
= f.label :premium_tier
|
29
26
|
= f.number_field :premium_tier
|
30
|
-
.col.s3
|
31
|
-
= f.label :site
|
32
|
-
= f.select :site_id, @sites_list
|
33
27
|
.col.s3
|
34
28
|
= f.label :user_profile
|
35
29
|
= f.select :user_profile_id, @user_profiles_list
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= paginate videos, :param_name => :videos_page, :views_prefix => 'templates'
|
7
7
|
- videos.each do |video|
|
8
8
|
.callout
|
9
|
-
%h5= link_to (video.name.blank? ? t('videos.no_title') : video.name),
|
9
|
+
%h5= link_to (video.name.blank? ? t('videos.no_title') : video.name), video_path( video.youtube_id )
|
10
10
|
.text-center= render 'videos/embed', :video => video
|
11
11
|
= video.descr
|
12
12
|
= paginate videos, :param_name => :videos_page, :views_prefix => 'templates'
|
data/config/routes.rb
CHANGED
@@ -50,6 +50,8 @@ IshManager::Engine.routes.draw do
|
|
50
50
|
get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
|
51
51
|
get 'email_contexts/new_with/:template_slug', to: 'email_contexts#new'
|
52
52
|
post 'email_contexts/send/:id', to: 'email_contexts#do_send', as: :email_context_send
|
53
|
+
get 'email_contexts', to: 'email_contexts#index', defaults: { notsent: false }, as: :email_contexts
|
54
|
+
get 'email_contexts/notsent', to: 'email_contexts#index', defaults: { notsent: true }, as: :notsent_email_contexts
|
53
55
|
resources :email_contexts
|
54
56
|
|
55
57
|
get 'email_templates/iframe_src/:id', to: 'email_templates#iframe_src', as: :email_template_iframe
|
data/lib/ish_manager.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.323
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aws-sdk-s3
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: cancancan
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -280,12 +294,6 @@ files:
|
|
280
294
|
- app/controllers/ish_manager/payments_controller.rb
|
281
295
|
- app/controllers/ish_manager/photos_controller.rb
|
282
296
|
- app/controllers/ish_manager/reports_controller.rb
|
283
|
-
- app/controllers/ish_manager/trash/cities_controller.rb
|
284
|
-
- app/controllers/ish_manager/trash/orders_controller.rb
|
285
|
-
- app/controllers/ish_manager/trash/sites_controller.rb
|
286
|
-
- app/controllers/ish_manager/trash/tags_controller.rb
|
287
|
-
- app/controllers/ish_manager/trash/users_controller.rb
|
288
|
-
- app/controllers/ish_manager/trash/venues_controller.rb
|
289
297
|
- app/controllers/ish_manager/user_profiles_controller.rb
|
290
298
|
- app/controllers/ish_manager/videos_controller.rb
|
291
299
|
- app/helpers/ish_manager/application_helper.rb
|
@@ -304,6 +312,7 @@ files:
|
|
304
312
|
- app/views/ish_manager/application/_main_header_admin.haml
|
305
313
|
- app/views/ish_manager/application/_main_header_guy.haml
|
306
314
|
- app/views/ish_manager/application/_meta.haml
|
315
|
+
- app/views/ish_manager/application/_paginate.haml
|
307
316
|
- app/views/ish_manager/application/_profile_pic.haml
|
308
317
|
- app/views/ish_manager/application/_search.haml
|
309
318
|
- app/views/ish_manager/application/home.haml
|
@@ -328,13 +337,7 @@ files:
|
|
328
337
|
- app/views/ish_manager/email_templates/iframe_src.haml
|
329
338
|
- app/views/ish_manager/email_templates/index.haml
|
330
339
|
- app/views/ish_manager/email_templates/show.haml
|
331
|
-
- app/views/ish_manager/
|
332
|
-
- app/views/ish_manager/features/_index.haml
|
333
|
-
- app/views/ish_manager/features/_item.haml
|
334
|
-
- app/views/ish_manager/features/edit.haml
|
335
|
-
- app/views/ish_manager/features/index.haml
|
336
|
-
- app/views/ish_manager/features/new.haml
|
337
|
-
- app/views/ish_manager/features/show.haml
|
340
|
+
- app/views/ish_manager/email_unsubscribes/new.haml
|
338
341
|
- app/views/ish_manager/galleries/_form.haml
|
339
342
|
- app/views/ish_manager/galleries/_index.haml
|
340
343
|
- app/views/ish_manager/galleries/_index_title.haml
|
@@ -377,7 +380,6 @@ files:
|
|
377
380
|
- app/views/ish_manager/markers/_form.haml
|
378
381
|
- app/views/ish_manager/markers/_header.haml
|
379
382
|
- app/views/ish_manager/markers/_index.haml
|
380
|
-
- app/views/ish_manager/markers/_index_small.haml-trash
|
381
383
|
- app/views/ish_manager/markers/edit.haml
|
382
384
|
- app/views/ish_manager/markers/new.haml
|
383
385
|
- app/views/ish_manager/meetings/_form.haml
|
@@ -411,47 +413,6 @@ files:
|
|
411
413
|
- app/views/ish_manager/reports/index.haml
|
412
414
|
- app/views/ish_manager/reports/new.haml
|
413
415
|
- app/views/ish_manager/reports/show.haml
|
414
|
-
- app/views/ish_manager/tags/_features.haml
|
415
|
-
- app/views/ish_manager/tags/_form.haml
|
416
|
-
- app/views/ish_manager/tags/_index.haml
|
417
|
-
- app/views/ish_manager/tags/_item.haml
|
418
|
-
- app/views/ish_manager/tags/_list.haml
|
419
|
-
- app/views/ish_manager/tags/_list_simple.haml
|
420
|
-
- app/views/ish_manager/tags/_meta.haml
|
421
|
-
- app/views/ish_manager/tags/edit.haml
|
422
|
-
- app/views/ish_manager/tags/index.haml
|
423
|
-
- app/views/ish_manager/tags/new.haml
|
424
|
-
- app/views/ish_manager/tags/show.haml
|
425
|
-
- app/views/ish_manager/trash/cities/_form.haml
|
426
|
-
- app/views/ish_manager/trash/cities/_header.haml
|
427
|
-
- app/views/ish_manager/trash/cities/edit.haml
|
428
|
-
- app/views/ish_manager/trash/cities/edit_feature.haml
|
429
|
-
- app/views/ish_manager/trash/cities/index.haml
|
430
|
-
- app/views/ish_manager/trash/cities/new.haml
|
431
|
-
- app/views/ish_manager/trash/cities/new_feature.haml
|
432
|
-
- app/views/ish_manager/trash/cities/new_newsitem.haml
|
433
|
-
- app/views/ish_manager/trash/cities/show.haml
|
434
|
-
- app/views/ish_manager/trash/events/_form.haml
|
435
|
-
- app/views/ish_manager/trash/events/_index.haml
|
436
|
-
- app/views/ish_manager/trash/events/edit.haml
|
437
|
-
- app/views/ish_manager/trash/events/index.haml
|
438
|
-
- app/views/ish_manager/trash/events/new.haml
|
439
|
-
- app/views/ish_manager/trash/meeting_mailer/README.txt
|
440
|
-
- app/views/ish_manager/trash/sites/_form.haml
|
441
|
-
- app/views/ish_manager/trash/sites/_header.haml
|
442
|
-
- app/views/ish_manager/trash/sites/edit.haml
|
443
|
-
- app/views/ish_manager/trash/sites/galleries.haml
|
444
|
-
- app/views/ish_manager/trash/sites/index.haml
|
445
|
-
- app/views/ish_manager/trash/sites/new.haml
|
446
|
-
- app/views/ish_manager/trash/sites/show.haml
|
447
|
-
- app/views/ish_manager/trash/venues/_form.haml
|
448
|
-
- app/views/ish_manager/trash/venues/_index.haml
|
449
|
-
- app/views/ish_manager/trash/venues/_search.haml
|
450
|
-
- app/views/ish_manager/trash/venues/edit.haml
|
451
|
-
- app/views/ish_manager/trash/venues/index.haml
|
452
|
-
- app/views/ish_manager/trash/venues/new.haml
|
453
|
-
- app/views/ish_manager/trash/venues/show.haml
|
454
|
-
- app/views/ish_manager/unsubscribes/new.haml
|
455
416
|
- app/views/ish_manager/user_profiles/_form.haml
|
456
417
|
- app/views/ish_manager/user_profiles/_show.haml
|
457
418
|
- app/views/ish_manager/user_profiles/edit.haml
|
@@ -478,7 +439,6 @@ files:
|
|
478
439
|
- app/views/ish_manager/videos/show.haml
|
479
440
|
- app/views/layouts/ish_manager/README.txt
|
480
441
|
- app/views/layouts/ish_manager/application.haml
|
481
|
-
- app/views/layouts/ish_manager/application.haml-trash
|
482
442
|
- config/routes.rb
|
483
443
|
- lib/ish_manager.rb
|
484
444
|
- lib/ish_manager/engine.rb
|
@@ -1,107 +0,0 @@
|
|
1
|
-
class IshManager::CitiesController < IshManager::ApplicationController
|
2
|
-
before_action :set_lists, :only => [ :new_newsitem, :create_newsitem ]
|
3
|
-
before_action :sett_city, :only => [ :show, :edit ]
|
4
|
-
|
5
|
-
def index
|
6
|
-
authorize! :index, City
|
7
|
-
@cities = City.unscoped
|
8
|
-
@city = City.new
|
9
|
-
@photo = Photo.new
|
10
|
-
end
|
11
|
-
|
12
|
-
def show
|
13
|
-
authorize! :show, @city
|
14
|
-
@videos = @city.videos.page( params[:videos_page] ).per( Video::PER_PAGE )
|
15
|
-
@venues = @city.venues.page( params[:venues_page] ).per( Venue::PER_PAGE )
|
16
|
-
@galleries = @city.galleries.page( params[:galleries_page] ).per( Gallery::PER_PAGE )
|
17
|
-
@reports = @city.reports.page( params[:reports_page] ).per( Report::PER_PAGE )
|
18
|
-
@newsitems = @city.newsitems.page( params[:newsitems_page] ).per( Newsitem::PER_PAGE )
|
19
|
-
if params[:q]
|
20
|
-
@venues = @venues.where({ :name => /#{params[:q]}/i })
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def new
|
25
|
-
@city = City.new
|
26
|
-
authorize! :new, City
|
27
|
-
|
28
|
-
@photo = Photo.new
|
29
|
-
end
|
30
|
-
|
31
|
-
def create
|
32
|
-
@city = City.new params[:city].permit!
|
33
|
-
authorize! :create, @city
|
34
|
-
|
35
|
-
if @city.save
|
36
|
-
flash[:notice] = 'Success'
|
37
|
-
redirect_to cities_path
|
38
|
-
else
|
39
|
-
flash[:alert] = 'No Luck'
|
40
|
-
render :action => :new
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def edit
|
45
|
-
authorize! :edit, @city
|
46
|
-
end
|
47
|
-
|
48
|
-
def update
|
49
|
-
@city = City.find( params[:id] )
|
50
|
-
authorize! :update, @city
|
51
|
-
@city.update_attributes params[:city].permit!
|
52
|
-
if params[:photo]
|
53
|
-
photo = Photo.new :photo => params[:photo]
|
54
|
-
@city.profile_photo = photo
|
55
|
-
end
|
56
|
-
if @city.save
|
57
|
-
::Ish::CacheKey.one.update_attributes( :cities => Time.now, :feature_cities => Time.now )
|
58
|
-
flash[:notice] = 'Success'
|
59
|
-
redirect_to city_path @city.id
|
60
|
-
else
|
61
|
-
flash[:alert] = 'No Luck. ' + @city.errors.inspect
|
62
|
-
@newsitems = @city.newsitems.all.page( params[:newsitems_page] )
|
63
|
-
@features = @city.features.all.page( params[:features_page] )
|
64
|
-
@photo = Photo.new
|
65
|
-
render :action => :edit
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
def change_profile_pic
|
70
|
-
authorize! :update, City
|
71
|
-
@city = City.find params[:id]
|
72
|
-
@photo = Photo.new params[:photo]
|
73
|
-
@photo.user = @current_user
|
74
|
-
flag = @photo.save
|
75
|
-
@city.profile_photo = @photo
|
76
|
-
flagg = @city.save
|
77
|
-
if flag && flagg
|
78
|
-
flash[:notice] = 'Success'
|
79
|
-
else
|
80
|
-
flash[:alert] = "No Luck. #{@photo.errors.messages} #{@city.errors.messages}"
|
81
|
-
end
|
82
|
-
redirect_to cities_path
|
83
|
-
end
|
84
|
-
|
85
|
-
def delete
|
86
|
-
c = City.find params[:id]
|
87
|
-
if c.delete
|
88
|
-
render
|
89
|
-
else
|
90
|
-
flash[:error] = c.errors.messages
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
private
|
95
|
-
|
96
|
-
def sett_city
|
97
|
-
@city = City.find params[:id]
|
98
|
-
@photo = Photo.new
|
99
|
-
end
|
100
|
-
|
101
|
-
def set_lists
|
102
|
-
@list_reports = Report.all.list
|
103
|
-
@list_galleries = Gallery.all.list
|
104
|
-
@list_users = [['', nil]] + User.all.order_by( :name => :asc ).map { |u| [u.username, u.username] }
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
@@ -1,95 +0,0 @@
|
|
1
|
-
|
2
|
-
class IshManager::SitesController < IshManager::ApplicationController
|
3
|
-
|
4
|
-
# alphabetized
|
5
|
-
|
6
|
-
def create
|
7
|
-
authorize! :create, Site.new
|
8
|
-
params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ") if params[:site][:private_user_emails]
|
9
|
-
@site = Site.new params[:site].permit!
|
10
|
-
if @site.save
|
11
|
-
flash[:notice] = 'Success'
|
12
|
-
else
|
13
|
-
flash[:alert] = 'No Luck. ' + @site.errors.inspect
|
14
|
-
end
|
15
|
-
|
16
|
-
redirect_to sites_path
|
17
|
-
end
|
18
|
-
|
19
|
-
def edit
|
20
|
-
@site = Site.unscoped.find params[:id]
|
21
|
-
authorize! :update, @site
|
22
|
-
end
|
23
|
-
|
24
|
-
def galleries
|
25
|
-
@site = Site.find params[:site_id]
|
26
|
-
authorize! :galleries_index, @site
|
27
|
-
@galleries = @site.galleries.page( params[:galleries_page] )
|
28
|
-
end
|
29
|
-
|
30
|
-
def index
|
31
|
-
authorize! :sites_index, ::Manager
|
32
|
-
@site_groups = Site.where( :is_trash => false ).order_by( :lang => :desc ).group_by {|s|s.domain}
|
33
|
-
end
|
34
|
-
|
35
|
-
def new
|
36
|
-
@site = Site.new
|
37
|
-
authorize! :new, @site
|
38
|
-
end
|
39
|
-
|
40
|
-
def newsitem_delete
|
41
|
-
@site = Site.find params[:site_id]
|
42
|
-
authorize! :update, @site
|
43
|
-
n = @site.newsitems.find( params[:newsitem_id] )
|
44
|
-
n.delete
|
45
|
-
@site.touch
|
46
|
-
@site.save
|
47
|
-
flash[:notice] = 'Probably successfully deleted a newsitem.'
|
48
|
-
redirect_to site_path( @site.id )
|
49
|
-
end
|
50
|
-
|
51
|
-
def reports
|
52
|
-
@site = Site.find params[:site_id]
|
53
|
-
authorize! :reports_index, @site
|
54
|
-
@reports = @site.reports.page( params[:reports_page] )
|
55
|
-
render 'ish_manager/reports/index'
|
56
|
-
end
|
57
|
-
|
58
|
-
def show
|
59
|
-
@site = Site.unscoped.find params[:id]
|
60
|
-
authorize! :show, @site
|
61
|
-
@galleries = @site.galleries.page( params[:galleries_page] ).per( 10 )
|
62
|
-
@reports = @site.reports.page( params[:reports_page] ).per( 10 )
|
63
|
-
@videos = @site.videos.page( params[:videos_page] ).per( 5 )
|
64
|
-
@tags = Tag.where( :site_id => @site.id, :parent_tag_id => nil ).page( params[:tags_page] ).per( 100 )
|
65
|
-
@features = @site.features.limit( @site.n_features ) # page( params[:features_page] ).per( 9 )
|
66
|
-
@newsitems = @site.newsitems.page( params[:newsitems_page] ).per( @site.newsitems_per_page )
|
67
|
-
end
|
68
|
-
|
69
|
-
# not trash
|
70
|
-
def trash
|
71
|
-
@sites = Site.unscoped.where( :is_trash => true ).order_by( :domainname => :desc, :lang => :desc )
|
72
|
-
render :action => :index
|
73
|
-
end
|
74
|
-
|
75
|
-
def update
|
76
|
-
@site = Site.unscoped.find params[:id]
|
77
|
-
authorize! :update, @site
|
78
|
-
|
79
|
-
params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ")
|
80
|
-
|
81
|
-
if @site.update_attributes params[:site].permit!
|
82
|
-
flash[:notice] = 'Success'
|
83
|
-
else
|
84
|
-
flash[:alert] = 'No Luck'
|
85
|
-
end
|
86
|
-
redirect_to sites_path
|
87
|
-
end
|
88
|
-
|
89
|
-
#
|
90
|
-
# private
|
91
|
-
#
|
92
|
-
private
|
93
|
-
|
94
|
-
end
|
95
|
-
|