ish_manager 0.1.8.140 → 0.1.8.141
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ish_manager/application_controller.rb +26 -0
- data/app/controllers/ish_manager/venues_controller.rb +2 -2
- data/app/helpers/ish_manager/application_helper.rb +4 -0
- data/app/views/ish_manager/application/_profile_pic.haml +7 -0
- data/app/views/ish_manager/cities/edit.haml +1 -1
- data/app/views/ish_manager/venues/_form.haml +21 -16
- data/app/views/ish_manager/venues/edit.haml +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3090e1d4074c2b01099f187c22521cc4a2c147d
|
4
|
+
data.tar.gz: e52ec43b445ba034d373e1d2a1b90bbbc7914299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a99d95e9c39f4fd4b9f5fe09e37ba29e13b69b5df9fe8e7a3335a1bb74b6682961402c28d1411f71805eb902e0388d6994bda70f96d06036d723f32bacad293
|
7
|
+
data.tar.gz: 9a4a36f56b37769ce4bfbcd037badc68fc26f43a42043d313c00dd771480977728b5efaef396fa44f59a06394e704f291774342a52f3c87d1cec7a3fad8ecddc
|
@@ -49,5 +49,31 @@ module IshManager
|
|
49
49
|
puts a.inspect
|
50
50
|
end
|
51
51
|
|
52
|
+
def update_profile_pic
|
53
|
+
return unless params[:photo]
|
54
|
+
@photo = Photo.new :photo => params[:photo]
|
55
|
+
@photo.user_profile = @current_user.profile
|
56
|
+
flag = @photo.save
|
57
|
+
@resource.profile_photo = @photo
|
58
|
+
flagg = @resource.save
|
59
|
+
if flag && flagg
|
60
|
+
flash[:notice] = 'Success'
|
61
|
+
else
|
62
|
+
flash[:alert] = "No Luck. #{@photo.errors.messages} #{@resource.errors.messages}"
|
63
|
+
end
|
64
|
+
# redirect_to resource_path( @resource )
|
65
|
+
end
|
66
|
+
|
67
|
+
def resource_path resource
|
68
|
+
case resource.class.name
|
69
|
+
when 'City'
|
70
|
+
city_path( resource.id )
|
71
|
+
when 'Event'
|
72
|
+
event_path( resource.id )
|
73
|
+
when 'Venue'
|
74
|
+
venue_path( resource.id )
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
52
78
|
end
|
53
79
|
end
|
@@ -30,9 +30,9 @@ class IshManager::VenuesController < IshManager::ApplicationController
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def update
|
33
|
-
@venue = Venue.find params[:id]
|
33
|
+
@resource = @venue = Venue.find params[:id]
|
34
34
|
authorize! :update, @venue
|
35
|
-
|
35
|
+
update_profile_pic
|
36
36
|
flag = @venue.update_attributes params[:venue].permit!
|
37
37
|
if flag
|
38
38
|
flash[:notice] = 'updated venue'
|
@@ -1,25 +1,30 @@
|
|
1
1
|
|
2
|
-
= form_for venue do |f|
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
= form_for venue, :html => { :multipart => true } do |f|
|
3
|
+
.row
|
4
|
+
.col-sm-6
|
5
|
+
= f.label :name
|
6
|
+
= f.text_field :name
|
7
|
+
.col-sm-6
|
8
|
+
= f.label :name_seo
|
9
|
+
= f.text_field :name_seo
|
10
10
|
|
11
11
|
.a
|
12
12
|
= f.label :descr
|
13
13
|
= f.text_area :descr, :class => [ :tinymce ]
|
14
14
|
|
15
|
-
.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
15
|
+
.row
|
16
|
+
.col-sm-6
|
17
|
+
= f.label :city
|
18
|
+
= f.select :city, options_for_select( @cities_list, :selected => venue.city_id )
|
19
|
+
.col-sm-6
|
20
|
+
coords
|
21
|
+
.row
|
22
|
+
.col-xs-6= f.text_field :x
|
23
|
+
.col-xs-6= f.text_field :y
|
24
|
+
|
25
|
+
.row
|
26
|
+
.col-sm-6
|
27
|
+
= render 'profile_pic', :resource => venue
|
23
28
|
|
24
29
|
.b
|
25
30
|
= f.submit
|
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.141
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -198,6 +198,7 @@ files:
|
|
198
198
|
- app/views/ish_manager/application/_main_header_manager.html
|
199
199
|
- app/views/ish_manager/application/_meta.haml
|
200
200
|
- app/views/ish_manager/application/_meta.haml~
|
201
|
+
- app/views/ish_manager/application/_profile_pic.haml
|
201
202
|
- app/views/ish_manager/application/home.haml
|
202
203
|
- app/views/ish_manager/application_mailer/shared_galleries.html.erb
|
203
204
|
- app/views/ish_manager/application_mailer/stock_alert.html.erb
|