ish_manager 0.1.0 → 0.1.1

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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ish_manager/application.js +1 -0
  3. data/app/assets/stylesheets/ish_manager/application.css +0 -4
  4. data/app/controllers/ish_manager/application_controller.rb +1 -1
  5. data/app/controllers/ish_manager/sites_controller.rb +0 -2
  6. data/app/helpers/ish_manager/images_helper.rb +1 -2
  7. data/app/views/ish_manager/application/_main_footer.haml +2 -6
  8. data/app/views/ish_manager/cities/edit.haml +3 -3
  9. data/app/views/ish_manager/sites/_form.haml +1 -1
  10. data/app/views/ish_manager/sites/edit.haml +2 -2
  11. data/app/views/ish_manager/sites/index.haml +7 -7
  12. data/app/views/layouts/ish_manager/application.haml +1 -2
  13. data/config/routes.rb +1 -4
  14. data/lib/ish_manager.rb +0 -2
  15. data/lib/ish_manager/version.rb +1 -1
  16. metadata +1 -80
  17. data/app/controllers/ish_manager/features_controller.rb +0 -125
  18. data/app/controllers/ish_manager/galleries_controller.rb +0 -86
  19. data/app/controllers/ish_manager/newsitems_controller.rb +0 -113
  20. data/app/controllers/ish_manager/photos_controller.rb +0 -55
  21. data/app/controllers/ish_manager/reports_controller.rb +0 -64
  22. data/app/controllers/ish_manager/tags_controller.rb +0 -54
  23. data/app/controllers/ish_manager/users_controller.rb +0 -13
  24. data/app/views/ish_manager/features/_form.haml +0 -61
  25. data/app/views/ish_manager/features/_index.haml +0 -23
  26. data/app/views/ish_manager/features/_item.haml +0 -14
  27. data/app/views/ish_manager/features/edit.haml +0 -16
  28. data/app/views/ish_manager/features/index.haml +0 -25
  29. data/app/views/ish_manager/features/new.haml +0 -11
  30. data/app/views/ish_manager/features/show.haml +0 -0
  31. data/app/views/ish_manager/galleries/#_thumbs.haml# +0 -5
  32. data/app/views/ish_manager/galleries/_form.haml +0 -46
  33. data/app/views/ish_manager/galleries/_index.haml +0 -14
  34. data/app/views/ish_manager/galleries/_list.haml +0 -23
  35. data/app/views/ish_manager/galleries/_list_short.haml +0 -9
  36. data/app/views/ish_manager/galleries/_menu_secondary.haml +0 -13
  37. data/app/views/ish_manager/galleries/_meta.haml +0 -16
  38. data/app/views/ish_manager/galleries/_search.haml +0 -7
  39. data/app/views/ish_manager/galleries/_thumbs.haml +0 -12
  40. data/app/views/ish_manager/galleries/_title.haml +0 -17
  41. data/app/views/ish_manager/galleries/all_photos.haml +0 -4
  42. data/app/views/ish_manager/galleries/edit.haml +0 -11
  43. data/app/views/ish_manager/galleries/index.haml +0 -18
  44. data/app/views/ish_manager/galleries/index_ajax.haml +0 -9
  45. data/app/views/ish_manager/galleries/index_mini.haml +0 -0
  46. data/app/views/ish_manager/galleries/index_short.haml +0 -19
  47. data/app/views/ish_manager/galleries/index_thumb.haml +0 -16
  48. data/app/views/ish_manager/galleries/index_title.haml +0 -15
  49. data/app/views/ish_manager/galleries/index_trash.haml +0 -20
  50. data/app/views/ish_manager/galleries/new.haml +0 -7
  51. data/app/views/ish_manager/galleries/show.haml +0 -34
  52. data/app/views/ish_manager/newsitems/_form.haml +0 -10
  53. data/app/views/ish_manager/newsitems/_index.haml +0 -17
  54. data/app/views/ish_manager/newsitems/_item.haml +0 -53
  55. data/app/views/ish_manager/newsitems/edit.haml +0 -14
  56. data/app/views/ish_manager/newsitems/new.haml +0 -16
  57. data/app/views/ish_manager/photos/_meta.haml +0 -9
  58. data/app/views/ish_manager/photos/_multinew.haml +0 -23
  59. data/app/views/ish_manager/photos/show.haml +0 -2
  60. data/app/views/ish_manager/photos/without_gallery.haml +0 -11
  61. data/app/views/ish_manager/reports/_form.haml +0 -42
  62. data/app/views/ish_manager/reports/_index.haml +0 -16
  63. data/app/views/ish_manager/reports/edit.haml +0 -6
  64. data/app/views/ish_manager/reports/index.haml +0 -26
  65. data/app/views/ish_manager/reports/new.haml +0 -5
  66. data/app/views/ish_manager/reports/show.haml +0 -18
  67. data/app/views/ish_manager/videos/_index.haml +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ce0fccb4817d3a05391277ec43e57ace793dddf
