tramway-event 0.3 → 0.4

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
  SHA256:
3
- metadata.gz: ebc19b336a73e7894a5e72575ee42bb05072289d28580608d4e78ac2cf71069e
4
- data.tar.gz: df34e22424f2ac690de22bcd515ec2ac9b290cf9a99abc833eac16c5d9a5fefc
3
+ metadata.gz: cfb8d54e64e33b2e8c21b7fce9017bfcb7e36ec36bbed99b8040a24a5741ac72
4
+ data.tar.gz: 4aea69120d930c1dded0eb77c9dad2d0caad5cd4c339a16d68102c07ea336723
5
5
  SHA512:
6
- metadata.gz: 7f085a7c88b40e402ead07ec6a2bed1014c76ed5b80f95560c53104e3b8d050ca271aa79153560835ca5f21365917bfc24ba818fbcfc8e9b217b4651a2bb2f8c
7
- data.tar.gz: 56c85189d034c25e04bba1751c8816804be2f4b67df16f58a18a359104aab88f4128fb33aaced0aeb82d7351aea4707b9c348994fd3ce09196cdb02745302882
6
+ metadata.gz: def4daefd8d20bf15c6897a8f310adf08c384e88653751e6c513a1722056cd9ae43984ffaa5170a5ee4d75c387f6a19ed35f37e60930baedbd751c3044901937
7
+ data.tar.gz: 0a88fd1f5b27e913872ae6847dd8bf3a84493365acd41cd7a47b27d490696b7d0dab704c89c19bfc6d20ad5bfa2bf1f5d2cbdfd51c87b05818cfeab60a4a0e1a
@@ -0,0 +1,4 @@
1
+ /*
2
+ *= require_tree .
3
+ *= require_self
4
+ */
@@ -0,0 +1,4 @@
1
+ @import 'bootstrap'
2
+
3
+ body
4
+ margin: 0
@@ -0,0 +1,7 @@
1
+ class Tramway::Event::EventsController < Tramway::Event::ApplicationController
2
+ layout 'tramway/landing/application'
3
+
4
+ def show
5
+ @event = ::Tramway::Event::EventDecorator.decorate ::Tramway::Event::Event.find params[:id]
6
+ end
7
+ end
@@ -4,4 +4,14 @@ class Tramway::Event::EventDecorator < ::Tramway::Core::ApplicationDecorator
4
4
  [ :all ]
5
5
  end
6
6
  end
7
+
8
+ delegate :title, to: :object
9
+
10
+ def background
11
+ object.photo
12
+ end
13
+
14
+ def tagline
15
+ ''
16
+ end
7
17
  end
@@ -6,7 +6,8 @@ class Tramway::Event::EventForm < ::Tramway::Core::ApplicationForm
6
6
  form_properties title: :string,
7
7
  description: :ckeditor,
8
8
  begin_date: :default,
9
- end_date: :default
9
+ end_date: :default,
10
+ photo: :file
10
11
  form_object
11
12
  end
12
13
  end
@@ -1,2 +1,3 @@
1
1
  class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
2
+ mount_uploader :photo, PhotoUploader
2
3
  end
@@ -0,0 +1,3 @@
1
+ - content_for :body_content do
2
+ = stylesheet_link_tag 'tramway/event/events/show'
3
+ = render 'tramway/landing/blocks/templates/full_page', block: @event, buttons: []
@@ -0,0 +1 @@
1
+ Rails.application.config.assets.precompile += %w( tramway/event/events/show.css )
data/config/routes.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  Tramway::Event::Engine.routes.draw do
2
+ resources :events, only: :show
2
3
  end
@@ -16,6 +16,7 @@ module Tramway::Event::Generators
16
16
 
17
17
  def copy_migrations
18
18
  migration_template 'create_tramway_event_events.rb', 'db/migrate/create_tramway_event_events.rb'
19
+ migration_template 'add_photo_to_tramway_event_events.rb', 'db/migrate/add_photo_to_tramway_event_events.rb'
19
20
  end
20
21
  end
21
22
  end
@@ -0,0 +1,5 @@
1
+ class AddPhotoToTramwayEventEvents < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :tramway_event_events, :photo, :text
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Event
3
- VERSION = '0.3'
3
+ VERSION = '0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-event
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-01 00:00:00.000000000 Z
11
+ date: 2018-09-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email:
@@ -22,8 +22,10 @@ files:
22
22
  - Rakefile
23
23
  - app/assets/config/tramway_event_manifest.js
24
24
  - app/assets/javascripts/tramway/event/application.js
25
- - app/assets/stylesheets/tramway/event/application.css
25
+ - app/assets/stylesheets/tramway/event/application.css.sass
26
+ - app/assets/stylesheets/tramway/event/events/show.css.sass
26
27
  - app/controllers/tramway/event/application_controller.rb
28
+ - app/controllers/tramway/event/events_controller.rb
27
29
  - app/decorators/tramway/event/event_decorator.rb
28
30
  - app/decorators/tramway/event/event_link_decorator.rb
29
31
  - app/forms/tramway/event/event_form.rb
@@ -32,7 +34,8 @@ files:
32
34
  - app/mailers/tramway/event/application_mailer.rb
33
35
  - app/models/tramway/event/application_record.rb
34
36
  - app/models/tramway/event/event.rb
35
- - app/views/layouts/tramway/event/application.html.erb
37
+ - app/views/tramway/event/events/show.html.haml
38
+ - config/initializers/assets.rb
36
39
  - config/initializers/tramway.rb
37
40
  - config/locales/models.yml
38
41
  - config/routes.rb
@@ -40,6 +43,7 @@ files:
40
43
  - lib/tramway/event.rb
41
44
  - lib/tramway/event/engine.rb
42
45
  - lib/tramway/event/generators/install_generator.rb
46
+ - lib/tramway/event/generators/templates/add_photo_to_tramway_event_events.rb
43
47
  - lib/tramway/event/generators/templates/create_tramway_event_events.rb
44
48
  - lib/tramway/event/version.rb
45
49
  homepage: https://github.com/ulmic/tramway-event
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Tramway event</title>
5
- <%= stylesheet_link_tag "tramway/event/application", media: "all" %>
6
- <%= javascript_include_tag "tramway/event/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>