Changeset 1084
- Timestamp:
- 2008-07-01 01:22:42 (6 months ago)
- Files:
-
- trunk/app/views/templates/edit_tabs/_title.rhtml (modified) (1 diff)
- trunk/lib/parser/lib/rules/zena.rb (modified) (30 diffs)
- trunk/lib/query_builder/lib/query_builder.rb (modified) (1 diff)
- trunk/public/stylesheets/calendar.css (modified) (2 diffs)
- trunk/test/fixtures/files/ajax_test.zafu (modified) (2 diffs)
- trunk/test/helpers/application_helper_test.rb (modified) (1 diff)
- trunk/test/helpers/node_query/complex.yml (modified) (2 diffs)
- trunk/test/helpers/node_query/filters.yml (modified) (1 diff)
- trunk/test/helpers/zena_parser/ajax.yml (modified) (10 diffs)
- trunk/test/helpers/zena_parser/apphelper.yml (modified) (1 diff)
- trunk/test/helpers/zena_parser/basic.yml (modified) (9 diffs)
- trunk/test/helpers/zena_parser/complex.yml (modified) (3 diffs)
- trunk/test/helpers/zena_parser/relations.yml (modified) (1 diff)
- trunk/test/sites/complex/complex.png (modified) (previous)
- trunk/test/unit/relation_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/views/templates/edit_tabs/_title.rhtml
r1083 r1084 17 17 <%= text_area 'node', 'v_comment', :cols=>nil, :rows=>2, :class => 'full_width' %> 18 18 19 <% (@node.version.dyn.keys + (@node.virtual_class ? @node.virtual_class.attributes.split(',').map(&:strip) : [])).uniq.sortdo |k| -%>19 <% @node.dyn_attribute_keys do |k| -%> 20 20 <label for="d_<%= k %>"><%= _(k) %></label> 21 21 <%= text_area 'node', "d_#{k}", :cols=>nil, :rows=>2, :class => 'full_width' %> trunk/lib/parser/lib/rules/zena.rb
r1083 r1084 192 192 inc = descendant('include') 193 193 if inc && inc.params[:part] == @name 194 @context["#{@name}_method".to_sym] = method_name = get_template_url[1..-1].gsub('/','_')194 @context["#{@name}_method".to_sym] = method_name = template_url[1..-1].gsub('/','_') 195 195 pre << "<% def #{method_name}(depth, node, list); return '' if depth > #{inc.params[:depth] ? [inc.params[:depth].to_i,30].min : 5}; _erbout = '' -%>" 196 196 post << "<% _erbout; end -%><%= #{method_name}(0,#{node},#{list || "[#{node}]"}) %>" … … 360 360 attribute = @params[:attr] || @params[:tattr] || @params[:date] 361 361 if @params[:edit] == 'true' && !['url','path'].include?(attribute) 362 name = unique_name + '_' + attribute 363 "<% if #{node}.can_write? -%><span class='show_edit' id='#{erb_dom_id("#{attribute}_")}'>#{actions}<%= link_to_remote(#{attribute_method}, :url => edit_node_path(#{node_id}) + \"?attribute=#{attribute}&dom_id=#{dom_id("#{attribute}_")}#{@params[:publish] == 'true' ? '&publish=true' : ''}\", :method => :get) %></span><% else -%>#{actions}<%= #{attribute_method} %><% end -%>" 362 "<% if #{node}.can_write? -%><span class='show_edit' id='#{erb_dom_id("_#{attribute}")}'>#{actions}<%= link_to_remote(#{attribute_method}, :url => edit_node_path(#{node_id}) + \"?attribute=#{attribute}&dom_id=#{dom_id("_#{attribute}")}#{@params[:publish] == 'true' ? '&publish=true' : ''}\", :method => :get) %></span><% else -%>#{actions}<%= #{attribute_method} %><% end -%>" 364 363 else 365 364 "#{actions}<%= #{attribute_method} %>" … … 390 389 if @params[:edit] == 'true' && !['url','path'].include?(attribute) 391 390 edit_text = _('edit') 392 @html_tag_params[:id] = erb_dom_id(" #{attribute}_")393 res = "<% if #{node}.can_write? -%><span class='zazen_edit'><%= link_to_remote(#{edit_text.inspect}, :url => edit_node_path(#{node_id}) + \"?attribute=#{attribute}&dom_id=#{dom_id(" #{attribute}_")}#{@params[:publish] == 'true' ? '&publish=true' : ''}&zazen=true\", :method => :get) %></span><% end -%>#{res}"391 @html_tag_params[:id] = erb_dom_id("_#{attribute}") 392 res = "<% if #{node}.can_write? -%><span class='zazen_edit'><%= link_to_remote(#{edit_text.inspect}, :url => edit_node_path(#{node_id}) + \"?attribute=#{attribute}&dom_id=#{dom_id("_#{attribute}")}#{@params[:publish] == 'true' ? '&publish=true' : ''}&zazen=true\", :method => :get) %></span><% end -%>#{res}" 394 393 else 395 394 res … … 437 436 end 438 437 else 439 440 438 if parent.method == 'each' && @method == parent.single_child_method 441 439 # use parent as block … … 733 731 734 732 # TODO: show 'reply' instead of 'edit' in comments if visitor != author 735 out link_to_update(self, :url => "\#{edit_#{base_class.to_s.underscore}_path(#{node_id})}", :html_params => get_html_params(@params), :method => :get, : else => :void)733 out link_to_update(self, :url => "\#{edit_#{base_class.to_s.underscore}_path(#{node_id})}", :html_params => get_html_params(@params), :method => :get, :cond => "#{node}.can_write?", :else => :void) 736 734 end 737 735 else … … 768 766 selected = "#{node_attribute(attribute)}.to_s" 769 767 end 768 html_id = html_attributes[:id] ? " id='#{html_attributes[:id]}'" : '' 770 769 if @context[:in_filter] 771 select_tag = "<select name='#{attribute}'>"772 else 773 select_tag = "<select name='#{base_class.to_s.underscore}[#{attribute}]'>"770 select_tag = "<select#{html_id} name='#{attribute}'>" 771 else 772 select_tag = "<select#{html_id} name='#{base_class.to_s.underscore}[#{attribute}]'>" 774 773 end 775 774 … … 798 797 when 'date_box', 'date' 799 798 return parser_error("date_box without name") unless attribute 800 input_id = @context[: template_url] ? ", :id=>\"#{@context[:dom_id]}_#{attribute}\"" : ''799 input_id = @context[:dom_prefix] ? ", :id=>\"#{dom_id}_#{attribute}\"" : '' 801 800 "<%= date_box '#{base_class.to_s.underscore}', #{attribute.inspect}, :size=>15#{@context[:in_add] ? ", :value=>''" : ''}#{input_id} %>" 802 801 when 'id' 803 802 return parser_error("select id without name") unless attribute 804 803 name = "#{attribute}_id" unless attribute[-3..-1] == '_id' 805 input_id = params[:input_id] ? ", :input_id =>\"#{@context[:dom_id]}_#{attribute}\"" : ''804 input_id = @context[:erb_dom_id] ? ", :input_id =>\"#{erb_dom_id}_#{attribute}\"" : '' 806 805 "<%= select_id('#{base_class.to_s.underscore}', #{attribute.inspect}#{input_id}) %>" 807 806 when 'time_zone' … … 1171 1170 opts[:method] = :delete 1172 1171 opts[:default_text] = _('btn_tiny_del') 1173 opts[:html_params] = get_html_params( @params)1172 opts[:html_params] = get_html_params({:class => 'unlink'}.merge(@params)) 1174 1173 1175 1174 out link_to_update(target, opts) … … 1278 1277 1279 1278 def r_each 1279 if @context[:dom_prefix] || @params[:draggable] == 'true' || descendant('unlink') 1280 id_hash = {:id => erb_dom_id} 1281 else 1282 id_hash = nil 1283 end 1284 1280 1285 if @context[:make_form] 1281 1286 # use the elements inside 'each' loop to produce the edit form … … 1283 1288 elsif @context[:list] 1284 1289 # normal rendering: inserted into the layout 1285 if @params[:draggable] == 'true' 1290 if @params[:draggable] == 'true' || descendant('unlink') 1286 1291 @html_tag ||= 'div' 1287 1292 out "<% #{var}_dom_ids = [] -%>" … … 1318 1323 @anchor_param = nil 1319 1324 1320 if @context[:dom_prefix]1321 # ajax, set id, class1322 id_hash = {:id=> erb_dom_id}1325 res = expand_with(:node => var, :scope_node => var) 1326 1327 if id_hash 1323 1328 if @html_tag 1324 1329 @html_tag_params.merge!(id_hash) 1325 res = expand_with(:node=>var, :scope_node=>var)1326 1330 else 1327 res = add_params(expand_with(:node=>var, :scope_node=>var), id_hash) 1328 end 1329 else 1330 res = expand_with(:node=>var, :scope_node=>var) 1331 end 1331 res = add_params(res, id_hash) 1332 end 1333 end 1334 1332 1335 out render_html_tag(res, html_append) 1336 1333 1337 out "<% end -%>" 1334 1338 … … 1336 1340 out "<script type='text/javascript'>\n//<![CDATA[\n<%= #{var}_dom_ids.inspect %>.each(Zena.draggable)\n//]]>\n</script>" 1337 1341 end 1342 1338 1343 elsif @context[:saved_template] 1339 1344 # render to produce a saved template 1340 id_hash = {:id=>erb_dom_id} 1341 if @html_tag 1342 @html_tag_params.merge!(id_hash) 1343 out render_html_tag(expand_with(:scope_node=>node), html_append) 1344 else 1345 out add_params(expand_with(:scope_node=>node), id_hash) 1346 end 1345 res = expand_with(:scope_node => node) 1346 if id_hash 1347 if @html_tag 1348 @html_tag_params.merge!(id_hash) 1349 res = render_html_tag(res, html_append) 1350 else 1351 res = add_params(res, id_hash) 1352 end 1353 end 1354 1355 out res 1356 1347 1357 if @params[:draggable] == 'true' 1348 1358 out "<script type='text/javascript'>\n//<![CDATA[\nZena.draggable('#{erb_dom_id}')\n//]]>\n</script>" … … 1669 1679 # called from self (storing template / rendering) 1670 1680 size = (params[:size] || 'large').to_sym 1671 dom_id = @context[:dom_id]1672 template_url = @context[:template_url]1673 1681 finder = params[:find] || 'notes in project' 1674 1682 ref_date = params[:date] || 'event_at' 1675 1683 type = params[:type] ? params[:type].to_sym : :month 1676 @params[ref_date.gsub('_at','').to_sym] = 'month' # will produce a raw finder for all events in the same month as the ref date.1677 1684 1678 1685 if @blocks == [] … … 1683 1690 @blocks = [make(:void, :method=>'void', :text=>"<span do='show' date='current_date' format='%d'/><ul><li do='each' do='link' attr='name'/></ul><r:else do='[current_date]' format='%d'/>")] 1684 1691 end 1692 remove_instance_variable(:@all_descendants) 1685 1693 elsif !descendant('else') 1686 1694 @blocks += [make(:void, :method=>'void', :text=>"<r:else do='[current_date]' format='%d'/>")] 1687 1695 end 1688 1696 @html_tag_done = false 1689 @html_tag_params[:id] = "#{@context[:erb_dom_id]}_<%= #{node}.zip %>"1697 @html_tag_params[:id] = erb_dom_id 1690 1698 @html_tag_params[:class] ||= "#{size}cal" 1691 1699 @html_tag ||= 'div' … … 1706 1714 res = <<-END_TXT 1707 1715 <h3 class='title'> 1708 <span><%= link_to_remote(#{_('img_prev_page').inspect}, :url => #{base_class.to_s.underscore}_path(#{node_id}) + \"/zafu?t_url=#{CGI.escape(template_url)}&dom_id=#{ @context[:dom_id]}&date=#{prev_date}\", :method => :get) %></span>1709 <span ><%= link_to_remote(#{title}, :url => #{base_class.to_s.underscore}_path(#{node_id}) + \"/zafu?t_url=#{CGI.escape(template_url)}&dom_id=#{@context[:dom_id]}\", :method => :get) %></span>1710 <span><%= link_to_remote(#{_('img_next_page').inspect}, :url => #{base_class.to_s.underscore}_path(#{node_id}) + \"/zafu?t_url=#{CGI.escape(template_url)}&dom_id=#{ @context[:dom_id]}&date=#{next_date}\", :method => :get) %></span>1716 <span><%= link_to_remote(#{_('img_prev_page').inspect}, :url => #{base_class.to_s.underscore}_path(#{node_id}) + \"/zafu?t_url=#{CGI.escape(template_url)}&dom_id=#{dom_id}&date=#{prev_date}\", :method => :get) %></span> 1717 <span class='date'><%= link_to_remote(#{title}, :url => #{base_class.to_s.underscore}_path(#{node_id}) + \"/zafu?t_url=#{CGI.escape(template_url)}&dom_id=#{dom_id}\", :method => :get) %></span> 1718 <span><%= link_to_remote(#{_('img_next_page').inspect}, :url => #{base_class.to_s.underscore}_path(#{node_id}) + \"/zafu?t_url=#{CGI.escape(template_url)}&dom_id=#{dom_id}&date=#{next_date}\", :method => :get) %></span> 1711 1719 </h3> 1712 1720 <table cellspacing='0' class='#{size}cal'> … … 1716 1724 <tr class='body'> 1717 1725 <% week.step(week+6,1) do |day_#{list_var}|; #{list_var} = cal_#{list_var}[day_#{list_var}.strftime('%Y-%m-%d')] -%> 1718 <td<%= cal_class(day_#{list_var},#{current_date}) %>><% if #{list_var} -%>#{expand_with(:in_if => true, :list => list_var, :date => "day_#{list_var}", : template_url=> nil)}<% end -%></td>1726 <td<%= cal_class(day_#{list_var},#{current_date}) %>><% if #{list_var} -%>#{expand_with(:in_if => true, :list => list_var, :date => "day_#{list_var}", :saved_template => nil, :dom_prefix => nil)}<% end -%></td> 1719 1727 <% end -%> 1720 1728 </tr> … … 1729 1737 @date_scope = "TABLE_NAME.#{fld} >= '\#{start_date.strftime('%Y-%m-%d')}' AND TABLE_NAME.#{fld} <= '\#{end_date.strftime('%Y-%m-%d')}'" 1730 1738 1731 template_url = get_template_url(@context)1739 new_dom_scope 1732 1740 1733 1741 # SAVED TEMPLATE 1734 template = expand_block(self, :block => self, : node => '@node', :template_url => template_url, :dom_id => "\#{params[:dom_id]}", :erb_dom_id => "<%= params[:dom_id] %>")1742 template = expand_block(self, :block => self, :saved_template => true) 1735 1743 out helper.save_erb_to_url(template, template_url) 1736 1744 1737 1745 # INLINE 1738 out expand_block(self, :block => self, : template_url => template_url, :dom_id => "#{self.dom_id}_\#{#{node_id}}", :erb_dom_id => "#{self.dom_id}_<%= #{node_id} %>")1746 out expand_block(self, :block => self, :saved_template => false) 1739 1747 end 1740 1748 end … … 1743 1751 def r_cache 1744 1752 kpath = @params[:kpath] || Page.kpath 1745 context = get_template_url 1746 out "<% #{cache} = Cache.with(visitor.id, visitor.group_ids, #{kpath.inspect}, #{helper.send(:lang).inspect}, #{context.inspect}) do capture do %>" 1753 out "<% #{cache} = Cache.with(visitor.id, visitor.group_ids, #{kpath.inspect}, #{helper.send(:lang).inspect}, #{template_url.inspect}) do capture do %>" 1747 1754 out expand_with 1748 1755 out "<% end; end %><%= #{cache} %>" … … 1751 1758 # recursion 1752 1759 def r_include 1753 return '' if @context[: template_url]1760 return '' if @context[:saved_template] 1754 1761 return super if @params[:template] || !@params[:part] 1755 1762 part = @params[:part].gsub(/[^a-zA-Z_]/,'') … … 1806 1813 return parser_error("stylesheet #{@params[:stylesheet].inspect} not found") unless doc 1807 1814 1808 template_url = ( get_template_url.split('/')[0..-2] + ['_main.xsl']).join('/')1815 template_url = (self.template_url.split('/')[0..-2] + ['_main.xsl']).join('/') 1809 1816 helper.save_erb_to_url(xsl_content, template_url) 1810 1817 out "<?xml version='1.0' encoding='utf-8'?>\n" … … 2109 2116 2110 2117 def do_list(list_finder, opts={}) 2111 new_dom_scope2118 clear_dom_scope 2112 2119 2113 2120 @context.merge!(opts) # pass options from 'zafu_known_contexts' to @context 2114 2121 2115 if (each_block = descendant('each')) && (descendant('edit') || descendant('add') || descendant('add_document') || (descendant('swap') && descendant('swap').parent.method != 'block') || ['block', 'drop'].include?(each_block.single_child_method)) 2122 if (each_block = descendant('each')) && (each_block.descendant('edit') || descendant('add') || descendant('add_document') || (descendant('swap') && descendant('swap').parent.method != 'block') || ['block', 'drop'].include?(each_block.single_child_method)) 2123 new_dom_scope 2116 2124 # ajax, build template. We could merge the following code with 'r_block'. 2117 2125 add_block = descendant('add') … … 2201 2209 2202 2210 # use our own scope 2203 def new_dom_scope2211 def clear_dom_scope 2204 2212 @context.delete(:dom_prefix) # should not propagate 2205 @context[:dom_prefix] = self.dom_prefix2206 2213 @context.delete(:make_form) # should not propagate 2207 2214 @context.delete(:saved_template) # should not propagate 2208 2215 end 2209 2216 2217 # create our own ajax DOM scope 2218 def new_dom_scope 2219 clear_dom_scope 2220 @context[:dom_prefix] = self.dom_prefix 2221 end 2222 2210 2223 # DOM id for the current context 2211 def dom_id( prefix='')2224 def dom_id(suffix='') 2212 2225 return "\#{dom_id(#{node})}" if @context && @context[:saved_template] 2213 2226 if @context && scope_node = @context[:scope_node] 2214 res = "#{ prefix}#{dom_prefix}_\#{#{scope_node}.zip}"2215 else 2216 res = prefix +dom_prefix2227 res = "#{dom_prefix}_\#{#{scope_node}.zip}" 2228 else 2229 res = dom_prefix 2217 2230 end 2218 2231 if method == 'each' && !@context[:make_form] … … 2228 2241 parent = parent.parent 2229 2242 end 2230 target ? target.dom_id : res2231 else 2232 res 2233 end 2234 end 2235 2236 def erb_dom_id( prefix='')2243 target ? target.dom_id(suffix) : (res + suffix) 2244 else 2245 res + suffix 2246 end 2247 end 2248 2249 def erb_dom_id(suffix='') 2237 2250 return "<%= dom_id(#{node}) %>" if @context && @context[:saved_template] 2238 2251 if @context && scope_node = @context[:scope_node] 2239 res = "#{ prefix}#{dom_prefix}_<%= #{scope_node}.zip %>"2240 else 2241 res = prefix +dom_prefix2242 end 2243 if method == 'each' && @context[:make_form]2252 res = "#{dom_prefix}_<%= #{scope_node}.zip %>" 2253 else 2254 res = dom_prefix 2255 end 2256 if method == 'each' && !@context[:make_form] 2244 2257 "#{res}_<%= #{var}.zip %>" 2245 2258 elsif method == 'unlink' … … 2253 2266 parent = parent.parent 2254 2267 end 2255 target ? target.erb_dom_id : res2256 else 2257 res 2268 target ? target.erb_dom_id(suffix) : (res + suffix) 2269 else 2270 res + suffix 2258 2271 end 2259 2272 end … … 2490 2503 2491 2504 res ||= if opts[:erb] 2492 "<%= #{ res} %>"2493 else 2494 "\#{#{ res}}"2505 "<%= #{attribute} %>" 2506 else 2507 "\#{#{attribute}}" 2495 2508 end 2496 2509 res … … 2509 2522 2510 2523 real_attribute = attribute =~ /\Ad_/ ? attribute : attribute.gsub(/\A(|[\w_]+)id(s?)\Z/, '\1zip\2') 2511 2524 2512 2525 res = if klass.ancestors.include?(Node) 2513 2526 if ['url','path'].include?(real_attribute) … … 2697 2710 if res[:name] =~ /\A([\w_]+)\[(.*?)\]/ 2698 2711 attribute = $2 2699 res[:id] = "#{$1}_#{$2}"2700 2712 else 2701 2713 attribute = res[:name] … … 2707 2719 end 2708 2720 2709 res[:id] = @context[:erb_dom_id] ? "#{@context[:erb_dom_id]}_#{attribute}" : res[:name].sub('[','_').sub(']','')2721 res[:id] = "#{erb_dom_id}_#{attribute}" if @context[:dom_prefix] 2710 2722 2711 2723 [:size, :style, :class].each do |k| … … 2828 2840 return '' if ['url','path'].include?(attribute) # cannot be set with a form 2829 2841 if params[:date] 2830 input_id = @context[: template_url] ? ", :id=>\"#{@context[:dom_id]}_#{attribute}\"" : ''2842 input_id = @context[:dom_prefix] ? ", :id=>\"#{dom_id}_#{attribute}\"" : '' 2831 2843 return "<%= date_box('#{base_class.to_s.underscore}', #{params[:date].inspect}#{input_id}) %>" 2832 2844 end 2833 input_id = @context[: template_url] ? " id='#{@context[:erb_dom_id]}_#{attribute}'" : ''2845 input_id = @context[:dom_prefix] ? " id='#{erb_dom_id}_#{attribute}'" : '' 2834 2846 "<input type='#{params[:type] || 'text'}'#{input_id} name='#{input[:name]}' value=#{input[:value]}/>" 2835 2847 end … … 2851 2863 value = attribute ? "<%= #{node_attribute(attribute)} %>" : "" 2852 2864 end 2853 input_id = "#{@context[:erb_dom_id]}_#{attribute}" || name.sub('[','_').sub(']','')2854 "<textarea name='#{name}' id='#{input_id}'>#{value}</textarea>"2865 html_id = @context[:dom_prefix] ? " id='#{erb_dom_id}_#{attribute}'" : '' 2866 "<textarea#{html_id} name='#{name}'>#{value}</textarea>" 2855 2867 end 2856 2868 trunk/lib/query_builder/lib/query_builder.rb
r1083 r1084 211 211 end 212 212 op = $1.strip 213 rest = rest[ $1.size..-1]213 rest = rest[op.size..-1] 214 214 op = {'lt' => '<','le' => '<=','eq' => '=','ne' => '<>','ge' => '>=','gt' => '>','like' => 'LIKE', 'not like' => 'NOT LIKE'}[op] || $1 215 215 res << op trunk/public/stylesheets/calendar.css
r1081 r1084 1 1 /* small calendar */ 2 2 3 .tinycal .title { text-align: center; background:white; margin-bottom:0.5em; color:#655;}3 .tinycal .title { display:table; margin:auto; background:white; margin-bottom:0.5em; color:#655;} 4 4 .tinycal table { margin:auto; cursor:pointer; } 5 5 .tinycal table { border: 1px solid #CAD4DA; background:#F5F8F9; } 6 6 .tinycal td { text-align:center; color:#333; } 7 7 .tinycal a { color:inherit; } 8 .tinycal .title span { display:block; float:left; text-align:center;} 9 .tinycal .title .date { width:130px; } 8 10 .tinycal em { border-bottom:2px solid orange; font-style:normal; } 9 11 .tinycal .head td { padding: 2px; color:#655; text-align:center; } … … 16 18 17 19 /* LARGE CALENDAR */ 18 .largecal .title { text-align: center; background:white; margin-bottom:0.5em; font-size:1.3em; }20 .largecal .title { display:table; margin:auto; background:white; margin-bottom:0.5em; font-size:1.3em; } 19 21 .largecal .title a { color:#655; font-size: 1em; font-family: Georgia, Times, serif;} 20 .largecal .title span { padding:0 6px; } 21 .largecal table { border:1px solid #655; margin:auto; border-collapse:separate; line-height:1em;} 22 .largecal .title span { padding:0 6px; display:block; float:left; text-align:center;} 23 .largecal .title .date { width:150px; } 24 .largecal table { border:1px solid #655; margin:auto; border-collapse:separate; line-height:1em; clear:left;} 22 25 .largecal .head td { border-left:1px solid #836C6C; background: #655; color: #fff; width:14%; height:0.8em; text-align:center; padding:0.4em 3px; } 23 26 .largecal .head td:first-child {border-left-width:0;} trunk/test/fixtures/files/ajax_test.zafu
r1083 r1084 25 25 <r:filter live='true' update='upfi'/> 26 26 </div> 27 28 29 <h3>calendar test</h3> 30 <div do='calendar' find='notes in site'/> 31 32 <h3>week calendar</h3> 33 <div do='calendar' find='notes in site' type='week'/> 34 35 <h3>tiny calendar</h3> 36 <div do='calendar' find='notes in site' size='tiny'/> 37 27 38 28 39 <div id='edit' do='block'> … … 104 115 <hr/> 105 116 106 107 117 <h2>notes & comments</h2> 108 118 109 <r:include template='notes'/> 119 <div id='notes' do='notes' in='project' limit='10' order='log_at DESC'> 120 <ul class='note_list'> 121 <li do='add' after='self'/> 122 <li class='inline_form' do='form'> 123 <form> 124 <p class='node_v_title'><input type='text' name='v_title' size='25'/></p> 125 <p class='node_klass'> <r:select name='klass' root_class='Note' selected='Post'/></p> 126 <p class='node_log_at'> <input type='date_box' name='log_at'/> </p> 127 <p class='validate'> <input type="submit" value='validate' do='void' tset_value='validate'/></p> 128 </form> 129 </li> 130 <li class='note' do='each'> 131 <div class='header'> 132 <p class='log_at' do='show' date='log_at' tformat='full_date'>04.10</p> 133 <h2 class='title' do='title' actions='all'/> 134 <div class='summary' do ='summary'/> 135 </div> 136 <r:text/> 137 <ul do='comments'> 138 <li do='each'><b do='[title]'/> <b do='[author_name]'/> 139 <div do='{text}'/> 140 </li> 141 <li do='add'/> 142 <li do='form'> 143 <p><input name='title'/></p> 144 <p><textarea name='text'/></p> 145 <p><input type='submit'/></p> 146 </li> 147 </ul> 148 <div class='clear'></div> 149 </li> 150 </ul> 151 </div> 152 110 153 111 154 <hr/> trunk/test/helpers/application_helper_test.rb
r1064 r1084 287 287 end 288 288 289 def test_calendar_has_note290 op_at = nodes(:opening).event_at291 @node = secure!(Node) { nodes(:zena) }292 sql, errors, ignore_source = Node.build_find(:all, "news", :node_name => '@node', :raw_filters => ["TABLE_NAME.event_at >= '\#{start_date.strftime('%Y-%m-%d')}' AND TABLE_NAME.event_at <= '\#{end_date.strftime('%Y-%m-%d')}'"])293 sql = "\"#{sql}\""294 cal = calendar(:node=>@node, :date=>Date.civil(op_at.year, op_at.month, 5), :size=>'tiny', :sql => sql)295 assert_match %r{class='sun'>12}, cal296 assert_match %r{<em>18</em>}, cal297 cal = calendar(:node=>@node, :date=>Date.civil(op_at.year, op_at.month, 5), :size=>'large', :sql => sql)298 assert_match %r{18.*onclick=.*Updater.*largecal_preview.*/z/calendar/notes.*(selected=27.*|2006-03-18.*)(selected=27.*|2006-03-18.*)</p></td>}m, cal299 end300 301 def test_calendar_today302 @node = secure!(Node) { nodes(:zena) }303 sql, errors, ignore_source = Node.build_find(:all, "news", :node_name => '@node', :raw_filters => ["TABLE_NAME.event_at >= '\#{start_date.strftime('%Y-%m-%d')}' AND TABLE_NAME.event_at <= '\#{end_date.strftime('%Y-%m-%d')}'"])304 sql = "\"#{sql}\""305 cal = calendar(:node=>@node, :sql => sql, :size=>'large')306 assert_match %r{<td[^>]*id='large_today'>#{Date.today.day}</td>}, cal307 cal = calendar(:node=>@node, :sql => sql, :size=>'tiny')308 assert_match %r{<td[^>]*id='tiny_today'>#{Date.today.day}</td>}, cal309 end310 311 289 # ------ these tests were in main helper ---- 312 290 trunk/test/helpers/node_query/complex.yml
r1078 r1084 50 50 node: roger 51 51 src: assigned_formations where l_status eq 100 52 res: f orm2006, transm2001, transm2002, transp200452 res: fiber2003, form2006, transm2001, transm2002, transp2004 53 53 54 54 custom_query_form_date: … … 62 62 node: roger 63 63 ref_date: 2005-03-01 64 src: emp_form_dates where custom_a is not null and (last_date is null or next_date lt REF_DATE + 6 month) order by next_date desc65 res: " transmit_information, engine"64 src: emp_form_dates where last_date is null or (custom_a is not null and next_date lt REF_DATE + 6 month) 65 res: "engine, radio_usage, secure_a_site, winch_usage, transmit_information, fiber_junction" 66 66 67 67 find_employees_related_to_a_course__formulate_problems: trunk/test/helpers/node_query/filters.yml
r1078 r1084 67 67 param_filter_no_string: 68 68 src: "notes where created_at gt REF_DATE - param:f in site" 69 sql: "/nodes.created_at\ > now\(\) - #\{Node.connection.quote\(params\[:f\].to_s\)\}/"69 sql: "/nodes.created_at\ > now\(\) - #\{Node.connection.quote\(params\[:f\].to_s\)\}/" 70 70 71 71 filter_literal: trunk/test/helpers/zena_parser/ajax.yml
r1083 r1084 7 7 show_edit: 8 8 src: "<r:show attr='name' edit='true'/>" 9 tem: "<% if @node.can_write? -%><span class='show_edit' id='list _name.<%= @node.zip %>'><%= link_to_remote(@node.name, :url => edit_node_path(@node.zip) + \"?attribute=name&identifier=list_name.#{@node.zip}\", :method => :get) %></span><% else -%><%= @node.name %><% end -%>"10 res: "/span class='show_edit' id='list _name.22'>.*Ajax\.Request\('/nodes/22/edit\?attribute=name/"9 tem: "<% if @node.can_write? -%><span class='show_edit' id='list1_name'><%= link_to_remote(@node.name, :url => edit_node_path(@node.zip) + \"?attribute=name&dom_id=list1_name\", :method => :get) %></span><% else -%><%= @node.name %><% end -%>" 10 res: "/span class='show_edit' id='list1_name'>.*Ajax\.Request\('/nodes/22/edit\?attribute=name/" 11 11 12 12 zazen_edit: 13 13 src: "<r:zazen attr='name' edit='true'/>" 14 tem: "<div id='list _name.<%= @node.zip %>'><% if @node.can_write? -%><span class='zazen_edit'><%= link_to_remote(\"edit\", :url => edit_node_path(@node.zip) + \"?attribute=name&identifier=list_name.#{@node.zip}&zazen=true\", :method => :get) %></span><% end -%><%= zazen(@node.name, :node=>@node) %></div>"15 res: "/div id='list _name.22'>.*Ajax\.Request\('/nodes/22/edit\?attribute=name/"14 tem: "<div id='list1_name'><% if @node.can_write? -%><span class='zazen_edit'><%= link_to_remote(\"edit\", :url => edit_node_path(@node.zip) + \"?attribute=name&dom_id=list1_name&zazen=true\", :method => :get) %></span><% end -%><%= zazen(@node.name, :node=>@node) %></div>" 15 res: "/div id='list1_name'>.*Ajax\.Request\('/nodes/22/edit\?attribute=name/" 16 16 17 17 edit_not_each: … … 40 40 <li do='form'><input name='v_title'/> this is the form</li> 41 41 </r:children> 42 res: "/<li.*list _29_30.*>bird.*<li.*list_29_31.*>flower.*<li.*list_29_add.*list_29_form.*toggle.*<li .*list_29_form.*style.*none.*Ajax.Request.*input type='hidden' name='template_url' value=\"/each/add/with/form/list\".*input type='hidden' name='node\[parent_id\]' value=\"29\"/"42 res: "/<li.*list1_30.*>bird.*<li.*list1_31.*>flower.*<li.*list1_add.*list1_form.*toggle.*<li .*list1_form.*style.*none.*Ajax.Request.*input type='hidden' name='t_url' value=./each/add/with/form/list1.*input type='hidden' name='node\[parent_id\]' value=.29./" 43 43 44 44 each_add_with_form_klass_set: … … 55 55 each_add_with_select: 56 56 src: "<r:children><r:each do='[name]'/><r:add/><r:form><select name='icon_id' nodes='images in project' selected='[main.icon_id]_abc'/></r:form></r:children>" 57 'each/add/en/with/select/list _form.erb': '/:selected => \"#\{@node.icon_zip\}_abc\"/'57 'each/add/en/with/select/list1_form.erb': '/map.|r| \[r.name, r.zip.to_s\]., \"#.@node.icon_zip._abc\"\)/' 58 58 tem: "/@node.do_find\(:all, \"SELECT nodes.* FROM nodes WHERE nodes.kpath LIKE 'NDI%'/" 59 59 … … 62 62 node: 'wiki' 63 63 src: "<r:children><r:each><li><r:show attr='name'>blah</r:show> <r:edit>edit</r:edit></li>\n</r:each><r:form><li><form>this is the form</form></li></r:form></r:children>" 64 res: "/<li id='list .29.30'>bird <a href='/nodes/30/edit\?template_url=.*' onclick=\"new Ajax.Request\('/nodes/30/edit\?template_url=%2Feach%2Fedit%2Fwith%2Fform%2Flist/"64 res: "/<li id='list1_30'>bird <a href='/nodes/30/edit\?t_url=.*' onclick=\"new Ajax.Request\('/nodes/30/edit\?t_url=%2Feach%2Fedit%2Fwith%2Fform%2Flist/" 65 65 66 66 make_form: 67 67 src: "<ul do='children'><li do='each' do='[name]'/><li do='add'/></ul>" 68 tem: "/<li id='list _<%= @node.zip %>_form' style='display:none;'><%= form_remote_tag\(:url => nodes_path/"69 'make/form/en/list .erb': "<li id='<%= params[:dom_id] %>_<%= @node.zip%>'><%= @node.name %></li>"70 'make/form/en/list _form.erb': "/<li id='<%= params\[:dom_id\] %>_<%= @node.new_record\? \? 'form' : @node.zip%>'>/"68 tem: "/<li id='list1_form' style='display:none;'><%= form_remote_tag\(:url => nodes_path/" 69 'make/form/en/list1.erb': "<li id='<%= dom_id(@node) %>'><%= @node.name %></li>" 70 'make/form/en/list1_form.erb': "/<li id='<%= dom_id\(@node\) %>'>/" 71 71 72 72 each_edit_cannot_write: … … 75 75 visitor: 'anon' 76 76 src: "<r:children><r:each><li><r:show attr='name'>blah</r:show> <r:edit>edit</r:edit></li>\n</r:each></r:children>" 77 res: "/<li id='list .21.24'>lake </li>.*/"77 res: "/<li id='list1_24'>lake </li>.*/" 78 78 79 79 add_each_publish: 80 80 src: "<ul do='children' id='things'><li do='each'>I <p do='[name]'>blah</p></li><li do='add' publish='true'/></ul>" 81 res: "/<ul><li.*id='things_add'.*li id='things_form'.*form.*hidden.*name='node\[v_status\]' value= \"50\"/"81 res: "/<ul><li.*id='things_add'.*li id='things_form'.*form.*hidden.*name='node\[v_status\]' value=.50./" 82 82 83 83 block_edit_form: … … 91 91 saved_each_block: 92 92 src: "<ol do='pages'><li do='each' on_if='ancestor' do='link'/><li do='add'/></ol>" 93 'saved/each/en/block/list .erb': "!/var1/"93 'saved/each/en/block/list1.erb': "!/var1/" 94 94 95 95 no_recursion_in_saved_block: … … 103 103 default_focus_field: 104 104 src: "<ol do='comments'><li do='each'/><li do='form'><input name='author_name'/> ... <input name='text'/></li><li do='add'/></ol>" 105 res: "/\$\(\"list _form_t\"\).focusFirstElement\(\)/"105 res: "/\$\(\"list1_form_t\"\).focusFirstElement\(\)/" 106 106 107 107 live_filter: … … 110 110 src: "<r:filter live='true'/><r:block><ol do='pages where name like \"[param:f]%\"'><li do='each' do='[name]'/></ol></r:block>" 111 111 tem: "/connection.quote\(params\[:f\]/" 112 'live/filter/en/list .erb': "/<div id='<%= params\[:dom_id\]%>.*Node.connection.quote\(params\[:f\]/"113 res: "/<input type='text' name='f'.*<div id='list _21_21'><ol><li>status</li><li>track</li></ol></div>/"112 'live/filter/en/list2.erb': "/<div id='<%= dom_id\(@node\) %>.*Node.connection.quote\(params\[:f\]/" 113 res: "/<input type='text' name='f'.*<div id='list2'><ol><li>status</li><li>track</li></ol></div>/" 114 114 115 115 live_filter_select_options: … … 117 117 node: cleanWater 118 118 src: "<r:filter live='true' do='select' name='f' values='1,2'/><r:block><ol do='pages where name like \"[param:f]%\"'><li do='each' do='[name]'/></ol></r:block>" 119 tem: "/select ('node', \"f\", [\"1\", \"2\"], :selected => params[:f].to_s)/"120 'live/filter/en/list .erb': "/<div id='<%= params\[:dom_id\]%>.*Node.connection.quote\(params\[:f\]/"121 res: "/< input type='text' name='f'.*<div id='list_21_21'><ol><li>status</li><li>track</li></ol></div>/"119 tem: "/select name=.f.><%= options_for_select\(\[.1., .2.\], params\[:f\].to_s/" 120 'live/filter/en/list2.erb': "/<div id='<%= dom_id\(@node\) %>.*Node.connection.quote\(params\[:f\]/" 121 res: "/<select name='f'.*<div id='list2'><ol><li>status</li><li>track</li></ol></div>/" 122 122 123 123 draggable_do_syntax: 124 124 src: "<r:images in='site' do='each' draggable='true' do='img' mode='pv'/>" 125 res: "/div id='list_30'><img src='/en/image30_pv.jpg'.*list_30.*.each\(Zena.draggable/" 126 125 res: "/div id='list1_30'><img src='/en/image30_pv.jpg'.*list1_30.*.each\(Zena.draggable/" 127 126 128 127 unlink: 129 128 context: 130 129 node: 'art' 131 src: "<r:tagged do='each' join=','do='unlink'/>"132 res: "/< a class=.unlink..*onclick=.*Ajax.Request\('/nodes/21/links/_ID(cleanWater_in_art)\?dom_id=list_33.*bullet_delete.png.*links/_ID(opening_in_art)/"130 src: "<r:tagged do='each' do='unlink'/>" 131 res: "/<div id='list1_21'><a .*onclick=.*Ajax.Request.*_ID(cleanWater_in_art)\?dom_id=list1_21.*class=.unlink.*bullet_delete.png.*<\/div><div id='list1_27'/" 133 132 134 133 edit_link: … … 137 136 src: "<r:tagged><r:each><r:show attr='name'/>: <r:show attr='l_status'/> <r:edit/></r:each></r:tagged>" 138 137 res: "/link_id/" 139 'edit/link/en/list _form.erb': "/<input type='hidden' name='link_id' value=\"<%= @node.link_id %>\"/>/"140 'edit/link/en/list .erb': "/\#\{@node.link_id\}/"138 'edit/link/en/list1_form.erb': "/<input type='hidden' name='link_id' value=.<%= @node.link_id %>./>/" 139 'edit/link/en/list1.erb': "/\#\{@node.link_id\}/" trunk/test/helpers/zena_parser/apphelper.yml
r1081 r1084 67 67 68 68 cal_class: 69 tem: "[<%= cal_class(Date.civil(2008,06,26), Date.civil(2008,06,26)) %>] [<%= cal_class(Date.civil(2008,06,28), Date.civil(2008,06,26)) %>] [<%= cal_class(Date.civil(2008,06,29), Date.civil(2008,06,26)) %>] [<%= cal_class(Date.civil(2008,06,28), Date.civil(2008,06,28)) %>] [<%= cal_class(Date.civil(2008,06,30), Date.civil(2008,06,28)) %>] [<%= cal_class(Date.civil(2008,07,1), Date.civil(2008,06,28)) %>] [<%= cal_class(Date.civil(2008,07,5), Date.civil(2008,06,28)) %>]" 70 res: "[ class='ref'] [ class='sat'] [ class='sun'] [ class='sat ref'] [] [ class='other'] [ class='satother']" 69 tem: | 70 [<%= cal_class(Date.civil(2008,06,26), Date.civil(2008,06,26)) %>] 71 [<%= cal_class(Date.civil(2008,06,28), Date.civil(2008,06,26)) %>] 72 [<%= cal_class(Date.civil(2008,06,29), Date.civil(2008,06,26)) %>] 73 [<%= cal_class(Date.civil(2008,06,28), Date.civil(2008,06,28)) %>] 74 [<%= cal_class(Date.civil(2008,05,02), Date.civil(2008,05,28)) %>] 75 [<%= cal_class(Date.civil(2008,05,30), Date.civil(2008,06,28)) %>] 76 [<%= cal_class(Date.civil(2008,05,31), Date.civil(2008,06,28)) %>] 77 res: | 78 [ class='ref'] 79 [ class='sat'] 80 [ class='sun'] 81 [ class='sat ref'] 82 [] 83 [ class='other'] 84 [ class='satother'] 85 trunk/test/helpers/zena_parser/basic.yml
r1083 r1084 33 33 cache_part: 34 34 src: "<r:cache><r:show attr='name'/></r:cache>" 35 tem: "<% cache1 = Cache.with(visitor.id, visitor.group_ids, \"NP\", \"en\", \"/cache/part/list \") do capture do %><%= @node.name %><% end; end %><%= cache1 %>"35 tem: "<% cache1 = Cache.with(visitor.id, visitor.group_ids, \"NP\", \"en\", \"/cache/part/list1\") do capture do %><%= @node.name %><% end; end %><%= cache1 %>" 36 36 37 37 show_title: … … 238 238 link_date: 239 239 context: 240 date: '2008-06-27'240 ref_date: '2008-06-27' 241 241 src: "<r:link date='current_date'/>" 242 242 tem: "/:date=>main_date/" … … 367 367 368 368 calendar: 369 src: "<div do='calendar' find='notes'/>" 370 res: "/<div id='small_calendar'><table/" 369 context: 370 ref_date: "2006-03-18" 371 src: "<div do='calendar' find='notes in site'/>" 372 res: "/<td class='sat ref'><span>18</span><ul><li><a href='/oo/projects/cleanWater/post27.html'>opening</a></li></ul><\/td>/" 371 373 372 374 calendar_default_else: 373 375 context: 374 date: "2008-01-10" 375 src: "<div do='calendar'>--</div>" 376 res: "." 376 # no notes here 377 ref_date: "2008-01-30" 378 src: "<div do='calendar'>---</div>" 379 res: "/<td class='sun'>27<\/td>/" 377 380 378 381 flash_messages_both: … … 430 433 node: 'cleanWater' 431 434 src: "<ol do='pages'><li do='each' alt_class='blue' do='[name]'/><li do='add'/></ol>" 432 res: "/<li id='list .21.22'>status<\/li><li id='list.21.37' class=\"blue\">track/"435 res: "/<li id='list1_22'>status<\/li><li id='list1_37' class=\"blue\">track/" 433 436 434 437 case_when: … … 801 804 node: 'opening' 802 805 src: "<r:form><select name='klass' root_class='Note' selected='Post'/></r:form>" 803 res: "/<select id=\"node_klass\" name=\"node\[klass\]\"><option value=\"Note\">Note<\/option>\n<option value=\"Letter\">Â Â Letter<\/option>\n<option value=\"Post\" selected=\"selected\">Â Â Post<\/option><\/select>/"806 res: "/<select name=.node\[klass\].><option value=\"Note\">Note<\/option>\n<option value=\"Letter\">Â Â Letter<\/option>\n<option value=\"Post\" selected=\"selected\">Â Â Post<\/option><\/select>/" 804 807 805 808 select_nodes: … … 839 842 form_publish: 840 843 src: "<r:form publish='true'><r:select name='d_foo' values='bar,baz'/></r:form>" 841 res: "/div.*name= 'node\[v_status\]' value=\"50\"\/>.*<\/div>/"844 res: "/div.*name=.node\[v_status\]. value=.50.\/>.*<\/div>/" 842 845 843 846 checkbox: … … 849 852 input_set_value: 850 853 src: "<r:input type='hidden' name='icon_id' set_value='[main.id]'/>" 851 tem: "<input id='node_icon_id'name='node[icon_id]' type='hidden' value='<%= @node.zip %>'/>"852 res: "<input id='node_icon_id'name='node[icon_id]' type='hidden' value='22'/>"854 tem: "<input name='node[icon_id]' type='hidden' value='<%= @node.zip %>'/>" 855 res: "<input name='node[icon_id]' type='hidden' value='22'/>" 853 856 854 857 input: … … 856 859 node: 'ant' 857 860 src: "<r:input name='c_first_name'/>" 858 tem: "<input id='node_c_first_name'name='node[c_first_name]' type='text' value='<%= fquote @node.c_zafu_read(\"first_name\") %>'/>"859 res: "<input id='node_c_first_name'name='node[c_first_name]' type='text' value='Solenopsis'/>"861 tem: "<input name='node[c_first_name]' type='text' value='<%= fquote @node.c_zafu_read(\"first_name\") %>'/>" 862 res: "<input name='node[c_first_name]' type='text' value='Solenopsis'/>" 860 863 861 864 input_new: … … 870 873 <tr do='add'><td><b><r:add_btn/></b></td></tr> 871 874 </table>" 872 res: "/<tr class='btn_add' id='list _22_add'><td><b><a href='#' onclick/"875 res: "/<tr class='btn_add' id='list1_add'><td><b><a href='#' onclick/" 873 876 874 877 read_no_content: trunk/test/helpers/zena_parser/complex.yml
r1078 r1084 7 7 ref_date: 2005-03-01 8 8 src: "<r:emp_form_dates where='custom_a is not null' do='each' join=', '><r:show attr='name'/> (<r:show date='event_at' format='%Y-%m-%d'/>, <r:show date='log_at' format='%Y-%m-%d'/>)</r:emp_form_dates>" 9 res: "engine (, ), transmit_information (2002-05-05, 2003-05-05), dangerous_transportations (2004-03-15, 2006-03-15)"9 res: "engine (, ), radio_usage (, ), secure_a_site (, ), winch_usage (, ), transmit_information (2002-05-05, 2003-05-05), fiber_junction (2003-03-03, 2005-03-03), dangerous_transportations (2004-03-15, 2006-03-15), formulate_problems (2006-03-20, 2008-03-20)" 10 10 11 11 courses_in_the_next_6_months: … … 13 13 # event_at = last_date 14 14 # custom_a = repetition interval 15 src: "<r:emp_form_dates where=' custom_a is not null and (event_at is null or log_atlt REF_DATE + 6 month)' do='each' join=', '><r:show attr='name'/>: <r:show date='log_at' format='%Y-%m-%d'/></r:emp_form_dates>"16 res: "engine: , transmit_information: 2003-05-05"15 src: "<r:emp_form_dates where='last_date is null or (custom_a is not null and next_date lt REF_DATE + 6 month)' do='each' join=', '><r:show attr='name'/>: <r:show date='log_at' format='%Y-%m-%d'/></r:emp_form_dates>" 16 res: "engine: , radio_usage: , secure_a_site: , winch_usage: , transmit_information: 2003-05-05, fiber_junction: 2005-03-03" 17 17 18 18 courses_in_the_next_6_months_do_syntax: 19 src: "<div do='emp_form_dates where custom_a is not null and (event_at is null or log_atlt REF_DATE + 6 month)' do='each' join=', '><r:show attr='name'/>: <r:show date='log_at' format='%Y-%m-%d'/></div>"20 res: "<div>engine: , transmit_information: 2003-05-05</div>"19 src: "<div do='emp_form_dates where last_date is null or (custom_a is not null and next_date lt REF_DATE + 6 month)' do='each' join=', '><r:show attr='name'/>: <r:show date='log_at' format='%Y-%m-%d'/></div>" 20 res: "<div>engine: , radio_usage: , secure_a_site: , winch_usage: , transmit_information: 2003-05-05, fiber_junction: 2005-03-03</div>" 21 21 22 22 all_formations: 23 23 src: "<r:formations in='site' do='each' join=', '><r:show attr='name'/>: <r:show date='event_at'/></r:formations>" 24 res: "f orm2005: 2005-03-20, form2006: 2006-03-20, transm2001: 2001-06-15, transm2002: 2002-05-05, transm2003: 2003-03-20, transp2004: 2004-03-15, transp2006: 2006-04-21"24 res: "fiber2002: 2002-02-02, fiber2003: 2003-03-03, form2005: 2005-03-20, form2006: 2006-03-20, transm2001: 2001-06-15, transm2002: 2002-05-05, transm2003: 2003-03-20, transp2004: 2004-03-15, transp2006: 2006-04-21, vision2003: 2003-04-05" 25 25 26 26 all_formations_with_people: 27 27 src: "<r:formations in='site' do='each' join=', '><r:show attr='name'/>: <r:show date='event_at'/> (<r:formation_for find='all' do='each' join=', ' do='[name]'/>)</r:formations>" 28 res: "fiber200 3: 2003-03-03 (joe, mike, roger), form2005: 2005-03-20 (roger), form2006: 2006-03-20 (roger), transm2001: 2001-06-15 (roger), transm2002: 2002-05-05 (roger), transm2003: 2003-03-20 (joe), transp2004: 2004-03-15 (roger), transp2006: 2006-04-21 (roger), vision2003: 2003-04-05 (mike)"28 res: "fiber2002: 2002-02-02 (mike), fiber2003: 2003-03-03 (joe, roger), form2005: 2005-03-20 (roger), form2006: 2006-03-20 (roger), transm2001: 2001-06-15 (roger), transm2002: 2002-05-05 (roger), transm2003: 2003-03-20 (joe), transp2004: 2004-03-15 (roger), transp2006: 2006-04-21 (roger), vision2003: 2003-04-05 (mike)" 29 29 30 30 all_people_related_to_a_course: … … 32 32 node: transmit_information 33 33 src: "<r:course_emp_dates do='each' join=', '><r:show attr='name'/> (last:<r:show date='event_at'/>, next:<r:show date='log_at'/>)</r:course_emp_dates>" 34 res: "joe (last: , next:), mike (last:, next:), roger (last:2002-05-05, next:2003-05-05)"34 res: "joe (last:2003-03-20, next:2004-03-20), mike (last:, next:), roger (last:2002-05-05, next:2003-05-05)" 35 35 36 36 all_course_emp_date: 37 context: 38 ref_date: 2004-06-01 39 # next: 40 # dangerous_t
