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

19 lines
869 B
Plaintext

<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)} %>
<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>