Orbit/app/views/admin/attributes/new.html.erb

56 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2013-01-08 08:58:01 +00:00
<%= form_for @attribute,:url => eval("admin_#{@attribute_type}s_path") ,:class=> "form-horizontal" do |f| %>
<div class="site-map role-block">
<div class="map-block back">
<h4><span><%= t(eval(":#{@attribute_type}"))%></span></h4>
<div class="form-horizontal">
<div class="clear">
<div class="control-group pull-left">
<label class="control-label" for="key"><%= t(:to_search) %></label>
<div class="controls">
<label class="radio inline">
<%= f.radio_button :to_search, true %>
2013-08-09 07:07:05 +00:00
<%= t(:yes_)%>
2013-01-08 08:58:01 +00:00
</label>
<label class="radio inline">
<%= f.radio_button :to_search, false %>
2013-08-09 07:07:05 +00:00
<%= t(:no_)%>
2013-01-08 08:58:01 +00:00
</label>
</div>
</div>
<div class="control-group pull-left">
<label class="control-label" for="key"><%= t(:key) %></label>
<div class="controls">
<% if @attribute.new_record? %>
<%= f.text_field :key, :placeholder => t(:key) %>
<% else %>
<div><%= @attribute.key%></div>
<% end %>
</div>
</div>
2013-08-09 07:07:05 +00:00
<% @site_valid_locales.each_with_index do |locale, i| %>
<label class="muted" for="name-en"><%= t(:item_name) %>(<%= I18nVariable.from_locale(locale) %>)</label>
<input id="name-<%= locale %>" type="text" class="input-large" placeholder="<%= t(:item_name) %>" name="<%="#{@attribute_type}[title_translations][#{locale}]"%>">
<% end %>
<%#= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%>
2013-01-08 08:58:01 +00:00
</div>
</div>
</div>
</div>
<div class="form-actions form-fixed pagination-right">
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
</div>
<% end %>
2011-12-23 10:34:21 +00:00
2013-01-08 08:58:01 +00:00
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "member" %>
<%= stylesheet_link_tag "site-map" %>
<% end %>