ish_manager 0.1.8.396 → 0.1.8.397
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/events_controller.rb +52 -0
- data/app/views/ish_manager/application/_main_header_admin.haml +7 -0
- data/app/views/ish_manager/events/_form.haml +18 -0
- data/app/views/ish_manager/events/edit.haml +5 -0
- data/app/views/ish_manager/events/index.haml +11 -0
- data/app/views/ish_manager/events/new.haml +5 -0
- data/app/views/ish_manager/events/show.haml +0 -0
- data/config/routes.rb +2 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48dd240bd2406498ff4432cced69350c3c66efb13c339ed5dfaefb421d256e5b
|
|
4
|
+
data.tar.gz: 97c1195165ccac014df21e423315cebacf3bcdc51aac7c40095f7d8a3bd4ac2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc4895c6a5da8056ef2557cb3609fd512a71f3c14bd4181120337323b6ec6161863e385e8aa119ae7827260406ae07e2888e0bbb2c21fe28873f2838dc58c251
|
|
7
|
+
data.tar.gz: dcee31234fecc15bfd8db0f09d6169c99116ddbd63edd81a871a7e55d5b23e9243add1870d8951d62620398317a82562a46be04830f95032a0dac76a4aebe0c5
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
class IshManager::EventsController < ::IshManager::ApplicationController
|
|
3
|
+
|
|
4
|
+
def create
|
|
5
|
+
authorize! :manage, Ish::Event
|
|
6
|
+
@event = Ish::Event.create( params[:event].permit! )
|
|
7
|
+
if @event.persisted?
|
|
8
|
+
flash[:notice] = "Success."
|
|
9
|
+
redirect_to action: 'index'
|
|
10
|
+
else
|
|
11
|
+
flash[:alert] = "No luck: #{@event.errors.full_messages.join(', ')}."
|
|
12
|
+
render 'new'
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def edit
|
|
17
|
+
authorize! :manage, Ish::Event
|
|
18
|
+
@event = Ish::Event.find params[:id]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def index
|
|
22
|
+
authorize! :manage, Ish::Event
|
|
23
|
+
@events = Ish::Event.all
|
|
24
|
+
if params[:q]
|
|
25
|
+
@events = @events.where({ :name => /#{params[:q]}/i })
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def new
|
|
30
|
+
authorize! :manage, Ish::Event
|
|
31
|
+
@event = Ish::Event.new
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def show
|
|
35
|
+
authorize! :manage, Ish::Event
|
|
36
|
+
@event = Ish::Event.find params[:id]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def update
|
|
40
|
+
authorize! :manage, Ish::Event
|
|
41
|
+
@event = Ish::Event.find params[:id]
|
|
42
|
+
@event.update_attributes( params[:event].permit! )
|
|
43
|
+
if @event.persisted?
|
|
44
|
+
flash[:notice] = "Success."
|
|
45
|
+
redirect_to action: 'index'
|
|
46
|
+
else
|
|
47
|
+
flash[:alert] = "No luck: #{@event.errors.full_messages.join(', ')}."
|
|
48
|
+
render 'edit'
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
@@ -34,6 +34,13 @@
|
|
|
34
34
|
= form_tag maps_path, method: :get do
|
|
35
35
|
= text_field_tag :q
|
|
36
36
|
= link_to '[+]', new_map_path
|
|
37
|
+
%ul
|
|
38
|
+
%li
|
|
39
|
+
= link_to 'Events', events_path
|
|
40
|
+
.inline-search
|
|
41
|
+
= form_tag events_path, method: :get do
|
|
42
|
+
= text_field_tag :q
|
|
43
|
+
= link_to '[+]', new_event_path
|
|
37
44
|
.c
|
|
38
45
|
|
|
39
46
|
%i.fa.fa-compress.collapse-expand#collapseHeaderOffice
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
- url = event.new_record? ? events_path : event_path(event)
|
|
3
|
+
.events--form
|
|
4
|
+
= form_for event, as: :event, url: url do |f|
|
|
5
|
+
.field
|
|
6
|
+
= f.label :start_at
|
|
7
|
+
= f.text_field :start_at
|
|
8
|
+
.field
|
|
9
|
+
= f.label :end_at
|
|
10
|
+
= f.text_field :end_at
|
|
11
|
+
.field
|
|
12
|
+
= f.label :name
|
|
13
|
+
= f.text_field :name
|
|
14
|
+
.field
|
|
15
|
+
= f.label :descr
|
|
16
|
+
= f.text_field :descr
|
|
17
|
+
.actions
|
|
18
|
+
= f.submit
|
|
File without changes
|
data/config/routes.rb
CHANGED
|
@@ -5,6 +5,8 @@ IshManager::Engine.routes.draw do
|
|
|
5
5
|
|
|
6
6
|
get 'categories', to: 'categories#index'
|
|
7
7
|
|
|
8
|
+
resources 'events'
|
|
9
|
+
|
|
8
10
|
patch 'galleries/:id/update_ordering', to: 'galleries#update_ordering'
|
|
9
11
|
get 'galleries', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
|
|
10
12
|
get 'galleries/index_titles', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_TITLES }
|
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.397
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- piousbox
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-03-
|
|
11
|
+
date: 2023-03-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -316,6 +316,7 @@ files:
|
|
|
316
316
|
- app/controllers/ish_manager/email_messages_controller.rb
|
|
317
317
|
- app/controllers/ish_manager/email_templates_controller.rb
|
|
318
318
|
- app/controllers/ish_manager/email_unsubscribes_controller.rb
|
|
319
|
+
- app/controllers/ish_manager/events_controller.rb
|
|
319
320
|
- app/controllers/ish_manager/galleries_controller.rb
|
|
320
321
|
- app/controllers/ish_manager/image_assets_controller.rb
|
|
321
322
|
- app/controllers/ish_manager/invoices_controller.rb
|
|
@@ -451,6 +452,11 @@ files:
|
|
|
451
452
|
- app/views/ish_manager/email_templates/plain.html.erb-trash
|
|
452
453
|
- app/views/ish_manager/email_templates/show.haml
|
|
453
454
|
- app/views/ish_manager/email_unsubscribes/new.haml
|
|
455
|
+
- app/views/ish_manager/events/_form.haml
|
|
456
|
+
- app/views/ish_manager/events/edit.haml
|
|
457
|
+
- app/views/ish_manager/events/index.haml
|
|
458
|
+
- app/views/ish_manager/events/new.haml
|
|
459
|
+
- app/views/ish_manager/events/show.haml
|
|
454
460
|
- app/views/ish_manager/galleries/_form.haml
|
|
455
461
|
- app/views/ish_manager/galleries/_index.haml
|
|
456
462
|
- app/views/ish_manager/galleries/_index_title.haml
|