Blame Artworks/Webenv/Trac/0.10.4/Modern/templates/macros.cs

Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
 <select size="1" id="<?cs var:name ?>" name="<?cs var:name ?>">
Alain Reguera Delgado 46de3c
  if:optional ?><option></option>
Alain Reguera Delgado 46de3c
  each:option = options ?>
Alain Reguera Delgado 46de3c
   <option<?cs if:option == selected ?> selected="selected">
Alain Reguera Delgado 46de3c
     var:option ?></option>
Alain Reguera Delgado 46de3c
  /each ?>
Alain Reguera Delgado 46de3c
 </select>
Alain Reguera Delgado 46de3c
/def?>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
def:labelled_hdf_select(label, options, name, selected, optional) ?>
Alain Reguera Delgado 46de3c
 if:len(options) > #0 ?>
Alain Reguera Delgado 46de3c
  <label for="<?cs var:name ?>"></label>
Alain Reguera Delgado 46de3c
   call:hdf_select(options, name, selected, optional) ?>
Alain Reguera Delgado 46de3c
  </label>
Alain Reguera Delgado 46de3c
  
Alain Reguera Delgado 46de3c
 /if ?>
Alain Reguera Delgado 46de3c
/def ?>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
def:browser_path_links(path, file) ?>
Alain Reguera Delgado 46de3c
 set:first = #1 ?>
Alain Reguera Delgado 46de3c
  each:part = path ?>
Alain Reguera Delgado 46de3c
   set:last = name(part) == len(path) - #1 ?>
Alain Reguera Delgado 46de3c
   if:first ?> class="first" title="Go to root directory"
Alain Reguera Delgado 46de3c
    set:first = #0 ?>
Alain Reguera Delgado 46de3c
   else ?> title="View "
Alain Reguera Delgado 46de3c
   /if ?> href="">
Alain Reguera Delgado 46de3c
   if:!last ?>/
Alain Reguera Delgado 46de3c
 /each ?>
Alain Reguera Delgado 46de3c
/def ?>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
def:diff_line_class(block, line) ?>
Alain Reguera Delgado 46de3c
 set:first = name(line) == 0 ?>
Alain Reguera Delgado 46de3c
 set:last = name(line) + 1 == len(block.lines) ?>
Alain Reguera Delgado 46de3c
 if:first || last ?> class="
Alain Reguera Delgado 46de3c
  if:first ?>first
Alain Reguera Delgado 46de3c
  if:first && last ?> 
Alain Reguera Delgado 46de3c
  if:last ?>last"
Alain Reguera Delgado 46de3c
 /if ?>
Alain Reguera Delgado 46de3c
/def ?>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
def:diff_display(diff, style) ?>
Alain Reguera Delgado 46de3c
 if:style == 'sidebyside' ?>
Alain Reguera Delgado 46de3c
  each:block = diff ?>
Alain Reguera Delgado 46de3c
   if:block.type == 'unmod' ?>
Alain Reguera Delgado 46de3c
    each:line = block.base.lines ?>
Alain Reguera Delgado 46de3c
     var:#block.base.offset + name(line) + 1 ?>
Alain Reguera Delgado 46de3c
     var:line ?> 
Alain Reguera Delgado 46de3c
     var:#block.changed.offset + name(line) + 1 ?>
Alain Reguera Delgado 46de3c
     var:block.changed.lines[name(line)] ?> 
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
   elif:block.type == 'mod' ?>
Alain Reguera Delgado 46de3c
    if:len(block.base.lines) >= len(block.changed.lines) ?>
Alain Reguera Delgado 46de3c
     each:line = block.base.lines ?>
Alain Reguera Delgado 46de3c
      var:#block.base.offset + name(line) + 1 ?>
Alain Reguera Delgado 46de3c
      var:line ?> 
Alain Reguera Delgado 46de3c
      if:len(block.changed.lines) >= name(line) + 1 ?>
Alain Reguera Delgado 46de3c
       each:changedline = block.changed.lines ?>
Alain Reguera Delgado 46de3c
        if:name(changedline) == name(line) ?>
Alain Reguera Delgado 46de3c
         var:#block.changed.offset + name(changedline) + 1 ?>
Alain Reguera Delgado 46de3c
         var:changedline ?> 
Alain Reguera Delgado 46de3c
        /if ?>
Alain Reguera Delgado 46de3c
       /each ?>
