Commit dca569a4b682f150e8e9e3116ea7b14843651e44
Exists in
staging
and in
4 other branches
Merge branch 'change_start_and_end_date_to_datetime' into production
Showing
6 changed files
with
60 additions
and
1 deletions
Show diff stats
app/models/event.rb
| ... | ... | @@ -3,13 +3,14 @@ require 'builder' |
| 3 | 3 | |
| 4 | 4 | class Event < Article |
| 5 | 5 | |
| 6 | - attr_accessible :start_date, :end_date, :link, :address | |
| 6 | + attr_accessible :start_date, :end_date, :link, :address, :start_hour, :start_minute, :presenter | |
| 7 | 7 | |
| 8 | 8 | def self.type_name |
| 9 | 9 | _('Event') |
| 10 | 10 | end |
| 11 | 11 | |
| 12 | 12 | settings_items :address, :type => :string |
| 13 | + settings_items :presenter, :type => :string | |
| 13 | 14 | |
| 14 | 15 | def link=(value) |
| 15 | 16 | self.setting[:link] = maybe_add_http(value) | ... | ... |
app/views/cms/_event.html.erb
| ... | ... | @@ -10,8 +10,14 @@ |
| 10 | 10 | |
| 11 | 11 | <%= labelled_form_field(_('Start date'), pick_date(:article, :start_date)) %> |
| 12 | 12 | |
| 13 | +<%= labelled_form_field(_('Start time'), time_select(:article, :start_date)) %> | |
| 14 | + | |
| 13 | 15 | <%= labelled_form_field(_('End date'), pick_date(:article, :end_date)) %> |
| 14 | 16 | |
| 17 | +<%= labelled_form_field(_('End time'), time_select(:article, :end_date)) %> | |
| 18 | + | |
| 19 | +<%= labelled_form_field(_('Presenter:'), text_field(:article, :presenter)) %> | |
| 20 | + | |
| 15 | 21 | <%= labelled_form_field(_('Event website:'), text_field(:article, :link)) %> |
| 16 | 22 | |
| 17 | 23 | <%= labelled_form_field(_('Address:'), text_field(:article, :address)) %> | ... | ... |
db/migrate/20150615215500_alter_column_articles_start_date.rb
0 → 100644
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +class AlterColumnArticlesStartDate < ActiveRecord::Migration | |
| 2 | + def up | |
| 3 | + change_table :articles do |t| | |
| 4 | + t.change :start_date, :datetime | |
| 5 | + end | |
| 6 | + end | |
| 7 | + | |
| 8 | + def down | |
| 9 | + change_table :articles do |t| | |
| 10 | + t.change :start_date, :date | |
| 11 | + end | |
| 12 | + end | |
| 13 | +end | ... | ... |
db/migrate/20150615215658_alter_column_articles_end_date.rb
0 → 100644
db/migrate/20150615222147_alter_column_article_versions_end_date.rb
0 → 100644
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +class AlterColumnArticleVersionsEndDate < ActiveRecord::Migration | |
| 2 | + def up | |
| 3 | + change_table :article_versions do |t| | |
| 4 | + t.change :end_date, :datetime | |
| 5 | + end | |
| 6 | + end | |
| 7 | + | |
| 8 | + def down | |
| 9 | + change_table :article_versions do |t| | |
| 10 | + t.change :end_date, :date | |
| 11 | + end | |
| 12 | + end | |
| 13 | +end | ... | ... |
db/migrate/20150615222204_alter_column_article_versions_start_date.rb
0 → 100644
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +class AlterColumnArticleVersionsStartDate < ActiveRecord::Migration | |
| 2 | + def up | |
| 3 | + change_table :article_versions do |t| | |
| 4 | + t.change :start_date, :datetime | |
| 5 | + end | |
| 6 | + end | |
| 7 | + | |
| 8 | + def down | |
| 9 | + change_table :article_versions do |t| | |
| 10 | + t.change :start_date, :date | |
| 11 | + end | |
| 12 | + end | |
| 13 | +end | |
| 0 | 14 | \ No newline at end of file | ... | ... |
-
mentioned in commit 77d9cc0a70556e4798ae55a8840901f71256c8bd