Add ActiveModel-scoped locales for `Announcement` model
This commit is contained in:
parent
ac83995dfc
commit
3404b337eb
|
@ -1,4 +1,4 @@
|
|||
- provide(:title, generate_title('Edit announcement'))
|
||||
- provide(:title, generate_title(t(".title")))
|
||||
.container-lg.container--main
|
||||
.card
|
||||
.card-body
|
||||
|
@ -15,21 +15,19 @@
|
|||
%li= err
|
||||
.row
|
||||
.col-md-12
|
||||
= f.text_area :content, label: 'Content'
|
||||
= f.text_area :content
|
||||
.row
|
||||
.col-md-6
|
||||
= f.url_field :link_href, label: 'Link URL'
|
||||
= f.url_field :link_href
|
||||
.col-md-6
|
||||
= f.text_field :link_text, label: 'Link text'
|
||||
= f.text_field :link_text
|
||||
.row
|
||||
.col-md-6
|
||||
= f.datetime_field :starts_at,
|
||||
label: 'Start time',
|
||||
class: 'datetimepicker-input',
|
||||
data: { toggle: 'datetimepicker', target: '#announcement_starts_at', 'date-format': 'YYYY-MM-DD hh:mm A' }
|
||||
.col-md-6
|
||||
= f.datetime_field :ends_at,
|
||||
label: 'End time',
|
||||
class: 'datetimepicker-input',
|
||||
data: { toggle: 'datetimepicker', target: '#announcement_ends_at', 'date-format': 'YYYY-MM-DD hh:mm A' }
|
||||
.row
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- provide(:title, generate_title('Add new announcement'))
|
||||
- provide(:title, generate_title(t(".title")))
|
||||
.container-lg.container--main
|
||||
.card
|
||||
.card-body
|
||||
|
@ -15,21 +15,19 @@
|
|||
%li= err
|
||||
.row
|
||||
.col-md-12
|
||||
= f.text_area :content, label: 'Content'
|
||||
= f.text_area :content
|
||||
.row
|
||||
.col-md-6
|
||||
= f.url_field :link_href, label: 'Link URL'
|
||||
= f.url_field :link_href
|
||||
.col-md-6
|
||||
= f.text_field :link_text, label: 'Link text'
|
||||
= f.text_field :link_text
|
||||
.row
|
||||
.col-md-6
|
||||
= f.datetime_field :starts_at,
|
||||
label: 'Start time',
|
||||
class: 'datetimepicker-input',
|
||||
data: { toggle: 'datetimepicker', target: '#announcement_starts_at', 'date-format': 'YYYY-MM-DD hh:mm A' }
|
||||
.col-md-6
|
||||
= f.datetime_field :ends_at,
|
||||
label: 'End time',
|
||||
class: 'datetimepicker-input',
|
||||
data: { toggle: 'datetimepicker', target: '#announcement_ends_at', 'date-format': 'YYYY-MM-DD hh:mm A' }
|
||||
.row
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
en:
|
||||
activerecord:
|
||||
models:
|
||||
announcement:
|
||||
one: "Announcement"
|
||||
other: "Announcements"
|
||||
attributes:
|
||||
announcement:
|
||||
content: "Content"
|
||||
link_href: "Link URL"
|
||||
link_text: "Link text"
|
||||
starts_at: "Start time"
|
||||
ends_at: "End time"
|
Loading…
Reference in New Issue