Alain Reguera Delgado 46de3c
      else ?>  
Alain Reguera Delgado 46de3c
      /if ?>
Alain Reguera Delgado 46de3c
     /each ?>
Alain Reguera Delgado 46de3c
    else ?>
Alain Reguera Delgado 46de3c
     each:line = block.changed.lines ?>
Alain Reguera Delgado 46de3c
      if:len(block.base.lines) >= name(line) + 1 ?>
Alain Reguera Delgado 46de3c
       each:baseline = block.base.lines ?>
Alain Reguera Delgado 46de3c
        if:name(baseline) == name(line) ?>
Alain Reguera Delgado 46de3c
         var:#block.base.offset + name(baseline) + 1 ?>
Alain Reguera Delgado 46de3c
         var:baseline ?> 
Alain Reguera Delgado 46de3c
        /if ?>
Alain Reguera Delgado 46de3c
       /each ?>
Alain Reguera Delgado 46de3c
      else ?>  
Alain Reguera Delgado 46de3c
      /if ?>
Alain Reguera Delgado 46de3c
      
Alain Reguera Delgado 46de3c
       
Alain Reguera Delgado 46de3c
     /each ?>
Alain Reguera Delgado 46de3c
    /if ?>
Alain Reguera Delgado 46de3c
   elif:block.type == 'add' ?>
Alain Reguera Delgado 46de3c
    each:line = block.changed.lines ?>  
Alain Reguera Delgado 46de3c
     var:#block.changed.offset + name(line) + 1 ?><ins>
Alain Reguera Delgado 46de3c
     var:line ?></ins> 
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
   elif:block.type == 'rem' ?>
Alain Reguera Delgado 46de3c
    each:line = block.base.lines ?>
Alain Reguera Delgado 46de3c
     var:#block.base.offset + name(line) + 1 ?>
Alain Reguera Delgado 46de3c
     var:line ?>   
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
   /if ?>
Alain Reguera Delgado 46de3c
  /each ?>
Alain Reguera Delgado 46de3c
 else ?>
Alain Reguera Delgado 46de3c
  each:block = diff ?>
Alain Reguera Delgado 46de3c
   if:block.type == 'unmod' ?>
Alain Reguera Delgado 46de3c
    each:line = block.base.lines ?>
Alain Reguera Delgado 46de3c
     var:#block.base.offset + name(line) + #1 ?>
Alain Reguera Delgado 46de3c
     var:#block.changed.offset + name(line) + #1 ?>
Alain Reguera Delgado 46de3c
     var:line ?> 
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
   elif:block.type == 'mod' ?>
Alain Reguera Delgado 46de3c
    each:line = block.base.lines ?>
Alain Reguera Delgado 46de3c
     if:name(line) == 0 ?> class="first">
Alain Reguera Delgado 46de3c
     var:#block.base.offset + name(line) + #1 ?> 
Alain Reguera Delgado 46de3c
     var:line ?> 
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
    each:line = block.changed.lines ?>
Alain Reguera Delgado 46de3c
     if:name(line) + 1 == len(block.changed.lines) ?> class="last"> 
Alain Reguera Delgado 46de3c
     var:#block.changed.offset + name(line) + #1 ?>
Alain Reguera Delgado 46de3c
     var:line ?> 
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
   elif:block.type == 'add' ?>
Alain Reguera Delgado 46de3c
    each:line = block.changed.lines ?>
Alain Reguera Delgado 46de3c
     call:diff_line_class(block.changed, line) ?>> 
Alain Reguera Delgado 46de3c
     var:#block.changed.offset + name(line) + #1 ?><ins>
Alain Reguera Delgado 46de3c
     var:line ?></ins> 
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
   elif:block.type == 'rem' ?>
Alain Reguera Delgado 46de3c
    each:line = block.base.lines ?>
Alain Reguera Delgado 46de3c
     call:diff_line_class(block.base, line) ?>>
Alain Reguera Delgado 46de3c
     var:#block.base.offset + name(line) + 1 ?> 
Alain Reguera Delgado 46de3c
     var:line ?> 
Alain Reguera Delgado 46de3c
    /each ?>
Alain Reguera Delgado 46de3c
   /if ?>
Alain Reguera Delgado 46de3c
  /each ?>
Alain Reguera Delgado 46de3c
 /if ?>
Alain Reguera Delgado 46de3c
/def ?>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
def:ticket_custom_props(ticket) ?>
Alain Reguera Delgado 46de3c
 each c=ticket.custom ?>
