Chris's first commit at Fri Jan 28 2011 10:14:32 GMT+0800 (CST)
This commit is contained in:
1 parent
554aa0a95d
commit
19a7d51e60
145 files changed
+12742
-893
No files matched your search
@@ -1,49 +1,34 @@
|
||||
<%= f.error_messages %>
|
||||
<%= f.hidden_field :parent_name %>
|
||||
<%= f.hidden_field :parent_id %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name, "Name" %>
|
||||
<%= f.text_field :name, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :title, "Title en" %>
|
||||
<%= f.text_field :title_en, :class => 'text' %>
|
||||
<%= f.label :name, t('admin.name') %>
|
||||
<% if @page.parent_id.nil? %>
|
||||
<%= f.text_field :name, :class => 'text', :value => 'home', :disabled => true %>
|
||||
<%= f.hidden_field :name, :value => 'home' %>
|
||||
<% else %>
|
||||
<%= f.text_field :name, :class => 'text' %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<%= f.label :title, "Title zh_tw" %>
|
||||
<%= f.text_field :title_zh_tw, :class => 'text' %>
|
||||
</p>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= label_tag "#{f}[title]", "#{t('admin.title')} #{locale}" %>
|
||||
<%= text_field_tag "#{f}[i18n_variable][#{locale}]", (@i18n_variable[locale] if @i18n_variable), :class => 'text' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= f.label :layout_name, "Layout Name" %>
|
||||
<%= f.label :layout_name, t('admin.layout_name') %>
|
||||
<%= f.select :layout_name, Layout.all.map{ |l| [l.description, l.name] } %>
|
||||
</p>
|
||||
|
||||
<p id="content_zh_tw_block">
|
||||
<%= f.label "content_zh_tw", "Content (zh_tw)" %>
|
||||
<%= f.text_area "content_zh_tw", :size => '100x30' %>
|
||||
</p>
|
||||
|
||||
<p><a href="#" id="toggle_content_en_block">Edit english</a></p>
|
||||
|
||||
<p id="content_en_block">
|
||||
<%= f.label "content_en", "Content (en)" %>
|
||||
<%= f.text_area "content_en", :size => '100x30' %>
|
||||
<p>
|
||||
<%= f.label "content", t('admin.content') %>
|
||||
<%= f.text_area "content", :size => '100x30' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :is_published, "Is Published" %>
|
||||
<%= f.label :is_published, "#{t('admin.is_published')} ?" %>
|
||||
<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
|
||||
</p>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$('#content_en_block').hide();
|
||||
$('#toggle_content_en_block').click(function(){
|
||||
$('#content_en_block').toggle();
|
||||
});
|
||||
</script>
|
||||
<% end -%>
|
||||
@@ -1,10 +1,11 @@
|
||||
<h1>Editing pages</h1>
|
||||
|
||||
<% form_for @page, :url => admin_page_path(@page) do |f| %>
|
||||
<h1><%= t('admin.editing_page') %></h1>
|
||||
|
||||
<%= form_for @page, :url => admin_page_path(@page) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit 'Update' %>
|
||||
<%= f.submit t('update') %> <%= link_back %>
|
||||
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -1,11 +1,11 @@
|
||||
<h1>New pages</h1>
|
||||
|
||||
<% form_for :page, :url => admin_pages_path do |f| %>
|
||||
<h1><%= t('admin.new_page') %></h1>
|
||||
|
||||
<%= form_for :page, :url => admin_pages_path do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit 'Create' %>
|
||||
<%= f.submit t('create') %> <%= link_back %>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
Reference in new issue
Block a user