add toggle for edit english content

This commit is contained in:
Wen-Tien Chang 2009-06-22 16:04:06 +08:00
parent db8d2bfa8f
commit c895469d34
1 changed files with 18 additions and 7 deletions

View File

@ -8,16 +8,18 @@
<%= f.text_field :layout_name, :class => 'text' %> <%= f.text_field :layout_name, :class => 'text' %>
</p> </p>
<p> <p id="content_zh_tw_block">
<%= f.label "content_en", "Content (en)" %>
<%= f.text_area "content_en", :size => '100x30' %>
</p>
<p>
<%= f.label "content_zh_tw", "Content (zh_tw)" %> <%= f.label "content_zh_tw", "Content (zh_tw)" %>
<%= f.text_area "content_zh_tw", :size => '100x30' %> <%= f.text_area "content_zh_tw", :size => '100x30' %>
</p> </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>
<p> <p>
<%= f.label :is_published, "Is Published" %> <%= f.label :is_published, "Is Published" %>
<%= f.radio_button :is_published, 1 %>Yes <%= f.radio_button :is_published, 0 %> No <%= f.radio_button :is_published, 1 %>Yes <%= f.radio_button :is_published, 0 %> No
@ -31,4 +33,13 @@
<p> <p>
<%= f.label :use_engine, "Use Engine" %> <%= f.label :use_engine, "Use Engine" %>
<%= f.text_field :use_engine %> <%= f.text_field :use_engine %>
<p> <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 -%>