Changeset 1189
- Timestamp:
- 2008-09-25 16:46:40 (3 months ago)
- Files:
-
- trunk/app/controllers/nodes_controller.rb (modified) (1 diff)
- trunk/app/views/documents/show.rhtml (modified) (2 diffs)
- trunk/app/views/versions/edit.rhtml (modified) (1 diff)
- trunk/lib/parser/lib/rules/zena.rb (modified) (1 diff)
- trunk/test/helpers/testhelp.rb (modified) (1 diff)
- trunk/test/helpers/zena_parser/basic.yml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/nodes_controller.rb
r1181 r1189 22 22 before_filter :find_node, :except => [:index, :create, :not_found, :catch_all, :search, :attribute] 23 23 before_filter :check_path, :only => [:index, :show] 24 after_filter :change_lang, :only => [:create, :update ]24 after_filter :change_lang, :only => [:create, :update, :save_text] 25 25 layout :popup_layout, :only => [:edit, :import] 26 26 trunk/app/views/documents/show.rhtml
r829 r1189 1 <%# FIXME: = javascript "if (!(opener==undefined || opener.is_editor)) { opener.Zena.update( 'documents', '#{ url_for(:controller=>"document", :action=>"list", :parent_id=>@node.parent_id, :rnd=>rnd) }'); }" %>2 1 <div id='form_errors' class='errors'><%= error_messages_for @node %></div> 3 2 <div id='search'><%= search_box %></div> … … 9 8 <div class='tab'> 10 9 <div class="document"> 11 <p class="btn_x"><%= link_to_function _('btn_x'), "if (!(opener==undefined || opener.is_editor)) { opener.location.href=opener.location.href;}; self.close();" %></p>12 10 <table cellspacing="0" borderspacing="0"> 13 11 <tr> 14 12 <td class='preview'><p><%= img_tag(@node, :mode=>'pv') %></p><p class='size'><%= fsize(@node.c_size) %></p></td> 15 <td class='description'><h3 class='title '><span class='doc_id'><%= @node[:zip] %></span> <%= @node.name%></h3><p class='summary'><%= zazen(@node.v_summary) %></p></td></tr>13 <td class='description'><h3 class='title s<%= @node.version.status %>'><span class='doc_id'><%= @node[:zip] %></span> <%= @node.name %> <%= node_actions(:actions => :all) %></h3><p class='summary'><%= zazen(@node.v_summary) %></p></td></tr> 16 14 </table> 17 <p class='btn_validate'><%= link_to _("upload more"), new_document_path(:parent_id => @node.parent_zip) %> // <%= node_actions(:actions => :all) %></p>15 <p class='btn_validate'><%= link_to _("upload more"), new_document_path(:parent_id => @node.parent_zip) %> // <%= link_to_function _('close'), "if (!(opener==undefined || opener.is_editor)) { opener.location.href=opener.location.href;}; self.close();" %></p> 18 16 </div> 19 17 </div> trunk/app/views/versions/edit.rhtml
r1121 r1189 12 12 </div> 13 13 <div class='validate'> 14 <div>< input type='submit' onclick="$('loader').style.visibility = 'visible';" value='<%= _('validate') %>'/></div>14 <div><%= submit_to_remote('validate', _('validate'), :url => save_text_node_path(:id => @node[:zip]), :loading=>"$('loader').style.visibility = 'visible';", :complete=>"opener.window.location.href = opener.window.location.href; window.close();") %></div> 15 15 <div><%= submit_to_remote('save', _('save'), :url => save_text_node_path(:id => @node[:zip]), :loading=>"$('loader').style.visibility = 'visible';") %></div> 16 16 <% unless @node.version.new_record? %> trunk/lib/parser/lib/rules/zena.rb
r1187 r1189 695 695 res << "%>" 696 696 if @params[:status] == 'true' || (@params[:status].nil? && @params[:actions]) 697 if @html_tag_params[:class] 698 "<span class='s<%= #{node}.version.status %>'>#{res}</span>" 699 else 700 @html_tag_params[:class] = ["'s<%= #{node}.version.status %>'"] 701 @html_tag ||= 'span' 702 res 703 end 704 else 705 res 706 end 697 @html_tag ||= 'span' 698 add_html_class("s<%= #{node}.version.status %>") 699 end 700 res 707 701 end 708 702 trunk/test/helpers/testhelp.rb
r1184 r1189 1 1 require File.join(File.dirname(__FILE__), '..','test_helper') 2 2 require File.join(File.dirname(__FILE__), '..','..','lib','yaml_test') 3 begin 4 require 'turn' 5 Test::Unit::UI::Console::TestRunner.use_progressbar = true 6 rescue MissingSourceFile 7 # ignore missing 'turn' testing gem 8 end 3 9 4 10 module TestHelper trunk/test/helpers/zena_parser/basic.yml
r1183 r1189 359 359 src: "<h1 class='title' do='title' status='true' actions='edit,publish'/>" 360 360 tem: "/node_actions\(:node=>@node, .*:actions=>\"edit,publish\"/" 361 res: "/<h1 class=' title'><span class='s50'><span id='v_title22'>status title</span><span class='actions'><a.*/nodes/22/versions/0/edit.*/images/page_edit.png'.*/></a>.*</span></span></h1>/"361 res: "/<h1 class='s50 title'><span id='v_title22'>status title</span><span class='actions'><a.*/nodes/22/versions/0/edit.*/images/page_edit.png'.*/></a>.*</span></h1>/" 362 362 363 363 show_c_width:
