ish_manager 0.1.8.129 → 0.1.8.131

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: 48484effb5c6e5cd1be8569e9b255377e193dddb
4
- data.tar.gz: 902776746aa1a7a601a300ef02e5acaf1671a397
3
+ metadata.gz: 9e0f77b4d33f6b41b6cd113c06e81a2c20ee0e19
4
+ data.tar.gz: 90eac77d3aa8e353070ab5ccd07412284244aa1e
5
5
  SHA512:
6
- metadata.gz: 970c4bc9018082fa383dfad29ba676ecfa9e4c3ba7ca54ba5f90bd1a305734663f7a8c62eb118696701a925c58f8a07a54044f7b3cf451d8bb012d8a689a0ec5
7
- data.tar.gz: e5e9a54aa0a9e53a612b20c05cf2ffafcfd7b58ab4462f243c475c1160770a1d57855b14fdb692674902d6e017a9afbffc82c44d03b626a6f15b9bedcef4391f
6
+ metadata.gz: 0d67d716aa2fef436a46ac2d5e398eb45fe842148c0ed7977c808d27feb8d8be57c89ce97fa5ad60b32d36ed3e647a6e4598a16e4896f0a0cd4a1c91289bd174
7
+ data.tar.gz: d860f763f68b41e230d7902e0e1ed4822ae9f2ebfe673fff2cebce3fbdc9d3f1f9de95c1a70607a34c498382ecf40ac30e222b3a996562d6999a527a9d183ff1
@@ -125,7 +125,7 @@ nav.pagination
125
125
  .description {
126
126
  border: 1px solid red;
127
127
  padding: 1em;
128
- font-size: 2em;
128
+ font-size: 1.6em;
129
129
  }
130
130
 
131
131
  /**
@@ -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
+
@@ -15,8 +15,6 @@ class IshManager::StockOptionsController < IshManager::ApplicationController
15
15
  authorize! :create, @stock_option
16
16
  flag = @stock_option.save
17
17
 
18
- byebug
19
-
20
18
  if flag
21
19
  flash[:notice] = 'Created stock option.'
22
20
  else
@@ -224,7 +224,10 @@ module IshManager::ImagesHelper
224
224
  end
225
225
 
226
226
  def new_image_tag
227
- image_tag 'icons/20x20/new.png'
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
- %h2 Events (#{@city.events.length})
3
- %ul
4
- - @city.events.each do |event|
5
- %li= event.name
6
- %hr
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
@@ -0,0 +1,2 @@
1
+
2
+ = render 'form', :event => @event
@@ -0,0 +1,2 @@
1
+
2
+ = render 'index', :events => @events
@@ -0,0 +1,2 @@
1
+
2
+ = render 'form', :event => @event
@@ -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.129
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-21 00:00:00.000000000 Z
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~