Fix html bug.
This commit is contained in:
parent
e2ab04b95c
commit
795331d942
|
@ -27,48 +27,58 @@
|
||||||
<div class="tab-content language-area">
|
<div class="tab-content language-area">
|
||||||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||||
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
||||||
<%= f.label :sunday_first, t("calendar.sunday_first"), :class => "control-label muted" %>
|
<div class="control-group">
|
||||||
<div class="controls">
|
<%= f.label :sunday_first, t("calendar.sunday_first"), :class => "control-label muted" %>
|
||||||
<%= f.fields_for :sunday_first_translations ,f.object do |f| %>
|
<div class="controls">
|
||||||
<%= hidden_field_tag "#{f.object_name}[#{locale}]" , "0" %>
|
<%= f.fields_for :sunday_first_translations ,f.object do |f| %>
|
||||||
<%= check_box_tag "#{f.object_name}[#{locale}]" , "1", f.object.get_sunday_first(locale) , :class=>"toggle-check", :data=> { disabled: true } %>
|
<%= hidden_field_tag "#{f.object_name}[#{locale}]" , "0" %>
|
||||||
<% end %>
|
<%= check_box_tag "#{f.object_name}[#{locale}]" , "1", f.object.get_sunday_first(locale) , :class=>"toggle-check", :data=> { disabled: true } %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%= f.label :date_type, t("calendar.date_type"), :class => "control-label muted" %>
|
<div class="control-group">
|
||||||
<div class="controls">
|
<%= f.label :date_type, t("calendar.date_type"), :class => "control-label muted" %>
|
||||||
<%= f.fields_for :date_type_translations ,f.object do |f| %>
|
<div class="controls">
|
||||||
<%
|
<%= f.fields_for :date_type_translations ,f.object do |f| %>
|
||||||
tmp = CalendarSetting::DateTypes[locale.to_s]
|
<%
|
||||||
tmp = CalendarSetting::DateTypes["en"] if tmp.nil?
|
tmp = CalendarSetting::DateTypes[locale.to_s]
|
||||||
%>
|
tmp = CalendarSetting::DateTypes["en"] if tmp.nil?
|
||||||
<%= select_tag "#{f.object_name}[#{locale}]" , options_for_select(tmp.map.with_index{|t, idx| [t, idx]}, f.object.date_type_translations[locale]), {style: "width: auto;"} %>
|
%>
|
||||||
<% end %>
|
<%= select_tag "#{f.object_name}[#{locale}]" , options_for_select(tmp.map.with_index{|t, idx| [t, idx]}, f.object.date_type_translations[locale]), {style: "width: auto;"} %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%= f.label :time_type, t("calendar.time_type"), :class => "control-label muted" %>
|
<div class="control-group">
|
||||||
<div class="controls">
|
<%= f.label :time_type, t("calendar.time_type"), :class => "control-label muted" %>
|
||||||
<%= f.fields_for :time_type_translations ,f.object do |f| %>
|
<div class="controls">
|
||||||
<%= select_tag "#{f.object_name}[#{locale}]" , options_for_select(CalendarSetting::TimeTypes.map.with_index{|type, idx| [t("calendar.#{type}"), idx]}, f.object.time_type_translations[locale]), {style: "width: auto;"} %>
|
<%= f.fields_for :time_type_translations ,f.object do |f| %>
|
||||||
<% end %>
|
<%= select_tag "#{f.object_name}[#{locale}]" , options_for_select(CalendarSetting::TimeTypes.map.with_index{|type, idx| [t("calendar.#{type}"), idx]}, f.object.time_type_translations[locale]), {style: "width: auto;"} %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr style="margin: 5px 0;border-top: 2px solid black;clear: left;">
|
<hr style="margin: 5px 0;border-top: 2px solid black;clear: left;">
|
||||||
<h4><%= t('calendar.calendar_mode') %></h4>
|
<h4><%= t('calendar.calendar_mode') %></h4>
|
||||||
<% CalendarSetting::All_modes.each do |mode| %>
|
<% CalendarSetting::All_modes.each do |mode| %>
|
||||||
<%= f.label mode, t("calendar.mode.#{mode}"), :class => "control-label muted" %>
|
<div class="control-group">
|
||||||
<div class="controls">
|
<%= f.label mode, t("calendar.mode.#{mode}"), :class => "control-label muted" %>
|
||||||
<%= f.fields_for :modes_translations ,f.object do |f| %>
|
<div class="controls">
|
||||||
<%= text_field_tag "#{f.object_name}[#{locale}][#{mode}]" , f.object.get_mode(mode, locale) %>
|
<%= f.fields_for :modes_translations ,f.object do |f| %>
|
||||||
<% end %>
|
<%= text_field_tag "#{f.object_name}[#{locale}][#{mode}]" , f.object.get_mode(mode, locale) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<hr style="margin: 5px 0;border-top: 2px solid black;clear: left;">
|
<hr style="margin: 5px 0;border-top: 2px solid black;clear: left;">
|
||||||
<h4><%= t('calendar.day_of_the_week') %></h4>
|
<h4><%= t('calendar.day_of_the_week') %></h4>
|
||||||
<% CalendarSetting::All_days.each do |idx| %>
|
<% CalendarSetting::All_days.each do |idx| %>
|
||||||
<%= f.label "days_#{locale}_#{idx}", t("calendar.day.#{idx}"), :class => "control-label muted" %>
|
<div class="control-group">
|
||||||
<% week_title = f.object.get_week_title(locale) %>
|
<%= f.label "days_#{locale}_#{idx}", t("calendar.day.#{idx}"), :class => "control-label muted" %>
|
||||||
<div class="controls">
|
<% week_title = f.object.get_week_title(locale) %>
|
||||||
<%= f.fields_for :days_translations ,f.object do |f| %>
|
<div class="controls">
|
||||||
<%= text_field_tag "#{f.object_name}[#{locale}][]" , week_title[idx] %>
|
<%= f.fields_for :days_translations ,f.object do |f| %>
|
||||||
<% end %>
|
<%= text_field_tag "#{f.object_name}[#{locale}][]" , week_title[idx] %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue