This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/items/_form_link.html.erb

58 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2013-10-23 10:28:09 +00:00
<div id="link" class="hide">
<%= form_for :link, url: admin_links_path, remote: true do |f| %>
<fieldset>
<div id="page_error"></div>
<%= f.hidden_field :parent, class: "parent" %>
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name), id: 'name' %>
<span class="help-block"><%= t("front_page.name_field_helper") %></span>
<% @site_in_use_locales.each do |locale| %>
2013-10-30 10:53:23 +00:00
<%= f.fields_for :title_translations do |f| %>
2013-10-23 10:28:09 +00:00
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", id: locale %>
2013-10-30 10:53:23 +00:00
<% end %>
<%= f.fields_for :url_translations do |f| %>
<%= f.label :locale, "#{t(:url)} #{I18nVariable.from_locale(locale)}" %>
<%= f.text_field locale, :class => 'input-xlarge', placeholder: "#{t(:url)} #{I18nVariable.from_locale(locale)}", id: "url-#{locale}" %>
2013-10-23 10:28:09 +00:00
<% end %>
<% end %>
<div class="checkbox-groups" id="link-is-published">
<%= f.label :is_published, t(: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, checked: "checked" %> <%= t(:no_) %>
</label>
</p>
</div>
<div class="link-options checkbox-groups hide">
<label><%= t(:activation_link) %></label>
<% @site_in_use_locales.each do |valid_locale| %>
2013-10-23 10:28:09 +00:00
<div class="active-link <%= valid_locale %>">
<label class="checkbox">
<%= check_box_tag 'link[enabled_for][]', valid_locale, false, class: "lang-enable" %> <%= I18nVariable.from_locale(valid_locale) %>
</label>
<div class="active-mune">
<span><%= t(:menu_enable) %></span>
<label class="radio inline">
<%= radio_button_tag "link[menu_enabled_for][#{valid_locale}]", false, true %> <%= t(:no_) %>
</label>
<label class="radio inline">
<%= radio_button_tag "link[menu_enabled_for][#{valid_locale}]", true, false %> <%= t(:yes_) %>
</label>
</div>
</div>
<% end %>
</div>
<div class="form-actions">
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
<%= f.submit t(:submit), class: 'btn btn-primary btn-small' %>
</div>
</fieldset>
<% end %>
</div>