Changeset 497
- Timestamp:
- 2007-05-08 13:21:43 (2 years ago)
- Files:
-
- trunk/app/controllers/application.rb (modified) (1 diff)
- trunk/app/helpers/application_helper.rb (modified) (5 diffs)
- trunk/config/routes.rb (modified) (1 diff)
- trunk/db/init/base/skins/default/Node.html (modified) (1 diff)
- trunk/db/init/base/skins/default/Project.html (modified) (1 diff)
- trunk/db/init/base/skins/default/default.css (modified) (4 diffs)
- trunk/db/init/base/skins/default/layout.html (modified) (2 diffs)
- trunk/db/init/base/skins/default/notes.html (modified) (1 diff)
- trunk/lib/image_builder.rb (modified) (1 diff)
- trunk/lib/parser/lib/parser.rb (modified) (3 diffs)
- trunk/lib/parser/lib/rules/zafu.rb (modified) (4 diffs)
- trunk/lib/parser/lib/rules/zena.rb (modified) (8 diffs)
- trunk/lib/parser/test/parser_test.rb (modified) (1 diff)
- trunk/lib/parser/test/zafu.yml (modified) (1 diff)
- trunk/lib/secure.rb (modified) (1 diff)
- trunk/public/stylesheets/zena.css (modified) (1 diff)
- trunk/test/fixtures/links.yml (modified) (1 diff)
- trunk/test/fixtures/nodes.yml (modified) (2 diffs)
- trunk/test/helpers/basic.yml (modified) (3 diffs)
- trunk/test/helpers/relations.yml (modified) (1 diff)
- trunk/test/helpers/zena_parser_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/application.rb
r491 r497 247 247 flash[:notice] = trans "Please log in" 248 248 session[:after_login_url] = request.parameters 249 redirect_to :controller =>'login', :action=>'login'and return false249 redirect_to login_path and return false 250 250 end 251 251 end trunk/app/helpers/application_helper.rb
r496 r497 21 21 def date_box(obj, var, opts = {}) 22 22 rnd_id = rand(100000000000) 23 defaults = { :id=>"datef#{rnd_id}", :button=>"dateb#{rnd_id}", :display=>"dated#{rnd_id}" , :class=>var.to_s}23 defaults = { :id=>"datef#{rnd_id}", :button=>"dateb#{rnd_id}", :display=>"dated#{rnd_id}" } 24 24 opts = defaults.merge(opts) 25 25 date = eval("@#{obj} ? @#{obj}.#{var} : nil") || Time.now.utc … … 508 508 week.step(week+6,1) do |day| 509 509 # each day 510 content << "<td#{ calendar_class(day,date)}#{day == Date.today ? " id='#{size}_today'" : "" }> <p>#{on_day.call(calendar[day.strftime("%Y-%m-%d")], day)}</p></td>"510 content << "<td#{ calendar_class(day,date)}#{day == Date.today ? " id='#{size}_today'" : "" }>#{on_day.call(calendar[day.strftime("%Y-%m-%d")], day)}</td>" 511 511 end 512 512 content << '</tr>' … … 549 549 end 550 550 unless opts.include?(:project) 551 opts[:project] = (obj [:project_id]!= @node.get_project_id && obj[:id] != @node[:id])551 opts[:project] = (obj.get_project_id != @node.get_project_id && obj[:id] != @node[:id]) 552 552 end 553 553 title = opts[:text] || obj.version.title … … 995 995 when :tiny 996 996 day_names = Date::ABBR_DAYNAMES 997 on_day = Proc.new { |events, date| events ? "< b>#{date.day}</b>" : date.day }997 on_day = Proc.new { |events, date| events ? "<em>#{date.day}</em>" : date.day } 998 998 when :large 999 999 day_names = Date::DAYNAMES … … 1002 1002 res = ["#{date.day}"] 1003 1003 events.each do |e| #largecal_preview 1004 res << "< div>" + link_to_remote(e.v_title.limit(14),1004 res << "<p>" + link_to_remote(e.v_title.limit(14), 1005 1005 :update=>'largecal_preview', 1006 1006 :url=>{:controller=>'note', :action=>'day_list', :id=>source[:id], :find=>method, 1007 :date=>date, :selected=>e[:zip] }) + "</ div>"1007 :date=>date, :selected=>e[:zip] }) + "</p>" 1008 1008 end 1009 1009 res.join("\n") trunk/config/routes.rb
r487 r497 4 4 map.not_found '404.html', :controller => 'nodes', :action => 'not_found' 5 5 map.user_home 'home', :controller => 'users', :action => 'home' 6 map. connect'login', :controller => 'session', :action => 'new', :requirements => { :method => :get }6 map.login 'login', :controller => 'session', :action => 'new', :requirements => { :method => :get } 7 7 map.logout 'logout', :controller => 'session', :action => 'destroy' 8 8 trunk/db/init/base/skins/default/Node.html
r487 r497 1 1 <z:include template='layout.html'> 2 <z:with part='body/context'> 3 context 2 <z:with part='body/container/context'> 3 <z:project> 4 <h2 do='show' attr='name'>zena</h2> 5 <z:icon store='project'> 6 <z:img mode='side' link='stored_project'/> 7 <z:else> 8 <div class='header'> 9 <p class='sign' do='version' do='author' do='show' attr='initials'>GB</p> 10 </div> 11 <z:summary or='v_text'/> 12 </z:else> 13 </z:icon> 14 </z:project> 4 15 </z:with> 5 16 <z:with part='body/container/content/main'> 6 <div class='node_title'> 7 <div class='header'> 8 <h1 do='title' class='s30' status='true' actions='all'>this is the title</h1> 9 <div class='subtitle'> 10 <z:case> 11 <z:when test='[user_id] == [v_user_id]'> 12 <z:trans>posted by</z:trans> <b do='author' do='show' attr='fullname'>Super Man</b> 13 </z:when> 14 <z:else> 15 <z:trans>original by</z:trans> <b do='show' attr='fullname'>Platon</b> 16 <z:trans>modified by</z:trans> <b do='version' do='author' do='show' attr='fullname'>Socrate</b> 17 </z:else> 18 </z:case> 19 20 </div> 17 <div class='header'> 18 <h1 do='title' class='s30' status='true' actions='all'>this is the title</h1> 19 <div class='subtitle'> 20 <z:case> 21 <z:when test='[user_id] == [v_user_id]'> 22 <z:trans>posted by</z:trans> <b do='author' do='show' attr='fullname'>Super Man</b> 23 </z:when> 24 <z:else> 25 <z:trans>original by</z:trans> <b do='show' attr='fullname'>Platon</b> 26 <z:trans>modified by</z:trans> <b do='version' do='author' do='show' attr='fullname'>Socrate</b> 27 </z:else> 28 </z:case> 21 29 </div> 22 30 </div> trunk/db/init/base/skins/default/Project.html
r480 r497 1 1 <z:include template='layout.html'> 2 <z:with part='body/cont ext'>2 <z:with part='body/container/context'> 3 3 <div id='small_calendar' do='calendar'/> 4 <z:hot> 5 <div class='header'> 6 <h2 do='title' actions='all'>hot news</h2> 7 <p class='sign' do='version' do='author' do='show' attr='initials'>GB</p> 8 </div> 9 <z:summary or='v_text'/> 10 </z:hot> 4 11 </z:with> 5 12 <z:with part='body/container/content/main'> 13 14 <z:home> 15 <div class='header'> 16 <h1 do='title' class='s30' status='true' actions='all'>this is the title</h1> 17 <div class='subtitle'> 18 <z:case> 19 <z:when test='[user_id] == [v_user_id]'> 20 <z:trans>posted by</z:trans> <b do='author' do='show' attr='fullname'>Super Man</b> 21 </z:when> 22 <z:else> 23 <z:trans>original by</z:trans> <b do='show' attr='fullname'>Platon</b> 24 <z:trans>modified by</z:trans> <b do='version' do='author' do='show' attr='fullname'>Socrate</b> 25 </z:else> 26 </z:case> 27 </div> 28 </div> 29 30 <z:summary text=''/> 31 <z:text/> 32 </z:home> 33 6 34 <div id='largecal' style='display:none;'></div> 7 35 <z:include template='notes.html'/> trunk/db/init/base/skins/default/default.css
r492 r497 79 79 ul ul, ul ol, ol ol, ol ul { margin-bottom:0; } 80 80 81 input, textarea { border:1px inset grey; } 81 82 /* inline forms */ 83 .inline_form { margin:2px; padding:3px; background:#9FA6AC; border:1px dotted grey; font-size:80%;} 84 .inline_form input { padding:2px 4px; } 85 .inline_form p { display:inline; } 86 .inline_form .date_box { display:inline; } 87 .inline_form .btn_x { float:right; } 88 .inline_form .hidden { display:none; } 89 .inline_form select { width:8em; } 90 .inline_form .date_box input { width:12em; } 91 .node_v_title input { font-weight:bold; } 92 #notes .node_v_title input { width:20em; } 93 #related .inline_form p { display:block; margin:0.3em 0; } 94 #related .inline_form p.node_v_title { width:100%; font-size:1.2em; } 82 95 83 96 /* navigation */ … … 109 122 /* context, content, related */ 110 123 #context { } 111 #content { } 124 .header h1 { margin-bottom:0.3em; } 125 .header .subtitle { font-size:0.8em; } 126 .header { margin-bottom: 2em; padding-bottom:0.5em; } 112 127 #related { border-left:1px solid grey; font-size:0.9em; } 113 128 #related .group { font-size:1em; font-weight:normal;} … … 123 138 124 139 .note { padding:10px 3px 10px; border-left:4px solid white; border-top:1px solid #ddd;} 125 .note .header { font-size:0.8em; color:#999;} 126 .note .header p { float:left;} 127 .note .title { font:1em Helvetica, Arial, sans-serif; text-transform: uppercase; letter-spacing: 0.03em; font-weight:bold; color:#450009; width:316px; } 140 .note .header { font-size:0.8em; color:#999; margin-bottom:0.5em; } 141 .note .header p { float:left; padding-top:2px; } 128 142 .note .header a { color:inherit;} 129 .note .log_at { padding-top:2px; width:60px;} 130 .note .zazen { clear:both; } 143 .note .title { font:1em Helvetica, Arial, sans-serif; margin-top:0.3em; text-transform: uppercase; letter-spacing: 0.03em; font-weight:bold; color:#450009; width:316px; } 144 .note .log_at { width:60px;} 145 .note .zazen { clear:both; font-size:0.85em; padding-left:60px; } 131 146 132 147 /* tree */ … … 145 160 .tinycal td { text-align:center; color:#333; } 146 161 .tinycal a { color:inherit; } 147 .tinycal b{ border-bottom:2px solid orange; }148 .tinycal .head td { font-weight:bold; padding: 2px; font-size:0.9em; color:#655; }162 .tinycal em { border-bottom:2px solid orange; } 163 .tinycal .head td { font-weight:bold; padding: 2px; line-height:1.5; font-size:0.9em; color:#655; padding:2px; text-align:center; } 149 164 .tinycal .head td.button a { border:0; text-decoration:none; color:#568BB9;} 150 .tinycal .body p { line-height:1.5; margin:0; padding:2px; text-align:center; cursor:pointer; }165 .tinycal .body td { height:1.8em; } 151 166 .tinycal .body #tiny_today p { background:#CFD6DA; } 152 167 .tinycal .body td.other, .tinycal .body td.other a { color:#ccc; } trunk/db/init/base/skins/default/layout.html
r489 r497 56 56 <ol> 57 57 <li do='each'><z:link format='data'><z:img mode='tiny'/></z:link> <z:link><z:show attr='name'/>.<z:show attr='c_ext'/></z:link></li> 58 <li do='add'><a href='#' do='void' set_onclick='uploader=window.open("/documents/new?parent_id=[id]", "uploader", "location=1,width=400,height=300");return false;' ><z:trans>btn_add_doc</z:trans></a></li>58 <li do='add'><a href='#' do='void' set_onclick='uploader=window.open("/documents/new?parent_id=[id]", "uploader", "location=1,width=400,height=300");return false;' set_href='/documents/new?parent_id=[id]'><z:trans>btn_add_doc</z:trans></a></li> 59 59 </ol> 60 60 </z:documents> … … 63 63 <li do='each' do='link'/> 64 64 <z:add before='self' tag='li'/> 65 <z:form><li class='inline_form'><form> 66 <input type='hidden' name='node[parent_id]' value='' do='void' set_value='[id]'/> 67 <z:input type='select' attr='klass' options='Page,Section,Project'/> 68 <input type='text' name='node[v_title]' value='' size='25'/> 69 <input type="submit" class="btn_validate" value='validate' do='void' tset_value='validate'/> 70 </form></li> 65 <z:form> 66 <li class='inline_form'> 67 <form> 68 <p class='hidden'> <input type='hidden' name='node[parent_id]' value='' do='void' set_value='[id]'/></p> 69 <p class='node_klass'> <z:input type='select' attr='klass' options='Page,Section,Project'/></p> 70 <p class='node_v_title'><input type='text' name='node[v_title]' value=''/></p> 71 <p class='btn_validate'><input type="submit" value='validate' do='void' tset_value='validate'/></p> 72 </form> 73 </li> 71 74 </z:form> 72 75 </ol> trunk/db/init/base/skins/default/notes.html
r496 r497 3 3 <z:add after='self' tag='li'/> 4 4 <z:form><li class='inline_form'><form> 5 <input type='hidden' name='node[parent_id]' value='' do='void' set_value='[project_id]'/> 6 <z:input type='select' attr='klass' options='Post,Letter'/> 7 <z:input type='date_box' attr='log_at'/> 8 <input type='text' name='node[v_title]' do='void' set_value='[v_title]' size='25'/> 9 <input type="submit" class="btn_validate" value='validate' do='void' tset_value='validate'/> 10 </form></li></z:form> 5 <p class='hidden'> <input type='hidden' name='node[parent_id]' value='' do='void' set_value='[project_id]'/></p> 6 <p class='node_klass'> <z:input type='select' attr='klass' options='Post,Letter'/></p> 7 <p class='node_log_at'> <z:input type='date_box' attr='log_at'/></p> 8 <p class='node_v_title'><input type='text' name='node[v_title]' do='void' set_value='[v_title]' size='25'/></p> 9 <p class='validate'> <input type="submit" value='validate' do='void' tset_value='validate'/></p> 10 </form></li> 11 </z:form> 11 12 <li class='note' do='each'> 12 13 <div class='header'> trunk/lib/image_builder.rb
r332 r497 249 249 'pv' => { :size=>:force, :width=>70, :ratio=>1.0 }, 250 250 'med' => { :size=>:limit, :width=>280, :ratio=>2/3.0 }, 251 'top' => { :size=>:force, :width=>280, :ratio=>2.0/3.0, :gravity=>Magick::NorthGravity}, 252 'mid' => { :size=>:force, :width=>280, :ratio=>2.0/3.0, :gravity=>Magick::CenterGravity}, 253 'low' => { :size=>:force, :width=>280, :ratio=>2.0/3.0, :gravity=>Magick::SouthGravity}, 254 'edit' => { :size=>:limit, :width=>400, :height=>400 }, 251 'top' => { :size=>:force, :width=>280, :ratio=>2.0/3.0, :gravity=>Magick::NorthGravity }, 252 'mid' => { :size=>:force, :width=>280, :ratio=>2.0/3.0, :gravity=>Magick::CenterGravity }, 253 'low' => { :size=>:force, :width=>280, :ratio=>2.0/3.0, :gravity=>Magick::SouthGravity }, 254 'edit' => { :size=>:limit, :width=>400, :height=>400 }, 255 'side' => { :size=>:force, :width=>220, :height=>300 }, 255 256 'std' => { :size=>:limit, :width=>600, :ratio=>2/3.0 }, 256 'full' => { :size=>:keep },257 'full' => { :size=>:keep }, 257 258 'sepia'=> { :size=>:limit, :width=>280, :ratio=>2/3.0, :post=>Proc.new {|img| img.sepiatone(Magick::MaxRGB * 0.8) }}, 258 259 } trunk/lib/parser/lib/parser.rb
r482 r497 81 81 @stack = [] 82 82 @ok = true 83 if opts[:sub]84 @text = text85 else86 @text = before_parse(text)87 end88 83 @blocks = [] 89 84 … … 95 90 @options.delete(:method) 96 91 @options.delete(:mode) 92 93 if opts[:sub] 94 @text = text 95 else 96 @text = before_parse(text) 97 end 98 97 99 start(mode) 100 98 101 unless opts[:sub] 99 102 @text = after_parse(@text) … … 401 404 @pass = {} # current object sees some information from it's direct descendants 402 405 @parts = {} 406 403 407 new_context = @context.merge(acontext) 404 408 blocks.each do |b| trunk/lib/parser/lib/rules/zafu.rb
r483 r497 119 119 120 120 # end_tag 121 @end_tag = @html_tag || @options [:end_do]|| "z:#{@method}"121 @end_tag = @html_tag || @options.delete(:end_do) || "z:#{@method}" 122 122 @end_tag_count = 1 123 123 … … 141 141 include_template 142 142 end 143 else 143 else 144 144 @params = parse_params(@params) 145 145 146 if @method == 'include' 146 147 include_template … … 206 207 if $1 != @end_tag 207 208 # error bad closing ztag 209 debugger 208 210 store "<span class='parser_error'>#{$&.gsub('<', '<').gsub('>','>')}</span>" 209 211 end … … 236 238 # puts "TAG(#{@method}): [#{@text}]" 237 239 if @text =~ /\A<z:([\w_]+)([^>]*?)(\/?)>/ 238 # puts "ZTAG: [#{$&}]}" # ztag240 # puts "ZTAG:#{$~.to_a.inspect}}" # ztag 239 241 eat $& 240 242 opts.merge!(:method=>$1, :params=>$2) trunk/lib/parser/lib/rules/zena.rb
r496 r497 35 35 @html_tag_params_bak = @html_tag_params 36 36 @html_tag_params = @html_tag_params.merge(@context[:html_tag_params] || {}) 37 if @params[:store]38 @context["stored_#{@params[:store]}".to_sym] = node39 @params.delete(:store)40 end41 if @params[:anchor] && !@context[:preflight]42 @anchor = r_anchor43 @params.delete(:anchor)37 unless @context[:preflight] 38 if store = @params.delete(:store) 39 @context["stored_#{store}".to_sym] = node 40 end 41 if @params.delete(:anchor) 42 @anchor = r_anchor 43 end 44 44 end 45 45 true … … 338 338 END_TXT 339 339 end 340 form << "<div class='hidden'>" 340 341 form << "<input type='hidden' name='template_url' value='#{@context[:template_url]}'/>\n" 341 342 … … 351 352 end 352 353 end 354 form << "</div>" 353 355 else 354 356 # no ajax … … 684 686 end 685 687 if @params[:href] 688 # FIXME: add 'stored' 686 689 href = ", :href=>#{@params[:href].inspect}" 687 690 else … … 728 731 end 729 732 mode = @params[:mode] || 'std' 730 if @params[:href] 731 # FIXME: replace with full r_link options 732 res = "node_link(:node=>#{node}, :href=>#{@params[:href].inspect}, :text=>img_tag(#{img}, :mode=>#{mode.inspect}))" 733 if link = @params[:link] 734 if link =~ /^stored/ 735 link = ":node=>#{@context[link.to_sym] || node}" 736 else 737 link = ":node=>#{node}, :href=>#{link.inspect}" 738 end 739 res = "node_link(#{link}, :text=>img_tag(#{img}, :mode=>#{mode.inspect}))" 733 740 else 734 741 res = "img_tag(#{img}, :mode=>#{mode.inspect})" … … 773 780 else 774 781 rel = @method 775 end776 if @params[:store]777 @context["stored_#{@params[:store]}".to_sym] = node778 782 end 779 783 if Zena::Acts::Linkable::plural_method?(@method) || @params[:from] … … 796 800 end 797 801 conditions = [] 802 803 # FIXME: stored should be clarified and managed in a single way through links and contexts. 804 # <z:link href='stored_whatever'/> 805 # <z:pages from='stored_whatever'/> 806 # <z:pages from='project' project='stored_whatever'/> 807 # <z:img link='stored_whatever'/> 808 # ... 798 809 if value = @params[:author] 799 810 if value == 'stored' && stored = @context[:stored_author] … … 812 823 if value = @params[:project] 813 824 if value == 'stored' && stored = @context[:stored_project] 825 conditions << "project_id = '\#{#{stored}[:project_id]}'" 826 elsif value == 'current' 827 conditions << "project_id = '\#{#{node}[:project_id]}'" 828 elsif value =~ /\A\d+\Z/ 829 conditions << "project_id = '#{value.to_i}'" 830 elsif value =~ /\A[\w\/]+\Z/ 831 # not implemented yet 832 end 833 end 834 835 if value = @params[:section] 836 if value == 'stored' && stored = @context[:stored_section] 814 837 conditions << "section_id = '\#{#{stored}[:section_id]}'" 815 838 elsif value == 'current' trunk/lib/parser/test/parser_test.rb
r496 r497 36 36 testfile :zafu, :zafu_asset, :zafu_insight, :zazen 37 37 def test_single 38 do_test('za zen', 'link_with_mode_and_format')38 do_test('zafu', 'ztag_same_name_as_tag') 39 39 end 40 40 trunk/lib/parser/test/zafu.yml
r481 r497 217 217 res: "title: <h1>dummy</h1>" 218 218 219 ztag_same_name_as_tag: 220 src: "<z:test>this is a <test>test</test></z:test>" 221 res: "[test]this is a <test>test</test>[/test]" 222 219 223 include_with: 220 224 src: "include_with: <z:include template='/name/title'><h1 do='with' part='title' do='hello'/></z:include>" trunk/lib/secure.rb
r485 r497 623 623 "#<#{self.class}:#{sprintf('%x',self.object_id)}\n" + 624 624 "@attributes =\n{ " + 625 ( @attributes.sort.map do |k,v|625 ((@attributes || {}).sort.map do |k,v| 626 626 sprintf("%15s => %s", k, v.inspect) 627 627 end + [ 628 sprintf("%15s => %s", 'id', id.inspect),628 sprintf("%15s => %s", 'id', self[:id].inspect), 629 629 sprintf("%15s => %s", '@new_record', new_record?.to_s), 630 630 sprintf("%15s => %s", '@visitor', (@visitor ? "User#{@visitor[:id]}" : 'nil')) trunk/public/stylesheets/zena.css
r471 r497 20 20 .btn_add:hover a { visibility:visible; } 21 21 22 .hidden { display:none; } 22 23 23 24 /* ========================= Zazen css ======================== */ trunk/test/fixtures/links.yml
r370 r497 40 40 target_id: 29 41 41 role: favorite 42 43 lake_icon_for_cleanWater: 44 id: 8 45 source_id: 11 46 target_id: 14 47 role: icon trunk/test/fixtures/nodes.yml
r480 r497 429 429 kpath: NP 430 430 name: strange 431 project_id: 1 432 section_id: 1 431 project_id: 11 432 section_id: 11 433 433 parent_id: 22 434 434 user_id: 5 … … 449 449 kpath: NPA 450 450 name: track 451 project_id: 1 452 section_id: 1 451 project_id: 11 452 section_id: 11 453 453 parent_id: 11 454 454 user_id: 4 trunk/test/helpers/basic.yml
r496 r497 171 171 src: "<z:parent><h1 do='title'>parent title</h1></z:parent>" 172 172 tem: "<% if var1 = @node.relation(\"parent\") -%><h1><%= show_title(:node=>var1)%></h1><% end -%>" 173 res: "<h1><span id='v_title21'><a href='/oo/projects/cleanWater.html'> zena /Clean Water project</a></span></h1>"173 res: "<h1><span id='v_title21'><a href='/oo/projects/cleanWater.html'>Clean Water project</a></span></h1>" 174 174 175 175 show_bad_attr: … … 346 346 context: 347 347 node: 'bird_jpg' 348 src: "<z:img href='self'/>"348 src: "<z:img link='self'/>" 349 349 res: "<a href='/oo/image30.html'><img src='/oo/image30_std.jpg' width='440' height='400' alt='bird' class='std'/></a>" 350 350 … … 472 472 src: "<z:summary or='v_text'/>" 473 473 res: "<div id='v_text11' class='zazen'><p>This is the root of your peaceful tests.</p></div>" 474 475 ztag_form_and_form: 476 src: | 477 <z:form> 478 <li class='inline_form'> 479 <form> 480 <input type='hidden' name='node[parent_id]' value='' do='void' set_value='[id]'/> 481 <z:input type='select' attr='klass' options='Page,Section,Project'/> 482 <input type='text' name='node[v_title]' value='' size='25'/> 483 <input type="submit" class="btn_validate" value='validate' do='void' tset_value='validate'/> 484 </form> 485 </li> 486 </z:form> 487 tem: ".." trunk/test/helpers/relations.yml
r481 r497 74 74 res: "cleanWater: status + 22" 75 75 76 store_img: 77 src: "<z:parent><z:icon store='bob'><z:show attr='name'/><z:img link='stored_bob'/></z:icon></z:parent>" 78 tem: "<% if var1 = @node.relation(\"parent\") -%><% if var2 = var1.relation(\"icon\") -%><%= var2.name %><%= node_link(:node=>var1, :text=>img_tag(var2, :mode=>\"std\")) %><% end -%><% end -%>" 79 76 80 author_visitor: 77 81 src: "<z:pages from='site' author='visitor' limit='5'><z:each join=', ' do='show' attr='name'/></z:pages>" trunk/test/helpers/zena_parser_test.rb
r491 r497 9 9 10 10 def test_single 11 do_test('basic', ' title_link_data')11 do_test('basic', 'ztag_form_and_form') 12 12 end 13 13
