Add weekday selection and client side date formatting
This commit is contained in:
@@ -21,6 +21,11 @@
|
||||
= f.label :location, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :location, class: 'location_picker'
|
||||
.control-group
|
||||
= f.label :time_zone, class: 'control-label'
|
||||
.controls
|
||||
/= f.input :time_zone, collection: ActiveSupport::TimeZone.all, label_method: :to_s, value_method: :name, include_blank: false
|
||||
= f.collection_select :time_zone, ActiveSupport::TimeZone.all, :name, :to_s
|
||||
.accordion-group
|
||||
.accordion-heading
|
||||
a.accordion-toggle data-toggle="collapse" data-parent="#settings-sections" href="#settings-wifi" data-t="attributes.supplier.offer_wifi"
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
= check_box_tag "product_category[product_ids][]", product.id, @product_category.product_ids.to_a.include?(product.id), id: "product-checker-#{product.id}"
|
||||
= label_tag "product-checker-#{product.id}", product.name
|
||||
br
|
||||
.control-group
|
||||
#week_days-group.btn-group data-toggle="buttons-checkbox"
|
||||
- @product_category.week_days.each.with_index do |day, i|
|
||||
= select_tag 'product_category[week_days][]', options_for_select([0,1], day), class: 'week-day-select', data: {day:%w[sunday monday tuesday wednesday thursday friday saturday][i]}
|
||||
|
||||
.form-actions
|
||||
= f.button :submit, class: 'btn-primary'
|
||||
'
|
||||
|
||||
@@ -22,7 +22,7 @@ div.page-header= title :index, model_class
|
||||
tr
|
||||
td.link= link_to table.number, [:suppliers, table]
|
||||
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
||||
td.timestamp=l table.created_at, format: :short
|
||||
td.timestamp data-time=table.created_at.utc.iso8601
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini'
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user