ish_manager 0.1.8.82 → 0.1.8.83

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1859e6c3e3ed85ff89bc13fda4b1cd8671b4d44
4
- data.tar.gz: 71027c0faf4c9621fe1b4332ebbe78c2fff6d764
3
+ metadata.gz: ef5a6aa55cfb34623bafc25e0357129814e64f0b
4
+ data.tar.gz: 2e0a599ef8b5d9793be419f83664f30b85bae30a
5
5
  SHA512:
6
- metadata.gz: 7063263529b39a4561e6bb12b6599f4c5dddb330566e47b5cf138cb93462055aef4c4935bb6b6697787f6021aa4cf060dd0eb244d3ba8bab3fa6b87d058859ac
7
- data.tar.gz: '038bd6ba08740d280bf893a58bf10cef1035f688286e0b7510c3b47d7f5d0793ad6412be0d3b7da4743121b3630a2f95c7ebd36bdc78b273007d420192c0c266'
6
+ metadata.gz: dde32779443f05995d0ff5b4e6af353567d30ca502c352a0917b482ed2b1fcf2e891960cf74b9045a785a7157c153f913d44db1b0b56a1a5b8190117a104b534
7
+ data.tar.gz: 0bf4c675b191a2de0006484bee432c01a28668e168a7bfb93b2e115c189a13b1049f8c22d76884e44876261f44143b181ba5f7787b77b78ddc5d2d1622c361d8
@@ -53,6 +53,9 @@ class IshManager::Ability
53
53
  can [ :show, :edit, :update, :create_photo ], ::Gallery do |gallery|
54
54
  gallery.user_profile == user.profile
55
55
  end
56
+ can [ :show ], ::Gallery do |gallery|
57
+ gallery.shared_profiles.include? user.profile
58
+ end
56
59
 
57
60
  can [ :index ], ::Report
58
61
 
@@ -1,18 +1,16 @@
1
1
 
2
2
  .meta
3
- On #{item.created_at.to_s[0...10]}
4
- %br
3
+ <b>On</b> #{item.created_at.to_s[0...10]}
5
4
  - if item.city
6
- <b>City:</b> #{link_to item.city.name, city_path( item.city )}
7
- %br
5
+ <b>In City:</b> #{link_to item.city.name, city_path( item.city )}
8
6
  - if item.tag
9
7
  <b>Tag:</b> #{link_to item.tag.name, tag_path( item.tag )}
10
- %br
11
8
  - if item.site
12
9
  <b>Site:</b>
13
10
  = link_to "#{item.site.domain}/#{item.site.lang}", site_path( item.site )
14
- %br
15
- - if item.user
16
- <b>User:</b> #{item.user.email}
17
- %br
11
+ - if item.venue
12
+ <b>Venue:</b>
13
+ = item.venue.inspect
14
+ - if item.user_profile
15
+ <b>By UserProfile:</b> #{item.user_profile.email}
18
16
 
@@ -17,4 +17,4 @@
17
17
  .row
18
18
  .col-sm-6.description
19
19
  Galleries shared with them:
20
- = render 'ish_manager/galleries/index_title', :galleries => friend.shared_galleries
20
+ = render 'ish_manager/galleries/index_title', :galleries => friend.shared_galleries.where( :user_profile => current_user.profile )
@@ -20,9 +20,18 @@
20
20
  .col-sm-4
21
21
  = f.label :venue
22
22
  = select :gallery, :venue_id, @venues_list
23
- .col-sm-4
24
- = f.label 'Shared with'
25
- = f.select :shared_profiles, options_for_select( [[nil,nil,:disabled=>true]]+current_user.profile.friends.map { |f| [ f.email, f.id ] }, :selected => gallery.shared_profiles.map(&:id) ), {}, { :multiple => true }
23
+ .row
24
+ .panel
25
+ .panel-body
26
+ .col-sm-4
27
+ = f.label 'Shared with'
28
+ = f.select :shared_profiles, options_for_select( [[nil,nil,:disabled=>true]]+current_user.profile.friends.map { |f| [ f.email, f.id ] }, :selected => gallery.shared_profiles.map(&:id) ), {}, { :multiple => true }
29
+ .col-sm-4
30
+ Shared with:<br />
31
+ - gallery.shared_profiles.each do |p|
32
+ &gt; #{p.email} <br />
33
+ .col-sm-4
34
+ "/
26
35
 
27
36
  .row
28
37
  .col-sm-3
@@ -5,14 +5,13 @@
5
5
  - if galleries.length > 0
6
6
  .galleries--list
7
7
  - galleries.each do |g|
