Merge branch 'ldap' of github.com:Rulingcom/orbit into ldap

This commit is contained in:
Matt 2012-05-17 19:41:51 +08:00
commit 4153820dba
3 changed files with 29 additions and 4 deletions

View File

@ -0,0 +1,11 @@
module Admin::AssetHelper
def show_all_fields(asset, field)
a = []
@site_valid_locales.each do |locale|
a << asset.send(field)[locale] rescue nil
end
a.join(' - ')
end
end

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,14 @@
<div class="controls"> <div class="controls">
<%= f.fields_for :title, (@asset.new_record? ? @asset.build_title : @asset.title) do |f| %> <%= f.fields_for :title, (@asset.new_record? ? @asset.build_title : @asset.title) do |f| %>
<div> <div>
<%= f.text_field I18n.locale, :class => "input-large" %> <% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<div>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class => "input-large" %>
</div>
<% end %>
<% end %>
</div> </div>
<% end %> <% end %>
</div> </div>
@ -23,7 +30,14 @@
<div class="controls"> <div class="controls">
<%= f.fields_for :description, (@asset.new_record? ? @asset.build_description : @asset.description) do |f| %> <%= f.fields_for :description, (@asset.new_record? ? @asset.build_description : @asset.description) do |f| %>
<div> <div>
<%= f.text_field I18n.locale, :class => "input-large" %> <% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<div>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class => "input-large" %>
</div>
<% end %>
<% end %>
</div> </div>
<% end %> <% end %>
</div> </div>