Changeset 497

Show
Ignore:
Timestamp:
2007-05-08 13:21:43 (2 years ago)
Author:
gaspard
Message:

[design] fixed a lot of issues related to the display of the default skin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/application.rb

    r491 r497  
    247247        flash[:notice] = trans "Please log in" 
    248248        session[:after_login_url] = request.parameters 
    249         redirect_to :controller =>'login', :action=>'login' and return false 
     249        redirect_to login_path and return false 
    250250      end 
    251251    end 
  • trunk/app/helpers/application_helper.rb

    r496 r497  
    2121        def date_box(obj, var, opts = {}) 
    2222          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}"
    2424          opts = defaults.merge(opts) 
    2525          date = eval("@#{obj} ? @#{obj}.#{var} : nil") || Time.now.utc 
     
    508508        week.step(week+6,1) do |day| 
    509509          # 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>" 
    511511        end 
    512512        content << '</tr>' 
     
    549549    end 
    550550    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])  
    552552    end 
    553553    title = opts[:text] || obj.version.title 
     
    995995    when :tiny 
    996996      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 } 
    998998    when :large 
    999999      day_names = Date::DAYNAMES 
     
    10021002          res = ["#{date.day}"] 
    10031003          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),  
    10051005                                  :update=>'largecal_preview', 
    10061006                                  :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>" 
    10081008          end 
    10091009          res.join("\n") 
  • trunk/config/routes.rb

    r487 r497  
    44  map.not_found '404.html',  :controller => 'nodes',    :action => 'not_found' 
    55  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  } 
    77  map.logout      'logout',  :controller => 'session',  :action => 'destroy' 
    88   
  • trunk/db/init/base/skins/default/Node.html

    r487 r497  
    11<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> 
    415  </z:with> 
    516  <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> 
    2129      </div> 
    2230    </div> 
  • trunk/db/init/base/skins/default/Project.html

    r480 r497  
    11<z:include template='layout.html'> 
    2   <z:with part='body/context'> 
     2  <z:with part='body/container/context'> 
    33    <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> 
    411  </z:with> 
    512  <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     
    634    <div id='largecal' style='display:none;'></div> 
    735    <z:include template='notes.html'/> 
  • trunk/db/init/base/skins/default/default.css

    r492 r497  
    7979ul ul, ul ol, ol ol, ol ul { margin-bottom:0; } 
    8080 
    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; } 
    8295 
    8396/* navigation */ 
     
    109122/* context, content, related */ 
    110123#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; } 
    112127#related { border-left:1px solid grey; font-size:0.9em; } 
    113128#related .group { font-size:1em; font-weight:normal;} 
     
    123138 
    124139.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; } 
    128142.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; } 
    131146 
    132147/* tree */ 
     
    145160.tinycal td { text-align:center; color:#333; } 
    146161.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; } 
    149164.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; } 
    151166.tinycal .body #tiny_today p { background:#CFD6DA; } 
    152167.tinycal .body td.other, .tinycal .body td.other a { color:#ccc; } 
  • trunk/db/init/base/skins/default/layout.html

    r489 r497  
    5656            <ol> 
    5757              <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> 
    5959            </ol> 
    6060          </z:documents> 
     
    6363              <li do='each' do='link'/> 
    6464              <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> 
    7174              </z:form> 
    7275            </ol> 
  • trunk/db/init/base/skins/default/notes.html

    r496 r497  
    33    <z:add after='self' tag='li'/> 
    44    <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> 
    1112    <li class='note' do='each'> 
    1213      <div class='header'> 
  • trunk/lib/image_builder.rb

    r332 r497  
    249249  'pv'   => { :size=>:force, :width=>70,  :ratio=>1.0                 }, 
    250250  '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                }, 
    255256  'std'  => { :size=>:limit, :width=>600, :ratio=>2/3.0               }, 
    256   'full' => { :size=>:keep }, 
     257  'full' => { :size=>:keep                                            }, 
    257258  'sepia'=> { :size=>:limit, :width=>280, :ratio=>2/3.0, :post=>Proc.new {|img| img.sepiatone(Magick::MaxRGB * 0.8) }}, 
    258259} 
  • trunk/lib/parser/lib/parser.rb

    r482 r497  
    8181    @stack   = [] 
    8282    @ok      = true 
    83     if opts[:sub] 
    84       @text = text 
    85     else 
    86       @text = before_parse(text) 
    87     end 
    8883    @blocks  = [] 
    8984     
     
    9590    @options.delete(:method) 
    9691    @options.delete(:mode) 
     92     
     93    if opts[:sub] 
     94      @text = text 
     95    else 
     96      @text = before_parse(text) 
     97    end 
     98     
    9799    start(mode) 
     100     
    98101    unless opts[:sub] 
    99102      @text = after_parse(@text) 
     
    401404    @pass  = {} # current object sees some information from it's direct descendants 
    402405    @parts = {} 
     406     
    403407    new_context = @context.merge(acontext) 
    404408    blocks.each do |b| 
  • trunk/lib/parser/lib/rules/zafu.rb

    r483 r497  
    119119       
    120120      # end_tag 
    121       @end_tag = @html_tag || @options[:end_do] || "z:#{@method}" 
     121      @end_tag = @html_tag || @options.delete(:end_do) || "z:#{@method}" 
    122122      @end_tag_count  = 1 
    123123       
     
    141141          include_template 
    142142        end 
    143       else   
     143      else 
    144144        @params = parse_params(@params) 
     145         
    145146        if @method == 'include' 
    146147          include_template 
     
    206207          if $1 != @end_tag 
    207208            # error bad closing ztag 
     209            debugger 
    208210            store "<span class='parser_error'>#{$&.gsub('<', '&lt;').gsub('>','&gt;')}</span>" 
    209211          end 
     
    236238      # puts "TAG(#{@method}): [#{@text}]" 
    237239      if @text =~ /\A<z:([\w_]+)([^>]*?)(\/?)>/ 
    238         # puts "ZTAG:[#{$&}]}" # ztag 
     240        # puts "ZTAG:#{$~.to_a.inspect}}" # ztag 
    239241        eat $& 
    240242        opts.merge!(:method=>$1, :params=>$2) 
  • trunk/lib/parser/lib/rules/zena.rb

    r496 r497  
    3535      @html_tag_params_bak = @html_tag_params 
    3636      @html_tag_params     = @html_tag_params.merge(@context[:html_tag_params] || {}) 
    37       if @params[:store
    38         @context["stored_#{@params[:store]}".to_sym] = node 
    39         @params.delete(:store) 
    40       end 
    41       if @params[:anchor] && !@context[:preflight] 
    42         @anchor = r_anchor 
    43         @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 
    4444      end 
    4545      true 
     
    338338END_TXT 
    339339        end 
     340        form << "<div class='hidden'>" 
    340341        form << "<input type='hidden' name='template_url' value='#{@context[:template_url]}'/>\n" 
    341342         
     
    351352          end 
    352353        end 
     354        form << "</div>" 
    353355      else 
    354356        # no ajax 
     
    684686      end 
    685687      if @params[:href] 
     688        # FIXME: add 'stored' 
    686689        href = ", :href=>#{@params[:href].inspect}" 
    687690      else 
     
    728731      end 
    729732      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}))" 
    733740      else 
    734741        res = "img_tag(#{img}, :mode=>#{mode.inspect})" 
     
    773780      else 
    774781        rel = @method 
    775       end 
    776       if @params[:store] 
    777         @context["stored_#{@params[:store]}".to_sym] = node 
    778782      end 
    779783      if Zena::Acts::Linkable::plural_method?(@method) || @params[:from] 
     
    796800        end 
    797801        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        # ... 
    798809        if value = @params[:author] 
    799810          if value == 'stored' && stored = @context[:stored_author] 
     
    812823        if value = @params[:project] 
    813824          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] 
    814837            conditions << "section_id = '\#{#{stored}[:section_id]}'" 
    815838          elsif value == 'current' 
  • trunk/lib/parser/test/parser_test.rb

    r496 r497  
    3636  testfile :zafu, :zafu_asset, :zafu_insight, :zazen 
    3737  def test_single 
    38     do_test('zazen', 'link_with_mode_and_format') 
     38    do_test('zafu', 'ztag_same_name_as_tag') 
    3939  end 
    4040   
  • trunk/lib/parser/test/zafu.yml

    r481 r497  
    217217  res: "title: <h1>dummy</h1>" 
    218218 
     219ztag_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 
    219223include_with: 
    220224  src: "include_with: <z:include template='/name/title'><h1 do='with' part='title' do='hello'/></z:include>" 
  • trunk/lib/secure.rb

    r485 r497  
    623623        "#<#{self.class}:#{sprintf('%x',self.object_id)}\n" + 
    624624        "@attributes =\n{ " + 
    625          (@attributes.sort.map do |k,v| 
     625         ((@attributes || {}).sort.map do |k,v| 
    626626           sprintf("%15s => %s", k, v.inspect) 
    627627         end + [ 
    628             sprintf("%15s => %s", 'id', id.inspect), 
     628            sprintf("%15s => %s", 'id', self[:id].inspect), 
    629629            sprintf("%15s => %s", '@new_record', new_record?.to_s), 
    630630            sprintf("%15s => %s", '@visitor', (@visitor ? "User#{@visitor[:id]}" : 'nil')) 
  • trunk/public/stylesheets/zena.css

    r471 r497  
    2020.btn_add:hover a { visibility:visible; } 
    2121 
     22.hidden { display:none; } 
    2223 
    2324/* ========================= Zazen css ======================== */ 
  • trunk/test/fixtures/links.yml

    r370 r497  
    4040  target_id:      29 
    4141  role:           favorite 
     42   
     43lake_icon_for_cleanWater: 
     44  id:             8 
     45  source_id:      11 
     46  target_id:      14 
     47  role:           icon 
  • trunk/test/fixtures/nodes.yml

    r480 r497  
    429429  kpath:          NP 
    430430  name:           strange 
    431   project_id:     1 
    432   section_id:     1 
     431  project_id:     11 
     432  section_id:     11 
    433433  parent_id:      22 
    434434  user_id:        5 
     
    449449  kpath:          NPA 
    450450  name:           track 
    451   project_id:     1 
    452   section_id:     1 
     451  project_id:     11 
     452  section_id:     11 
    453453  parent_id:      11 
    454454  user_id:        4 
  • trunk/test/helpers/basic.yml

    r496 r497  
    171171  src: "<z:parent><h1 do='title'>parent title</h1></z:parent>" 
    172172  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>" 
    174174 
    175175show_bad_attr: 
     
    346346  context: 
    347347    node: 'bird_jpg' 
    348   src: "<z:img href='self'/>" 
     348  src: "<z:img link='self'/>" 
    349349  res: "<a href='/oo/image30.html'><img src='/oo/image30_std.jpg' width='440' height='400' alt='bird' class='std'/></a>" 
    350350 
     
    472472  src: "<z:summary or='v_text'/>" 
    473473  res: "<div id='v_text11' class='zazen'><p>This is the root of your peaceful tests.</p></div>" 
     474 
     475ztag_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  
    7474  res: "cleanWater: status + 22" 
    7575 
     76store_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   
    7680author_visitor: 
    7781  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  
    99   
    1010  def test_single 
    11     do_test('basic', 'title_link_data') 
     11    do_test('basic', 'ztag_form_and_form') 
    1212  end 
    1313