Orbit/app/views/admin/links/_form.html.erb

47 lines
1.7 KiB
Plaintext

<%= flash_messages %>
<%= f.error_messages %>
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
<<<<<<< Updated upstream
<%= f.label :name, t(:name) %>
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name) %>
=======
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name) %>
<span class="help-block"><%= I18n.t("front_page.name_field_helper") %></span>
>>>>>>> Stashed changes
<%= f.label :url, t(:url) %>
<%= f.text_field :url, :class => 'input-xlarge', placeholder: t(:url) %>
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", value: (@item.title_translations[locale] rescue nil) %>
<% end %>
<% end %>
<%= f.label :is_published, "#{t('front_page.is_published')} ?" %>
<p>
<label class="radio inline">
<%= f.radio_button :is_published, true %>
<%= t(:yes_) %>
</label>
<label class="radio inline">
<%= f.radio_button :is_published, false %>
<%= t(:no_) %>
</label>
</p>
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:" %>
<p>
<% @site_valid_locales.each do |valid_locale| %>
<label class="checkbox inline">
<%= check_box_tag 'link[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
<%= I18nVariable.from_locale(valid_locale) %>
</label>
<% end %>
<%= hidden_field_tag 'link[menu_enabled_for][]', '' %>
</p>