ish_manager 0.1.8.79 → 0.1.8.80

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b7323d467dbb8abc968dd0fd97e3eea648c2c7d
4
- data.tar.gz: b0506e9f069b96e5153e51354cbfde3c0bd18f99
3
+ metadata.gz: c496047d0ba8bc97bb079a3b8c1376acd3139ade
4
+ data.tar.gz: 59c10cd6e7f1f3a9650587f65d47a840e281c30f
5
5
  SHA512:
6
- metadata.gz: 8696ff2900e3f5e78d670cb7754ca0060394d7020456333be444789aa648588cbea245e89a3e5aad40f864fdeb767a2bb1c730215ba0de898098fa3ceca8e7fe
7
- data.tar.gz: f734e888895b4529cf42e18c6c1412907a1b75360d48ac445d56ebe61cd7576a725889cfd9c32f7b20a47a17e9a45f0acc585efaf0ab7affa402308f6294fe37
6
+ metadata.gz: 270b770ce3f3451a12721060b353d5bb56577fd775ba447adb04bf0673e3178a9b85bd2ad921012cb74d5e987c05391ccde5533861008ef51c3bd877be499dbd
7
+ data.tar.gz: f8dd14f212e5f2a4d4960e2c308c0ec5d4986ed165332886827e200e6befff8f0718ccafe1858936b59590941483a21fd53a37864514edee9d97a174a9c9fcd1
@@ -7,7 +7,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
7
7
  @galleries = Gallery.unscoped.where( :is_trash => false, :user_profile => current_user.profile
8
8
  ).order_by( :created_at => :desc
9
9
  ).page( params[:galleries_page] ).per( 10 )
10
- @shared_galleries = current_user.profile.shared_galleries.page( params[:shared_galleries_page] ).per( 10 )
10
+ @shared_galleries = current_user.profile.shared_galleries.unscoped.where( :is_trash => false ).page( params[:shared_galleries_page] ).per( 10 )
11
11
  end
12
12
 
13
13
  def index_thumb
@@ -8,11 +8,6 @@ class IshManager::Ability
8
8
  # signed in user
9
9
  #
10
10
  unless user.blank?
11
-
12
- can [ :index, :new, :create ], ::Gallery
13
- can [ :show, :edit, :update, :create_photo ], ::Gallery do |gallery|
14
- gallery.user_profile == user.profile
15
- end
16
11
 
17
12
  can [ :home ], ::IshManager::Ability
18
13
 
@@ -21,7 +16,7 @@ class IshManager::Ability
21
16
  #
22
17
  # role manager
23
18
  #
24
- if user.profile && [ :manager, :admin ].include?( user.profile.role_name )
19
+ if user.profile && [ :admin, :manager ].include?( user.profile.role_name )
25
20
 
26
21
  can [ :create_newsitem, :show, :new_feature, :create_feature ], ::City
27
22
 
@@ -42,15 +37,29 @@ class IshManager::Ability
42
37
 
43
38
  end
44
39
 
40
+ #
41
+ # only sudoer... total power
42
+ #
45
43
  if user.profile && user.profile.sudoer?
46
- can :manage, :all # @TODO: this is important
47
- can [ :manage ], ::Gallery
48
- can [ :manage ], ::Gallery2
49
- can [ :home ], ::Manager
50
- can :destroy, ::Photo
44
+ can :manage, :all
45
+ end
46
+
47
+ #
48
+ # role guy (and manager)
49
+ #
50
+ if user.profile && [ :manager, :guy ].include?( user.profile.role_name )
51
+
52
+ can [ :index, :new, :create ], ::Gallery
53
+ can [ :show, :edit, :update, :create_photo ], ::Gallery do |gallery|
54
+ gallery.user_profile == user.profile
55
+ end
56
+
57
+ can [ :index ], ::Report
58
+
59
+ can [ :index ], ::Video
60
+
51
61
  end
52
62
 
53
-
54
63
  end
55
64
  #
56
65
  # anonymous user
@@ -6,26 +6,10 @@
6
6
  %i.fa.fa-compress.collapse-expand#collapseHeader
7
7
  .content
8
8
  %ul.nav.nav-pills
9
- %li{ :class => params[:controller] == 'ish_manager/cities' ? 'active' : '' }= link_to 'Cities', cities_path
10
- %li{ :class => params[:controller] == 'ish_manager/events' ? 'active' : '' }= link_to 'Events', events_path
11
- %li{ :class => params[:controller] == 'ish_manager/venues' ? 'active' : '' }= link_to 'Venues', venues_path
12
- %li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Profiles', user_profiles_path
13
- %li{ :class => params[:controller] == 'ish_manager/friends ' ? 'active' : '' }= link_to 'Friends', friends_path
14
- %ul.nav.nav-pills
15
- %li{ :class => params[:controller] == 'ish_manager/sites' ? 'active' : '' }= link_to 'Sites', sites_path
16
9
  %li{ :class => params[:controller] == 'ish_manager/galleries' ? 'active' : '' }= link_to 'Galleries', galleries_path
17
10
  %li{ :class => params[:controller] == 'ish_manager/reports' ? 'active' : '' }= link_to 'Reports', reports_path
18
11
  %li{ :class => params[:controller] == 'ish_manager/videos' ? 'active' : '' }= link_to 'Videos', videos_path
19
- %li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
20
- %ul.nav.nav-pills
21
- -# %li{ :class => params[:controller] == 'ish_manager/ally' ? 'active' : '' }= link_to 'Ally', ally_root_path
22
- %li{ :class => params[:controller] == 'ish_manager/stock_actions' ? 'active' : '' }= link_to 'Stock Actions', stock_actions_path
23
- %li{ :class => params[:controller] == 'ish_manager/stock_options' ? 'active' : '' }= link_to 'Stock Options', stock_options_path
24
- %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches', stock_watches_path
25
- %ul.nav.nav-pills
26
- %li{ :class => params[:controller] == 'ish_manager/invoices' ? 'active' : '' }= link_to 'Invoices', invoices_path
27
- %li{ :class => params[:controller] == 'ish_manager/payments' ? 'active' : '' }= link_to 'Payments', payments_path
12
+ %li{ :class => params[:controller] == 'ish_manager/friends ' ? 'active' : '' }= link_to 'Friends', friends_path
28
13
  %ul.nav.nav-pills
29
- %li{ :class => params[:controller] == 'ish_manager/leads' ? 'active' : '' }= link_to 'Leads', leads_path
30
14
  %hr
31
15
 
@@ -0,0 +1,19 @@
1
+
2
+ .manager--main-header
3
+ .container
4
+ .row
5
+ .col-sm-12
6
+ %i.fa.fa-compress.collapse-expand#collapseHeader
7
+ .content
8
+ %ul.nav.nav-pills
9
+ %li{ :class => params[:controller] == 'ish_manager/galleries' ? 'active' : '' }= link_to 'Galleries', galleries_path
10
+ %li{ :class => params[:controller] == 'ish_manager/reports' ? 'active' : '' }= link_to 'Reports', reports_path
11
+ %li{ :class => params[:controller] == 'ish_manager/videos' ? 'active' : '' }= link_to 'Videos', videos_path
12
+ %li{ :class => params[:controller] == 'ish_manager/friends ' ? 'active' : '' }= link_to 'Friends', friends_path
13
+ %ul.nav.nav-pills
14
+ %li{ :class => params[:controller] == 'ish_manager/cities' ? 'active' : '' }= link_to 'Cities', cities_path
15
+ %li{ :class => params[:controller] == 'ish_manager/events' ? 'active' : '' }= link_to 'Events', events_path
16
+ %li{ :class => params[:controller] == 'ish_manager/venues' ? 'active' : '' }= link_to 'Venues', venues_path
17
+ %li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }= link_to 'Tags', tags_path
18
+ %hr
19
+
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.8.79
4
+ version: 0.1.8.80
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -189,6 +189,7 @@ files:
189
189
  - app/views/ish_manager/application/_main_header.haml~
190
190
  - app/views/ish_manager/application/_main_header_admin.haml
191
191
  - app/views/ish_manager/application/_main_header_guy.haml
192
+ - app/views/ish_manager/application/_main_header_manager.html
192
193
  - app/views/ish_manager/application/_meta.haml
193
194
  - app/views/ish_manager/application/_meta.haml~
194
195
  - app/views/ish_manager/application/home.haml