4
- data.tar.gz: 0337cc6d5583e8d51413f572fd6b00a9778ee379
3
+ metadata.gz: 0cfa88bf3f34c888931d6c74c7947a808bfba2e3
4
+ data.tar.gz: d2accbb15d1c9ddff1752369420a11e2e1def753
5
5
  SHA512:
6
- metadata.gz: 3e6c620f49ea91881f1f368f0e3551675dfb2bdab9762757c4ddc4dadf88191ad8c75fff08bf0e0d62be9f97156e1ee1fa3200e755ff26e033c000d748cbea87
7
- data.tar.gz: e8b39c52bbf2b540eb270da8621f88903d6d3a7628e42e9173bb5e26ca5d353661a681f5aa155364ca91aa3e5db140d3b3328653699aeef1428ad8d6d7f000e1
6
+ metadata.gz: edad58e14796b84da5ea868aac3cafb6779daa0f2f73516f2ceef82a1609ec0bd79c8e2d57bc7d8bf57ca24c6a839034d13e0d48e0d2fa1986a0c48847b0336a
7
+ data.tar.gz: e5ee903cd3e72877bb8b733c90da50b0e75a9037b872340c648cc815cc0a7681bfeafbb7e313c0d2480c508b13ce6e9477f6736cb5ce9fe003db6996ec9c7b2a
@@ -12,3 +12,4 @@
12
12
  //
13
13
  //= require_tree .
14
14
  //
15
+
@@ -13,7 +13,3 @@
13
13
  *= require_tree .
14
14
  *= require_self
15
15
  */
16
-
17
- .center {
18
- text-align: center;
19
- }
@@ -1,8 +1,8 @@
1
1
  module IshManager
2
2
  class ApplicationController < ActionController::Base
3
3
  protect_from_forgery :with => :exception
4
+
4
5
  before_action :set_current_ability
5
- check_authorization
6
6
 
7
7
  def home
8
8
  authorize! :home, Manager
@@ -1,7 +1,6 @@
1
1
  class IshManager::SitesController < IshManager::ApplicationController
2
2
 
3
3
  def index
4
- authorize! :index, @site
5
4
  @sites = Site.all.order_by( :domainname => :desc, :lang => :desc )
6
5
  end
7
6
 
@@ -13,7 +12,6 @@ class IshManager::SitesController < IshManager::ApplicationController
13
12
 
14
13
  def show
15
14
  @site = Site.find params[:id]
16
- authorize! :show, @site
17
15
  @galleries = @site.galleries.unscoped.where({ :is_trash => false }).page( params[:galleries_page] ).per( 10 )
18
16
  @reports = @site.reports.unscoped.where({ :is_trash => false }).page( params[:reports_page] ).per( 10 )
19
17
  @videos = @site.videos.page( params[:videos_page] ).per( 5 )
@@ -30,8 +30,7 @@ module IshManager::ImagesHelper
30
30
  end
31
31
 
32
32
  def image_flag locale
33
- # image_tag "flags/#{locale.to_s}.png"
34
- "[#{locale.to_s}]"
33
+ image_tag "flags/#{locale.to_s}.png"
35
34
  end
36
35
 
37
36
  def image_city cityname
@@ -3,12 +3,8 @@
3
3
  %ul
4
4
  %li ^__^
