|
|
d6e8d8 |
|
|
|
d6e8d8 |
<select size="1" id="<?cs var:name ?>" name="<?cs var:name ?>">
|
|
|
d6e8d8 |
if:optional ?><option></option>
|
|
|
d6e8d8 |
each:option = options ?>
|
|
|
d6e8d8 |
<option<?cs if:option == selected ?> selected="selected">
|
|
|
d6e8d8 |
var:option ?></option>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
</select>
|
|
|
d6e8d8 |
/def?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
def:labelled_hdf_select(label, options, name, selected, optional) ?>
|
|
|
d6e8d8 |
if:len(options) > #0 ?>
|
|
|
d6e8d8 |
<label for="<?cs var:name ?>"></label>
|
|
|
d6e8d8 |
call:hdf_select(options, name, selected, optional) ?>
|
|
|
d6e8d8 |
</label>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/def ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
def:browser_path_links(path, file) ?>
|
|
|
d6e8d8 |
set:first = #1 ?>
|
|
|
d6e8d8 |
each:part = path ?>
|
|
|
d6e8d8 |
set:last = name(part) == len(path) - #1 ?>
|
|
|
d6e8d8 |
if:first ?> class="first" title="Go to root directory"
|
|
|
d6e8d8 |
set:first = #0 ?>
|
|
|
d6e8d8 |
else ?> title="View "
|
|
|
d6e8d8 |
/if ?> href="">
|
|
|
d6e8d8 |
if:!last ?>/
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
/def ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
def:diff_line_class(block, line) ?>
|
|
|
d6e8d8 |
set:first = name(line) == 0 ?>
|
|
|
d6e8d8 |
set:last = name(line) + 1 == len(block.lines) ?>
|
|
|
d6e8d8 |
if:first || last ?> class="
|
|
|
d6e8d8 |
if:first ?>first
|
|
|
d6e8d8 |
if:first && last ?>
|
|
|
d6e8d8 |
if:last ?>last"
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/def ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
def:diff_display(diff, style) ?>
|
|
|
d6e8d8 |
if:style == 'sidebyside' ?>
|
|
|
d6e8d8 |
each:block = diff ?>
|
|
|
d6e8d8 |
if:block.type == 'unmod' ?>
|
|
|
d6e8d8 |
each:line = block.base.lines ?>
|
|
|
d6e8d8 |
var:#block.base.offset + name(line) + 1 ?>
|
|
|
d6e8d8 |
var:line ?>
|
|
|
d6e8d8 |
var:#block.changed.offset + name(line) + 1 ?>
|
|
|
d6e8d8 |
var:block.changed.lines[name(line)] ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
elif:block.type == 'mod' ?>
|
|
|
d6e8d8 |
if:len(block.base.lines) >= len(block.changed.lines) ?>
|
|
|
d6e8d8 |
each:line = block.base.lines ?>
|
|
|
d6e8d8 |
var:#block.base.offset + name(line) + 1 ?>
|
|
|
d6e8d8 |
var:line ?>
|
|
|
d6e8d8 |
if:len(block.changed.lines) >= name(line) + 1 ?>
|
|
|
d6e8d8 |
each:changedline = block.changed.lines ?>
|
|
|
d6e8d8 |
if:name(changedline) == name(line) ?>
|
|
|
d6e8d8 |
var:#block.changed.offset + name(changedline) + 1 ?>
|
|
|
d6e8d8 |
var:changedline ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
else ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
else ?>
|
|
|
d6e8d8 |
each:line = block.changed.lines ?>
|
|
|
d6e8d8 |
if:len(block.base.lines) >= name(line) + 1 ?>
|
|
|
d6e8d8 |
each:baseline = block.base.lines ?>
|
|
|
d6e8d8 |
if:name(baseline) == name(line) ?>
|
|
|
d6e8d8 |
var:#block.base.offset + name(baseline) + 1 ?>
|
|
|
d6e8d8 |
var:baseline ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
else ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
elif:block.type == 'add' ?>
|
|
|
d6e8d8 |
each:line = block.changed.lines ?>
|
|
|
d6e8d8 |
var:#block.changed.offset + name(line) + 1 ?><ins>
|
|
|
d6e8d8 |
var:line ?></ins>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
elif:block.type == 'rem' ?>
|
|
|
d6e8d8 |
each:line = block.base.lines ?>
|
|
|
d6e8d8 |
var:#block.base.offset + name(line) + 1 ?>
|
|
|
d6e8d8 |
var:line ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
else ?>
|
|
|
d6e8d8 |
each:block = diff ?>
|
|
|
d6e8d8 |
if:block.type == 'unmod' ?>
|
|
|
d6e8d8 |
each:line = block.base.lines ?>
|
|
|
d6e8d8 |
var:#block.base.offset + name(line) + #1 ?>
|
|
|
d6e8d8 |
var:#block.changed.offset + name(line) + #1 ?>
|
|
|
d6e8d8 |
var:line ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
elif:block.type == 'mod' ?>
|
|
|
d6e8d8 |
each:line = block.base.lines ?>
|
|
|
d6e8d8 |
if:name(line) == 0 ?> class="first">
|
|
|
d6e8d8 |
var:#block.base.offset + name(line) + #1 ?>
|
|
|
d6e8d8 |
var:line ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
each:line = block.changed.lines ?>
|
|
|
d6e8d8 |
if:name(line) + 1 == len(block.changed.lines) ?> class="last">
|
|
|
d6e8d8 |
var:#block.changed.offset + name(line) + #1 ?>
|
|
|
d6e8d8 |
var:line ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
elif:block.type == 'add' ?>
|
|
|
d6e8d8 |
each:line = block.changed.lines ?>
|
|
|
d6e8d8 |
call:diff_line_class(block.changed, line) ?>>
|
|
|
d6e8d8 |
var:#block.changed.offset + name(line) + #1 ?><ins>
|
|
|
d6e8d8 |
var:line ?></ins>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
elif:block.type == 'rem' ?>
|
|
|
d6e8d8 |
each:line = block.base.lines ?>
|
|
|
d6e8d8 |
call:diff_line_class(block.base, line) ?>>
|
|
|
d6e8d8 |
var:#block.base.offset + name(line) + 1 ?>
|
|
|
d6e8d8 |
var:line ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/def ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
def:ticket_custom_props(ticket) ?>
|
|
|
d6e8d8 |
each c=ticket.custom ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
if c.type == 'text' ?>
|
|
|
d6e8d8 |
<label>
|
|
|
d6e8d8 |
:
|
|
|
d6e8d8 |
<input type="text" name="custom_<?cs var c.name ?>" value="<?cs var c.value ?>" />
|
|
|
d6e8d8 |
</label>
|
|
|
d6e8d8 |
elif c.type == 'textarea' ?>
|
|
|
d6e8d8 |
<label>
|
|
|
d6e8d8 |
:
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
alt c.height ?>12" name="custom_">
|
|
|
d6e8d8 |
var c.value ?></textarea>
|
|
|
d6e8d8 |
</label>
|
|
|
d6e8d8 |
elif c.type == 'checkbox' ?>
|
|
|
d6e8d8 |
<input type="hidden" name="checkbox_<?cs var c.name ?>" />
|
|
|
d6e8d8 |
<label>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
if c.selected ?> checked="checked" />
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
</label>
|
|
|
d6e8d8 |
elif c.type == 'select' ?>
|
|
|
d6e8d8 |
<label>
|
|
|
d6e8d8 |
:
|
|
|
d6e8d8 |
<select name="custom_<?cs var c.name ?>">
|
|
|
d6e8d8 |
<option<?cs if v.selected ?> selected="selected">
|
|
|
d6e8d8 |
var v ?></option>
|
|
|
d6e8d8 |
</select>
|
|
|
d6e8d8 |
</label>
|
|
|
d6e8d8 |
elif c.type == 'radio' ?>
|
|
|
d6e8d8 |
<fieldset class="radio">
|
|
|
d6e8d8 |
<legend>:</legend>
|
|
|
d6e8d8 |
each v = c.option ?>
|
|
|
d6e8d8 |
<label>
|
|
|
d6e8d8 |
var v ?>" checked="checked" />
|
|
|
d6e8d8 |
var v ?></label>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
</fieldset>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
/def ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
def:list_of_attachments(attachments, attach_href) ?>
|
|
|
d6e8d8 |
Attachments
|
|
|
d6e8d8 |
if:len(attachments) ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
var:attachment.filename ?> () - added by
|
|
|
d6e8d8 |
var:attachment.author ?> on
|
|
|
d6e8d8 |
var:attachment.time ?>.
|
|
|
d6e8d8 |
if:attachment.description ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/each ?>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
if:attach_href ?>
|
|
|
d6e8d8 |
<form method="get" action="<?cs var:attach_href ?>">
|
|
|
d6e8d8 |
<input type="hidden" name="action" value="new" />
|
|
|
d6e8d8 |
<input type="submit" value="Attach File" />
|
|
|
d6e8d8 |
</form>
|
|
|
d6e8d8 |
/if ?>
|
|
|
d6e8d8 |
/def ?>
|
|
|
d6e8d8 |
|
|
|
d6e8d8 |
def:plural(base, count) ?>
|
|
|
d6e8d8 |
var:base ?>s
|
|
|
d6e8d8 |
/def ?>
|