ish_manager 0.1.8.80 → 0.1.8.81
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 +4 -4
- data/app/controllers/ish_manager/friends_controller.rb +11 -2
- data/app/controllers/ish_manager/galleries_controller.rb +1 -0
- data/app/controllers/ish_manager/reports_controller.rb +1 -1
- data/app/controllers/ish_manager/user_profiles_controller.rb +0 -2
- data/app/controllers/ish_manager/videos_controller.rb +1 -1
- data/app/views/ish_manager/features/_form.haml +7 -1
- data/app/views/ish_manager/friends/index.haml +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d9a8d31505a005c3b7bd6f97b73db0f687ee53d
|
4
|
+
data.tar.gz: 4d29d636bea45aba125ba1c5311f94591b112785
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ac1422e4d6f740d1569e08d83f366200089f444a1f66bac47419a3f7496dc8ed947fc083ca4f4f21e08bcf3a54fa003aaf19e57b246e2135d981d27b6442e15
|
7
|
+
data.tar.gz: e52df38e59402a981e2b254446da9fb32b4e6a750bdf3541d57031539383e93a5992371c44da824cfa91839b5133a5201ea8be404e07a6f9c4443c9d24db9678
|
@@ -3,11 +3,20 @@ class IshManager::FriendsController < IshManager::ApplicationController
|
|
3
3
|
def index
|
4
4
|
authorize! :friends_index, IshModels::UserProfile
|
5
5
|
@new_friend = IshModels::UserProfile.new
|
6
|
+
|
7
|
+
@friends = current_user.profile.friends
|
8
|
+
friend_ids = @friends.map &:id
|
9
|
+
=begin
|
10
|
+
@raw_shared_galleries = @friend.shared_galleries
|
11
|
+
@shared_galleries = {}
|
12
|
+
@friends.each do |f|
|
13
|
+
@shared_galleries[f.email] =
|
14
|
+
f.shared_galleries
|
15
|
+
=end
|
6
16
|
end
|
7
17
|
|
8
18
|
def create
|
9
|
-
@friend = ::IshModels::UserProfile.find_by :email => params[:friend][:email]
|
10
|
-
puts! @friend, 'friend!'
|
19
|
+
@friend = ::IshModels::UserProfile.find_by( :email => params[:friend][:email] ) # .includes( :shared_galleries )
|
11
20
|
|
12
21
|
authorize! :friends_new, @friend
|
13
22
|
|
@@ -69,6 +69,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
69
69
|
flash[:notice] = 'Success.'
|
70
70
|
redirect_to galleries_path
|
71
71
|
else
|
72
|
+
puts! @gallery.errors.messages, 'cannot save gallery'
|
72
73
|
flash[:error] = 'No Luck. ' + @gallery.errors.messages.to_s
|
73
74
|
render :action => :edit
|
74
75
|
end
|
@@ -6,7 +6,7 @@ class IshManager::ReportsController < IshManager::ApplicationController
|
|
6
6
|
def index
|
7
7
|
authorize! :index, Report
|
8
8
|
@reports = Report.unscoped.order_by( :created_at => :desc
|
9
|
-
).where( :is_trash => false
|
9
|
+
).where( :is_trash => false, :user_profile => current_user.profile
|
10
10
|
).page( params[:reports_page]
|
11
11
|
).per( Report::PER_PAGE )
|
12
12
|
if false === params[:site]
|
@@ -5,7 +5,7 @@ class IshManager::VideosController < IshManager::ApplicationController
|
|
5
5
|
|
6
6
|
def index
|
7
7
|
authorize! :index, Video.new
|
8
|
-
@videos = Video.unscoped.order_by( :created_at => :desc )
|
8
|
+
@videos = Video.unscoped.where( :user_profile => current_user.profile ).order_by( :created_at => :desc )
|
9
9
|
|
10
10
|
if params[:city_id]
|
11
11
|
city = City.find params[:city_id]
|
@@ -1,7 +1,13 @@
|
|
1
1
|
|
2
2
|
-# manager/features/_form
|
3
|
+
- if @city
|
4
|
+
- url = city_features_path( @city )
|
5
|
+
- if @site
|
6
|
+
- url = site_features_path( @site )
|
7
|
+
- if @tag
|
8
|
+
- url = tag_features_path( @tag )
|
3
9
|
|
4
|
-
= form_for @feature do |f|
|
10
|
+
= form_for @feature, :url => url do |f|
|
5
11
|
- if @city
|
6
12
|
= hidden_field_tag :city_id, @city.id
|
7
13
|
City #{@city.name}
|
@@ -10,7 +10,13 @@
|
|
10
10
|
.col-sm-6
|
11
11
|
= f.submit 'Add Friend'
|
12
12
|
|
13
|
-
-
|
13
|
+
- @friends.each do |friend|
|
14
14
|
.panel
|
15
15
|
.panel-body
|
16
16
|
= friend.email
|
17
|
+
.row
|
18
|
+
.col-sm-6.description
|
19
|
+
Galleries shared with them:
|
20
|
+
%ul
|
21
|
+
- friend.shared_galleries.each do |g|
|
22
|
+
%li= g[:name]
|