5
5
  - if current_user
6
- %li
7
- >[ #{current_user.email} ]<
8
- %div{ :style => 'float: left' }= button_to '[x]', main_app.destroy_user_session_path, :method => :delete
6
+ %li >[ #{current_user.email} ]<
9
7
  - else
10
- %li
11
- Please log in
12
- = link_to '[+]', main_app.new_user_session_path
8
+ %li Please log in
13
9
 
14
10
 
@@ -1,11 +1,11 @@
1
1
 
2
2
  %h1.center= @city.name
3
- = render 'form', :url => city_path
3
+ = render 'form', :url => manager_city_path
4
4
  %hr
5
5
 
6
6
  .row
7
7
  .small-12.columns
8
- = render 'ish_manager/features/index', :features => @city.features, :city => @city
8
+ = render 'manager/features/index', :features => @city.features, :city => @city
9
9
  %hr
10
- = render 'ish_manager/newsitems/index', :newsitems => @city.newsitems, :city => @city
10
+ = render 'manager/newsitems/index', :newsitems => @city.newsitems, :city => @city
11
11
 
@@ -1,5 +1,5 @@
1
1
 
2
- - url ||= site_path(site)
2
+ - url ||= manager_site_path(site)
3
3
  .manager-sites--form
4
4
  = form_for site, :url => url do |f|
5
5
  .row
@@ -5,5 +5,5 @@
5
5
  %br
6
6
  %br
7
7
 
8
- = render 'form', :site => @site
9
- = render 'ish_manager/newsitems/index', :newsitems => @site.newsitems.limit(10), :site => @site
8
+ = render 'manager/sites/form', :site => @site
9
+ = render 'manager/newsitems/index', :newsitems => @site.newsitems.limit(10), :site => @site
@@ -1,11 +1,11 @@
1
1
 
2
- .sites-index
3
- %h3 Sites
2
+ .manager-sites-index
4
3
  .row
5
- - @sites.each do |site|
6
- .col-xs-6
7
- .panel.panel-primary
8
- .panel-body
4
+ .large-12.columns
5
+ %h3 Sites
6
+ %ul.large-block-grid-2
7
+ - @sites.each do |site|
8
+ %li
9
9
  %h4
10
10
  = link_to "http://#{site.domain}/#{site.lang}", site_path( site )
11
11
  = link_to '[~]', edit_site_path( site )
@@ -24,4 +24,4 @@
24
24
  #{site.tags.length} tags
25
25
  %li
26
26
  #{site.videos.length} videos
27
-
27
+
@@ -9,6 +9,5 @@
9
9
  = render :partial => 'ish_manager/application/main_header'
10
10
  %p.notice= notice
11
11
  %p.alert= alert
12
- .container
13
- = yield
12
+ = yield
14
13
  = render :partial => 'ish_manager/application/main_footer'
data/config/routes.rb CHANGED
@@ -1,14 +1,11 @@
1
1
  IshManager::Engine.routes.draw do
2
2
  root :to => 'application#home'
3
3
 
4
- resources :cities do
5
- resources :features
6
- end
4
+ resources :cities
7
5
  resources :events
8
6
  resources :galleries
9
7
  resources :newsitems
10
8
  resources :reports
11
- resources :photos
12
9
  resources :sites do
13
10
  resources :galleries
14
11
  resources :reports
data/lib/ish_manager.rb CHANGED
@@ -2,8 +2,6 @@
2
2
  require "ish_manager/engine"
3
3
  require 'haml'
4
4
  require 'cancancan'
5
- require 'kaminari/mongoid'
6
- require 'kaminari/actionview'
7
5
 
8
6
  module IshManager
9
7
  # Your code goes here...
@@ -1,3 +1,3 @@
1
1
  module IshManager
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -80,34 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '4.3'
83
- - !ruby/object:Gem::Dependency
84
- name: kaminari-mongoid
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.0'
97
- - !ruby/object:Gem::Dependency
98
- name: kaminari-actionview
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.0'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.0'
111
83
  description: Description of IshManager.
112
84
  email:
113
85
  - piousbox@gmail.com
@@ -427,15 +399,8 @@ files:
427
399
  - app/assets/stylesheets/ish_manager/bootstrap.min.css.map
428
400
  - app/controllers/ish_manager/application_controller.rb
429
401
  - app/controllers/ish_manager/cities_controller.rb
430
- - app/controllers/ish_manager/features_controller.rb
431
- - app/controllers/ish_manager/galleries_controller.rb
432
402
  - app/controllers/ish_manager/galleries_controller.rb~
433
- - app/controllers/ish_manager/newsitems_controller.rb
434
- - app/controllers/ish_manager/photos_controller.rb
435
- - app/controllers/ish_manager/reports_controller.rb
436
403
  - app/controllers/ish_manager/sites_controller.rb
437
- - app/controllers/ish_manager/tags_controller.rb
438
- - app/controllers/ish_manager/users_controller.rb
439
404
  - app/helpers/ish_manager/application_helper.rb
440
405
  - app/helpers/ish_manager/images_helper.rb
441
406
  - app/jobs/ish_manager/application_job.rb
@@ -456,67 +421,23 @@ files:
456
421
  - app/views/ish_manager/cities/new_feature.haml
457
422
  - app/views/ish_manager/cities/new_newsitem.haml
458
423
  - app/views/ish_manager/cities/show.haml
459
- - app/views/ish_manager/features/_form.haml
460
- - app/views/ish_manager/features/_index.haml
461
424
  - app/views/ish_manager/features/_index.haml~
462
- - app/views/ish_manager/features/_item.haml
463
- - app/views/ish_manager/features/edit.haml
464
- - app/views/ish_manager/features/index.haml
465
- - app/views/ish_manager/features/new.haml
466
- - app/views/ish_manager/features/show.haml
467
- - app/views/ish_manager/galleries/#_thumbs.haml#
468
- - app/views/ish_manager/galleries/_form.haml
469
- - app/views/ish_manager/galleries/_index.haml
470
- - app/views/ish_manager/galleries/_list.haml
471
425
  - app/views/ish_manager/galleries/_list.haml~
472
- - app/views/ish_manager/galleries/_list_short.haml
473
- - app/views/ish_manager/galleries/_menu_secondary.haml
474
426
  - app/views/ish_manager/galleries/_menu_secondary.haml~
475
- - app/views/ish_manager/galleries/_meta.haml
476
427
  - app/views/ish_manager/galleries/_meta.haml~
477
- - app/views/ish_manager/galleries/_search.haml
478
428
  - app/views/ish_manager/galleries/_search.haml~
479
- - app/views/ish_manager/galleries/_thumbs.haml
480
429
  - app/views/ish_manager/galleries/_thumbs.haml~
481
- - app/views/ish_manager/galleries/_title.haml
482
- - app/views/ish_manager/galleries/all_photos.haml
483
- - app/views/ish_manager/galleries/edit.haml
484
- - app/views/ish_manager/galleries/index.haml
485
430
  - app/views/ish_manager/galleries/index.haml~
486
- - app/views/ish_manager/galleries/index_ajax.haml
487
- - app/views/ish_manager/galleries/index_mini.haml
488
- - app/views/ish_manager/galleries/index_short.haml
489
- - app/views/ish_manager/galleries/index_thumb.haml
490
- - app/views/ish_manager/galleries/index_title.haml
491
- - app/views/ish_manager/galleries/index_trash.haml
492
- - app/views/ish_manager/galleries/new.haml
493
- - app/views/ish_manager/galleries/show.haml
494
431
  - app/views/ish_manager/galleries/show.haml~
495
- - app/views/ish_manager/newsitems/_form.haml
496
432
  - app/views/ish_manager/newsitems/_form.haml~
497
- - app/views/ish_manager/newsitems/_index.haml
498
433
  - app/views/ish_manager/newsitems/_index.haml~
499
- - app/views/ish_manager/newsitems/_item.haml
500
- - app/views/ish_manager/newsitems/edit.haml
501
434
  - app/views/ish_manager/newsitems/edit.haml~
502
- - app/views/ish_manager/newsitems/new.haml
503
- - app/views/ish_manager/photos/_meta.haml
504
- - app/views/ish_manager/photos/_multinew.haml
505
435
  - app/views/ish_manager/photos/_multinew.haml~
506
- - app/views/ish_manager/photos/show.haml
507
- - app/views/ish_manager/photos/without_gallery.haml
508
- - app/views/ish_manager/reports/_form.haml
509
- - app/views/ish_manager/reports/_index.haml
510
- - app/views/ish_manager/reports/edit.haml
511
- - app/views/ish_manager/reports/index.haml
512
- - app/views/ish_manager/reports/new.haml
513
- - app/views/ish_manager/reports/show.haml
514
436
  - app/views/ish_manager/sites/_form.haml
515
437
  - app/views/ish_manager/sites/edit.haml
516
438
  - app/views/ish_manager/sites/index.haml
517
439
  - app/views/ish_manager/sites/new.haml
518
440
  - app/views/ish_manager/sites/show.haml
519
- - app/views/ish_manager/videos/_index.haml
520
441
  - app/views/layouts/ish_manager/application.haml
521
442
  - app/views/layouts/ish_manager/application.haml~
522
443
  - config/routes.rb
@@ -1,125 +0,0 @@
1
-
2
- class Manager::FeaturesController < Manager::ManagerController
3
-
4
- before_filter :set_lists
5
-
6
- def new
7
- authorize! :new, ManagerFeature.new
8
- @city = City.find params[:city_id] unless params[:city_id].blank?
9
- @site = Site.find params[:site_id] unless params[:site_id].blank?
10
- @tag = Tag.find params[:tag_id] unless params[:tag_id].blank?
11
- @feature = Feature.new
12
- end
13
-
14
- def create
15
- authorize! :create, ManagerFeature.new
16
-
17
- @feature = Feature.new params[:feature].permit( :name, :subhead, :image_path, :link_path, :partial_name, :photo, :weight,
18
- :report, :report_id, :gallery, :gallery_id, :video, :video_id
19
- )
20
- if params[:city_id]
21
- @city = City.find params[:city_id]
22
- @city.features << @feature
23
- redirect_path = manager_cities_path
24
- end
25
- if params[:site_id]
26
- @site = Site.find params[:site_id]
27
- @site.features << @feature
28
- redirect_path = manager_sites_path
29
- end
30
- if params[:tag_id]
31
- @tag = Tag.find params[:tag_id]
32
- @tag.features << @feature
33
- redirect_path = manager_tags_path
34
- end
35
-
36
- if (@city && @city.save) || (@site && @site.save) || (@tag && @tag.save)
37
- flash[:notice] = 'Success.'
38
- redirect_to redirect_path
39
- else
40
- flash[:error] = 'No Luck. ' + ( @city || @site || @tag ).errors.inspect
41
- render :action => :new
42
- end
43
- end
44
-
45
- def edit
46
- authorize! :edit, ManagerCity.new
47
-
48
- if params[:city_id]
49
- @city = City.find params[:city_id]
50
- @feature = @city.features.find params[:id]
51
- end
52
-
53
- if params[:site_id]
54
- @site = Site.find params[:site_id]
55
- @feature = @site.features.find params[:id]
56
- end
57
-
58
- if params[:tag_id]
59
- @tag = Tag.find params[:tag_id]
60
- @feature = @tag.features.find params[:id]
61
- end
62
-
63
- if params[:venue_id]
64
- @venue = Tag.find params[:venue_id]
65
- @feature = @venue.features.find params[:id]
66
- end
67
-
68
- end
69
-
70
- def update
71
- unless params[:city_id].blank?
72
- @city = City.find params[:city_id]
73
- authorize! :update, ManagerCity.new
74
- @feature = @city.features.find params[:id]
75
- redirect_path = manager_city_path( @city )
76
- end
77
- unless params[:site_id].blank?
78
- @site = Site.find params[:site_id]
79
- authorize! :update, ManagerSite.new
80
- @feature = @site.features.find params[:id]
81
- redirect_path = manager_site_path( @site )
82
- end
83
- unless params[:tag_id].blank?
84
- @tag = Tag.find params[:tag_id]
85
- authorize! :update, ManagerTag.new
86
- @feature = @tag.features.find params[:id]
87
- redirect_path = manager_tag_path( @tag )
88
- end
89
-
90
- if @feature.update_attributes params[:feature].permit!
91
- flash[:notice] = 'Success'
92
- redirect_to redirect_path
93
- else
94
- flash[:error] = 'No Luck. ' + @feature.errors.inspect
95
- puts! @feature.errors, 'Errors updating feature'
96
- render :action => :edit_feature
97
- end
98
- end
99
-
100
- def index
101
- if params[:tag_id]
102
- @resource = Tag.find params[:tag_id]
103
- end
104
-
105
- end
106
-
107
- def destroy
108
- if params[:tag_id]
109
- @resource = Tag.find params[:tag_id]
110
- elsif params[:city_id]
111
- @resource = City.find params[:city_id]
112
- elsif params[:site_id]
113
- @resource = Site.find params[:site_id]
114
- end
115
- @feature = @resource.features.find params[:id]
116
- if @feature.destroy
117
- flash[:notice] = :'Success.'
118
- else
119
- flash[:error] = :'No luck.'
120
- end
121
- redirect_to request.referrer
122
- end
123
-
124
- end
125
-
@@ -1,86 +0,0 @@
1
- class IshManager::GalleriesController < IshManager::ApplicationController
2
-
3
- # before_action :set_lists
4
-
5
- def index
6
- authorize! :index, Gallery
7
- @galleries = Gallery.unscoped.where( :is_trash => false ).order_by( :created_at => :desc ).page( params[:galleries_page] ).per( 10 )
8
- end
9
-
10
- def index_thumb
11
- @galleries = Gallery.unscoped.where( :is_trash => false ).order_by( :created_at => :desc ).page( params[:galleries_page] ).per( 10 )
12
- end
13
-
14
- def index_mini
15
- @galleries = Gallery.all
16
- end
17
-
18
- def new
19
- @gallery = Gallery.new
20
- @cities_list = City.list
21
- @tags_list = Tag.list
22
- end
23
-
24
- def create
25
- @gallery = Gallery.new params[:gallery].permit!
26
- @gallery.user = current_user
27
- authorize! :create, @gallery
28
-
29
- if @gallery.save
30
- flash[:notice] = 'Success'
31
- redirect_to manager_galleries_path
32
- else
33
- flash[:error] = 'No Luck. ' + @gallery.errors.inspect
34
- @cities_list = City.list
35
- @tags_list = Tag.list
36
- render :action => 'new'
37
- end
38
- end
39
-
40
- def edit
41
- @gallery = Gallery.unscoped.find params[:id]
42
- end
43
-
44
- def update
45
- @gallery = Gallery.unscoped.find params[:id]
46
- if @gallery.update_attributes( params[:gallery].permit! )
47
- flash[:notice] = 'Success.'
48
- redirect_to manager_galleries_path
49
- else
50
- flash[:error] = 'No Luck. ' + @gallery.errors
51
- render :action => :edit
52
- end
53
- end
54
-
55
- def show
56
- @gallery = Gallery.unscoped.find_by :galleryname => params[:id]
57
- authorize! :show, @gallery
58
- @photos = @gallery.photos.unscoped.where({ :is_trash => false })
59
- end
60
-
61
- def destroy
62
- @gallery = Gallery.unscoped.find params[:id]
63
- @gallery.is_trash = true
64
- @gallery.save
65
- flash[:notice] = 'Logically deleted gallery.'
66
- redirect_to manager_galleries_title_path
67
- end
68
-
69
- def j_show
70
- @gallery = Gallery.unscoped.find( params[:id] )
71
- authorize! :show, @gallery
72
- respond_to do |format|
73
- format.json do
74
- jjj = {}
75
- jjj[:photos] = @gallery.photos.map do |ph|
76
- { :thumbnail_url => ph.photo.url( :thumb ),
77
- :delete_type => 'DELETE',
78
- :delete_url => photo_path(ph) }
79
- end
80
- render :json => jjj
81
- end
82
- end
83
- end
84
-
85
- end
86
-