<% @i = 0 %>
<%=form_for @file_to_show ,:url=>{:controller=>"patchfiles" ,:action=>"edit"} do |file|%> <%= file.fields_for :file_show do |filefield|%>
<% @file_to_show.file_show.each do |name,property| %> <%if property[:status].to_i == 1%> <%=filefield.check_box name,{:checked=>true,:id=>"checkbox"+@i.to_s,:class=>"checkbox",:style=>"float:left;"}%> <%else%> <%=filefield.check_box name,{:checked=>false,:id=>"checkbox"+@i.to_s,:class=>"checkbox",:style=>"float:left;"}%> <%end%>
<% @i = @i+1 %> <% @j = 0 %> <%= file.fields_for :sub_file_fields do |each_files|%> <%= each_files.fields_for name do |each_file|%> <% property[:files].each do |file_name,sub_property| %> <%if sub_property[:status].to_i == 1%> <%=each_file.check_box file_name,{:checked=>true,:id=>"checkbox"+@i.to_s,:class=>"sub_checkbox",:style=>"float:left;margin-left:1em;",:index=>@j}%> <%else%> <%=each_file.check_box file_name,{:checked=>false,:id=>"checkbox"+@i.to_s,:class=>"sub_checkbox",:style=>"float:left;margin-left:1em;",:index=>@j}%> <%end%> <% file_name = file_name.gsub("@",".") %>
<% @i = @i+1 %> <% @j = @j+1 %> <% end %> <%end%> <%end%>
<%end%>
<%end%> <%=file.submit "#{t(:updatefont)}",{:id=>"updatebtn",:onclick=>"return updatefcn()"}%> <%=file.text_field :recovery_btn, {:id=>"hidden-recovery",:type => "hidden",:value=>"false"} %> <%=file.text_field :refresh_btn, {:id=>"hidden-refresh",:type => "hidden",:value=>"false"} %> <%end%> 網站目錄根路徑:<%=Dir.pwd.to_s%>
  • CKEDITOR現有字形 <% @ckicktosee_str = (I18n.locale.to_s == "en") ? "click me to see all font which CKEDITOR have now" : "點擊我來查看編輯器所有目前擁有的字形" %> <%= @ckicktosee_str %>