Commit a602848feecd4a091702f12eede6d40b55044a2a
1 parent
d59fcd8f
Exists in
staging
and in
7 other branches
adds start time, end time and presenter
Showing
2 changed files
with
8 additions
and
1 deletions
Show diff stats
app/models/event.rb
@@ -3,13 +3,14 @@ require 'builder' | @@ -3,13 +3,14 @@ require 'builder' | ||
3 | 3 | ||
4 | class Event < Article | 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 | def self.type_name | 8 | def self.type_name |
9 | _('Event') | 9 | _('Event') |
10 | end | 10 | end |
11 | 11 | ||
12 | settings_items :address, :type => :string | 12 | settings_items :address, :type => :string |
13 | + settings_items :presenter, :type => :string | ||
13 | 14 | ||
14 | def link=(value) | 15 | def link=(value) |
15 | self.setting[:link] = maybe_add_http(value) | 16 | self.setting[:link] = maybe_add_http(value) |
app/views/cms/_event.html.erb
@@ -10,8 +10,14 @@ | @@ -10,8 +10,14 @@ | ||
10 | 10 | ||
11 | <%= labelled_form_field(_('Start date'), pick_date(:article, :start_date)) %> | 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 | <%= labelled_form_field(_('End date'), pick_date(:article, :end_date)) %> | 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 | <%= labelled_form_field(_('Event website:'), text_field(:article, :link)) %> | 21 | <%= labelled_form_field(_('Event website:'), text_field(:article, :link)) %> |
16 | 22 | ||
17 | <%= labelled_form_field(_('Address:'), text_field(:article, :address)) %> | 23 | <%= labelled_form_field(_('Address:'), text_field(:article, :address)) %> |