universal_table/app/views/admin/universal_tables/_date_field.html.erb

19 lines
869 B
Plaintext
Raw Permalink Normal View History

2015-11-13 13:10:00 +00:00
<div class="control-group">
<%= f.label :date, column.title, :class => "control-label" %>
<div class="controls">
<div>
<div class="default_picker input-append" style="">
<% v = !date_field.new_record? ? format_date(date_field.date, column.date_format, true) : "" %>
<%= f.text_field :date, :value => v, :placeholder => column.date_format.upcase, :data => {:format => (column.date_format == "yyyy" ? "yyyy/MM" : column.date_format)} %>
2015-11-13 13:10:00 +00:00
<span class="add-on clearDate"><i class="icons-cross-3"></i></span>
<span class="add-on iconbtn"><i data-date-icon="icons-calendar" data-time-icon="icons-clock" class="icons-calendar"></i></span>
</div>
</div>
</div>
<% if !date_field.new_record? %>
<%= f.hidden_field :id %>
<% else %>
<%= f.hidden_field :table_column_id, :value => column.id %>
<% end %>
</div>