Alain Reguera Delgado 46de3c
  
Alain Reguera Delgado 46de3c
   if c.type == 'text' ?>
Alain Reguera Delgado 46de3c
    <label>
Alain Reguera Delgado 46de3c
     :
Alain Reguera Delgado 46de3c
     <input type="text" name="custom_<?cs var c.name ?>" value="<?cs var c.value ?>" />
Alain Reguera Delgado 46de3c
    </label>
Alain Reguera Delgado 46de3c
   elif c.type == 'textarea' ?>
Alain Reguera Delgado 46de3c
    <label>
Alain Reguera Delgado 46de3c
     :
Alain Reguera Delgado 46de3c
     
Alain Reguera Delgado 46de3c
       alt c.height ?>12" name="custom_">
Alain Reguera Delgado 46de3c
       var c.value ?></textarea>
Alain Reguera Delgado 46de3c
    </label>
Alain Reguera Delgado 46de3c
   elif c.type == 'checkbox' ?>
Alain Reguera Delgado 46de3c
    <input type="hidden" name="checkbox_<?cs var c.name ?>" />
Alain Reguera Delgado 46de3c
    <label>
Alain Reguera Delgado 46de3c
     
Alain Reguera Delgado 46de3c
       if c.selected ?> checked="checked" />
Alain Reguera Delgado 46de3c
     
Alain Reguera Delgado 46de3c
    </label>
Alain Reguera Delgado 46de3c
   elif c.type == 'select' ?>
Alain Reguera Delgado 46de3c
    <label>
Alain Reguera Delgado 46de3c
     :
Alain Reguera Delgado 46de3c
     <select name="custom_<?cs var c.name ?>">
Alain Reguera Delgado 46de3c
      <option<?cs if v.selected ?> selected="selected">
Alain Reguera Delgado 46de3c
        var v ?></option>
Alain Reguera Delgado 46de3c
     </select>
Alain Reguera Delgado 46de3c
    </label>
Alain Reguera Delgado 46de3c
   elif c.type == 'radio' ?>
Alain Reguera Delgado 46de3c
    <fieldset class="radio">
Alain Reguera Delgado 46de3c
     <legend>:</legend>
Alain Reguera Delgado 46de3c
     each v = c.option ?>
Alain Reguera Delgado 46de3c
      <label>
Alain Reguera Delgado 46de3c
         var v ?>" checked="checked" /> 
Alain Reguera Delgado 46de3c
         var v ?></label>
Alain Reguera Delgado 46de3c
     /each ?>
Alain Reguera Delgado 46de3c
    </fieldset>
Alain Reguera Delgado 46de3c
   /if ?>
Alain Reguera Delgado 46de3c
  
Alain Reguera Delgado 46de3c
 /each ?>
Alain Reguera Delgado 46de3c
/def ?>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
def:list_of_attachments(attachments, attach_href) ?>
Alain Reguera Delgado 46de3c

Attachments

Alain Reguera Delgado 46de3c
 if:len(attachments) ?>
Alain Reguera Delgado 46de3c
  
Alain Reguera Delgado 46de3c
   
Alain Reguera Delgado 46de3c
   var:attachment.filename ?> () - added by 
Alain Reguera Delgado 46de3c
   var:attachment.author ?> on 
Alain Reguera Delgado 46de3c
   var:attachment.time ?>.
Alain Reguera Delgado 46de3c
   if:attachment.description ?>
Alain Reguera Delgado 46de3c
    
Alain Reguera Delgado 46de3c
   /if ?>
Alain Reguera Delgado 46de3c
  /each ?>
Alain Reguera Delgado 46de3c
 /if ?>
Alain Reguera Delgado 46de3c
 if:attach_href ?>
Alain Reguera Delgado 46de3c
  <form method="get" action="<?cs var:attach_href ?>">
Alain Reguera Delgado 46de3c
   <input type="hidden" name="action" value="new" />
Alain Reguera Delgado 46de3c
   <input type="submit" value="Attach File" />
Alain Reguera Delgado 46de3c
  </form>
Alain Reguera Delgado 46de3c
 /if ?>
Alain Reguera Delgado 46de3c
/def ?>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
def:plural(base, count) ?>
Alain Reguera Delgado 46de3c
 var:base ?>s
Alain Reguera Delgado 46de3c
/def ?>