<%= @node.version.number %>
<%= error_messages_for @node %>
<%= search_box(:ajax=>true) %>
<% (partial = form_tabs).each_index do |i| %>
><%= link_to_function(_(partial[i] + '_tab'), "Zena.select_tab('#{partial[i]}')") %>
<% end %>
<%= upload_form_tag({:controller => 'nodes', :action => 'update', :id => @node[:zip]}, {:method => :put, :multipart => @node.kind_of?(Document), :id => 'node_form'}) %>
<%= readers_for(@node) %>
<% partial.each_index do |i| %>
class='tab_content'>
<%= render :partial=>"templates/edit_tabs/#{partial[i]}" %>
<% end %>
<%#= css_edit %>
<% javascript_tag do -%>
var current_sel = $('<%= partial[0] %>_sel');
var current_tab = $('<%= partial[0] %>_tab');
Event.observe(window, 'resize', function() { Zena.resizeElement('node_v_text'); } );
Event.observe(window, 'resize', function() { Zena.resizeElement('node_v_text'); } );
function popup_loaded() {
<% if params[:close] == 'true' %>
opener.window.location.href = opener.window.location.href;
window.close();
<% else -%>
Zena.resizeElement('node_v_text');
<% end -%>
}
$('node_form').getElements().each(function(input, index) {
new Form.Element.Observer(input, 3, function(element, value) {
<%= "opener.Zena.editor_preview('#{preview_node_version_path(:node_id=>@node[:zip], :id=>(@node.v_number || 0), :escape => false)}',element,value);" %>
});
});
<% end -%>