ish_manager 0.1.8.129 → 0.1.8.131
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/ish_manager/application.css +1 -1
- data/app/controllers/ish_manager/events_controller.rb +54 -0
- data/app/controllers/ish_manager/stock_options_controller.rb +0 -2
- data/app/helpers/ish_manager/images_helper.rb +4 -1
- data/app/views/ish_manager/events/_form.haml +24 -0
- data/app/views/ish_manager/events/_index.haml +14 -5
- data/app/views/ish_manager/events/edit.haml +2 -0
- data/app/views/ish_manager/events/index.haml +2 -0
- data/app/views/ish_manager/events/new.haml +2 -0
- data/app/views/ish_manager/user_profiles/index.haml +1 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e0f77b4d33f6b41b6cd113c06e81a2c20ee0e19
|
4
|
+
data.tar.gz: 90eac77d3aa8e353070ab5ccd07412284244aa1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d67d716aa2fef436a46ac2d5e398eb45fe842148c0ed7977c808d27feb8d8be57c89ce97fa5ad60b32d36ed3e647a6e4598a16e4896f0a0cd4a1c91289bd174
|
7
|
+
data.tar.gz: d860f763f68b41e230d7902e0e1ed4822ae9f2ebfe673fff2cebce3fbdc9d3f1f9de95c1a70607a34c498382ecf40ac30e222b3a996562d6999a527a9d183ff1
|
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
class IshManager::EventsController < IshManager::ApplicationController
|
3
|
+
|
4
|
+
before_action :set_lists
|
5
|
+
|
6
|
+
def index
|
7
|
+
authorize! :index, ::Event
|
8
|
+
@events = Event.all
|
9
|
+
end
|
10
|
+
|
11
|
+
def new
|
12
|
+
@event = Event.new
|
13
|
+
authorize! :new, @event
|
14
|
+
end
|
15
|
+
|
16
|
+
def create
|
17
|
+
@event = Event.new params[:event].permit!
|
18
|
+
authorize! :create, @event
|
19
|
+
if @event.save
|
20
|
+
redirect_to :action => :index
|
21
|
+
else
|
22
|
+
flash[:alert] = @event.errors.messages
|
23
|
+
render :action => :new
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def edit
|
28
|
+
@event = Event.find params[:id]
|
29
|
+
authorize! :edit, @event
|
30
|
+
end
|
31
|
+
|
32
|
+
def update
|
33
|
+
@event = Event.find params[:id]
|
34
|
+
authorize! :update, @event
|
35
|
+
|
36
|
+
flag = @event.update_attributes params[:event].permit!
|
37
|
+
if flag
|
38
|
+
flash[:notice] = 'updated event'
|
39
|
+
redirect_to :action => :index
|
40
|
+
else
|
41
|
+
flash[:alert] = "No luck: #{@event.errors.messages}"
|
42
|
+
render :action => :edit
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def show
|
47
|
+
@event = Event.find params[:id]
|
48
|
+
authorize! :show, @event
|
49
|
+
redirect_to :action => :edit, :id => @event.id
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
|
@@ -224,7 +224,10 @@ module IshManager::ImagesHelper
|
|
224
224
|
end
|
225
225
|
|
226
226
|
def new_image_tag
|
227
|
-
|
227
|
+
raw('<i class="fa fa-plus-square"></i>')
|
228
|
+
end
|
229
|
+
def new_img
|
230
|
+
raw('<i class="fa fa-plus-square"></i>')
|
228
231
|
end
|
229
232
|
|
230
233
|
def is_public_image_tag resource
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
= form_for event do |f|
|
3
|
+
.a
|
4
|
+
= f.label :name
|
5
|
+
= f.text_field :name
|
6
|
+
|
7
|
+
.a
|
8
|
+
= f.label :eventname
|
9
|
+
= f.text_field :eventname
|
10
|
+
|
11
|
+
.a
|
12
|
+
= f.label :city
|
13
|
+
= f.select :city, options_for_select( @cities_list, :selected => event.city_id )
|
14
|
+
|
15
|
+
.a
|
16
|
+
= f.label :date
|
17
|
+
= f.text_field :date
|
18
|
+
|
19
|
+
.a
|
20
|
+
= f.text_area :description, :class => [ :tinymce ]
|
21
|
+
|
22
|
+
.a
|
23
|
+
= f.submit
|
24
|
+
|
@@ -1,6 +1,15 @@
|
|
1
|
+
|
1
2
|
.manager-events--index
|
2
|
-
%
|
3
|
-
%
|
4
|
-
|
5
|
-
%
|
6
|
-
|
3
|
+
%h5 Events (#{events.length}) #{link_to new_img, new_event_path}
|
4
|
+
%table
|
5
|
+
%tr
|
6
|
+
%th actions
|
7
|
+
%th date
|
8
|
+
%th city
|
9
|
+
%th name
|
10
|
+
- events.each do |event|
|
11
|
+
%tr
|
12
|
+
%td= link_to edit_img, edit_event_path( event )
|
13
|
+
%td= event.date.to_s[0, 10]
|
14
|
+
%td= link_to event.city.name, city_path( event.city )
|
15
|
+
%td= event.name
|
@@ -15,6 +15,7 @@
|
|
15
15
|
%li <b>Name:</b> #{profile.name}
|
16
16
|
%li <b>Role:</b> #{profile.role_name}
|
17
17
|
%li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
|
18
|
+
%li <b>City:</b> #{profile.current_city ? profile.current_city.name : nil}
|
18
19
|
%li <b>About:</b> #{profile.about}
|
19
20
|
.col-sm-8
|
20
21
|
Shared galleries:<br />
|
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.131
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- app/controllers/ish_manager/ally_controller.rb
|
156
156
|
- app/controllers/ish_manager/application_controller.rb
|
157
157
|
- app/controllers/ish_manager/cities_controller.rb
|
158
|
+
- app/controllers/ish_manager/events_controller.rb
|
158
159
|
- app/controllers/ish_manager/features_controller.rb
|
159
160
|
- app/controllers/ish_manager/friends_controller.rb
|
160
161
|
- app/controllers/ish_manager/galleries_controller.rb
|
@@ -206,8 +207,12 @@ files:
|
|
206
207
|
- app/views/ish_manager/cities/new_feature.haml
|
207
208
|
- app/views/ish_manager/cities/new_newsitem.haml
|
208
209
|
- app/views/ish_manager/cities/show.haml
|
210
|
+
- app/views/ish_manager/events/_form.haml
|
209
211
|
- app/views/ish_manager/events/_index.haml
|
210
212
|
- app/views/ish_manager/events/_index.haml~
|
213
|
+
- app/views/ish_manager/events/edit.haml
|
214
|
+
- app/views/ish_manager/events/index.haml
|
215
|
+
- app/views/ish_manager/events/new.haml
|
211
216
|
- app/views/ish_manager/features/_form.haml
|
212
217
|
- app/views/ish_manager/features/_index.haml
|
213
218
|
- app/views/ish_manager/features/_index.haml~
|