8
- .item
9
- %h5
10
- = link_to '[~]', edit_gallery_path( g )
11
- = link_to g.name, gallery_path(g.galleryname)
8
+ %h5
9
+ = link_to '[~]', edit_gallery_path( g )
10
+ = link_to g.name, gallery_path(g.galleryname)
12
11
  .c
13
12
 
14
13
  - if galleries.respond_to? :total_pages
15
14
  = paginate galleries, :param_name => param_name
16
15
 
17
16
  - else
18
- %h5 No Galleries
17
+ %p No Galleries
@@ -5,17 +5,19 @@
5
5
  - if galleries.length > 0
6
6
  .galleries--list
7
7
  - galleries.each do |g|
8
- .item
9
- %h3
10
- = link_to '[~]', edit_gallery_path( g )
11
- = link_to g.name, gallery_path(g.galleryname)
12
- -# = render 'meta', :item => g
13
- - if g.photos.length == 0
14
- = image_missing
15
- - else
16
- - g.photos.limit( n_thumbs ).each do |photo|
17
- = link_to image_tag(photo.photo.url(:thumb), :alt => g.name, :class => :thumb ), gallery_path(g.galleryname)
18
- .c
8
+ .panel
9
+ .panel-body
10
+ %h3
11
+ = link_to '[~]', edit_gallery_path( g )
12
+ = link_to g.name, gallery_path(g.galleryname)
13
+ = render 'meta', :item => g
14
+
15
+ -# = render 'meta', :item => g
16
+ - if g.photos.length == 0
17
+ = image_missing
18
+ - else
19
+ - g.photos.limit( n_thumbs ).each do |photo|
20
+ = link_to image_tag(photo.photo.url(:thumb), :alt => g.name, :class => :thumb ), gallery_path(g.galleryname)
19
21
 
20
22
  - if galleries.respond_to? :total_pages
21
23
  = paginate galleries, :param_name => param_name
@@ -7,4 +7,4 @@
7
7
  = link_to '[~]', edit_gallery_path( gallery )
8
8
  [x]
9
9
  galleryname :: #{gallery.galleryname}
10
- = render 'meta', :gallery => gallery
10
+ = render 'meta', :item => gallery
@@ -1,16 +1,24 @@
1
1
 
2
- %h1
2
+ %h5
3
3
  User Profiles (#{@user_profiles.count})
4
4
  = link_to '[+]', new_user_profile_path
5
5
 
6
- %ul
7
- - @user_profiles.each do |profile|
8
- .panel
9
- %ul
10
- %li= link_to '[edit]', edit_user_profile_path( profile )
11
- %li <b>Email:</b> #{profile.email}
12
- %li <b>Name:</b> #{profile.name}
13
- %li <b>Role:</b> #{profile.role_name}
14
- %li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
15
- %li <b>About:</b> #{profile.about}
16
- %br
6
+
7
+ - @user_profiles.each do |profile|
8
+ .panel
9
+ .panel-body
10
+ .row
11
+ .col-sm-4
12
+ %ul
13
+ %li= link_to '[edit]', edit_user_profile_path( profile )
14
+ %li <b>Email:</b> #{profile.email}
15
+ %li <b>Name:</b> #{profile.name}
16
+ %li <b>Role:</b> #{profile.role_name}
17
+ %li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
18
+ %li <b>About:</b> #{profile.about}
19
+ .col-sm-8
20
+ Shared galleries:<br />
21
+ - profile.shared_galleries.each do |g|
22
+ &gt; #{link_to g.name, gallery_path(g.galleryname)} <br />
23
+ = render 'meta', :item => g
24
+
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.82
4
+ version: 0.1.8.83
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -223,7 +223,6 @@ files:
223
223
  - app/views/ish_manager/galleries/_list_short.haml
224
224
  - app/views/ish_manager/galleries/_menu_secondary.haml
225
225
  - app/views/ish_manager/galleries/_menu_secondary.haml~
226
- - app/views/ish_manager/galleries/_meta.haml
227
226
  - app/views/ish_manager/galleries/_meta.haml~
228
227
  - app/views/ish_manager/galleries/_search.haml
229
228
  - app/views/ish_manager/galleries/_search.haml~
@@ -1,13 +0,0 @@
1
-
2
- .galleries--meta
3
- .row
4
- .large-12.columns
5
- - if gallery.site
6
- Site #{link_to "http://#{gallery.site.domain}/#{gallery.site.lang}", site_path(gallery.site)}
7
- User :: #{gallery.username ? gallery.username.inspect : '<no-user>' }
8
- - if gallery.city
9
- City #{link_to gallery.city.name, city_path(gallery.city)}
10
- - if gallery.venue
11
- Venue #{link_to gallery.venue.name, venue_path(gallery.venue)}
12
- - if gallery.is_trash
13
- = trash_image_tag