Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rolled back changes from [550]

git-svn-id: http://code.djangoproject.com/svn/djangoproject.com@553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 76d07667b75fd660f81e113457775ba075761b12 1 parent 457b418
jacob authored
Showing with 1,424 additions and 1,738 deletions.
  1. +18 −53 django_website/templates/trac_templates/attachment.cs
  2. +72 −96 django_website/templates/trac_templates/browser.cs
  3. +99 −130 django_website/templates/trac_templates/changeset.cs
  4. +33 −11 django_website/templates/trac_templates/footer.cs
  5. +41 −21 django_website/templates/trac_templates/header.cs
  6. +22 −104 django_website/templates/trac_templates/log.cs
  7. +0 −14 django_website/templates/trac_templates/log_changelog.cs
  8. +28 −24 django_website/templates/trac_templates/log_rss.cs
  9. +159 −131 django_website/templates/trac_templates/macros.cs
  10. +115 −160 django_website/templates/trac_templates/milestone.cs
  11. +42 −71 django_website/templates/trac_templates/newticket.cs
  12. +143 −212 django_website/templates/trac_templates/query.cs
  13. +0 −46 django_website/templates/trac_templates/query_rss.cs
  14. +44 −53 django_website/templates/trac_templates/report.cs
  15. +6 −2 django_website/templates/trac_templates/report_rss.cs
  16. +26 −57 django_website/templates/trac_templates/roadmap.cs
  17. +77 −39 django_website/templates/trac_templates/search.cs
  18. +32 −28 django_website/templates/trac_templates/settings.cs
  19. +200 −233 django_website/templates/trac_templates/ticket.cs
  20. +85 −38 django_website/templates/trac_templates/timeline.cs
  21. +63 −29 django_website/templates/trac_templates/timeline_rss.cs
  22. +119 −186 django_website/templates/trac_templates/wiki.cs
View
71 django_website/templates/trac_templates/attachment.cs
@@ -1,3 +1,4 @@
+<?cs set:html.stylesheet = 'css/code.css' ?>
<?cs include "header.cs" ?>
<?cs include "macros.cs" ?>
@@ -5,71 +6,35 @@
<div id="content" class="attachment">
-<?cs if:attachment.mode == 'new' ?>
- <h1>Add Attachment to <a href="<?cs var:attachment.parent.href?>"><?cs
- var:attachment.parent.name ?></a></h1>
- <form id="attachment" method="post" enctype="multipart/form-data" action="">
+ <h3>Add Attachment to <a href="<?cs
+ var:file.attachment_parent_href?>"><?cs var:file.attachment_parent?></a></h3>
+ <form id="attachment" method="post" enctype="multipart/form-data" action="<?cs
+ var:cgi_location ?>">
<div class="field">
- <label>File:<br /><input type="file" name="attachment" /></label>
+ <label for="file">File:</label>
+ <input type="file" id="file" name="attachment" />
</div>
<fieldset>
<legend>Attachment Info</legend>
<div class="field">
- <label>Your email or username:<br />
- <input type="text" name="author" size="30" value="<?cs
- var:attachment.author?>" /></label>
+ <label for="author">Your email or username:</label><br />
+ <input type="text" id="author" name="author" class="textwidget" size="30"
+ value="<?cs var:attachment.author?>" />
</div>
<div class="field">
- <label>Description of the file (optional):<br />
- <input type="text" name="description" size="60" /></label
- </div>
- <div class="options">
- <label><input type="checkbox" name="replace" checked="checked" />
- Replace existing attachment of the same name</label>
- </div>
- <br />
+ <label for="description">Description of the file (optional):</label><br />
+ <input type="text" id="description" name="description" class="textwidget"
+ size="60" />
+ </div><br />
</fieldset>
<div class="buttons">
- <input type="hidden" name="action" value="new" />
- <input type="hidden" name="type" value="<?cs var:attachment.parent.type ?>" />
- <input type="hidden" name="id" value="<?cs var:attachment.parent.id ?>" />
- <input type="submit" value="Add attachment" />
+ <input type="hidden" name="mode" value="attachment" />
+ <input type="hidden" name="type" value="<?cs var:attachment.type ?>" />
+ <input type="hidden" name="id" value="<?cs var:attachment.id ?>" />
+ <input type="submit" value="Add Attachment" />
<input type="submit" name="cancel" value="Cancel" />
</div>
</form>
-<?cs elif:attachment.mode == 'delete' ?>
- <h1><a href="<?cs var:attachment.parent.href ?>"><?cs
- var:attachment.parent.name ?></a>: <?cs var:attachment.filename ?></h1>
- <p><strong>Are you sure you want to delete this attachment?</strong><br />
- This is an irreversible operation.</p>
- <div class="buttons">
- <form method="post" action=""><div id="delete">
- <input type="hidden" name="action" value="delete" />
- <input type="submit" name="cancel" value="Cancel" />
- <input type="submit" value="Delete attachment" />
- </div></form>
- </div><?cs else ?>
- <h1><a href="<?cs var:attachment.parent.href ?>"><?cs
- var:attachment.parent.name ?></a>: <?cs var:attachment.filename ?></h1>
- <div id="preview"><?cs
- if:attachment.preview ?>
- <?cs var:attachment.preview ?><?cs
- elif:attachment.max_file_size_reached ?>
- <strong>HTML preview not available</strong>, since file-size exceeds
- <?cs var:attachment.max_file_size ?> bytes. You may <a href="<?cs
- var:attachment.raw_href ?>">download the file</a> instead.<?cs
- else ?>
- <strong>HTML preview not available</strong>. To view the file,
- <a href="<?cs var:attachment.raw_href ?>">download the file</a>.<?cs
- /if ?>
- </div>
- <?cs if:attachment.can_delete ?><div class="buttons">
- <form method="get" action=""><div id="delete">
- <input type="hidden" name="action" value="delete" />
- <input type="submit" value="Delete attachment" />
- </div></form>
- </div><?cs /if ?>
-<?cs /if ?>
</div>
<?cs include "footer.cs"?>
View
168 django_website/templates/trac_templates/browser.cs
@@ -1,4 +1,5 @@
-<?cs include "header.cs"?>
+<?cs set:html.stylesheet = 'css/browser.css' ?>
+<?cs include: "header.cs"?>
<?cs include "macros.cs"?>
<div id="ctxtnav" class="nav">
@@ -8,106 +9,81 @@
</div>
<div id="content" class="browser">
- <h1><?cs call:browser_path_links(browser.path, browser) ?></h1>
+ <?cs call:browser_path_links(browser.path, browser) ?>
<div id="jumprev">
- <form action="" method="get"><div>
- <label for="rev">View revision:</label>
- <input type="text" id="rev" name="rev" value="<?cs
- var:browser.revision ?>" size="4" />
- </div></form>
+ <form action="<?cs var:browser_current_href ?>" method="get">
+ <div>
+ <label for="rev">View revision:</label>
+ <input type="text" id="rev" name="rev" value="<?cs
+ var:browser.revision?>" size="4" />
+ </div>
+ </form>
</div>
- <?cs if:browser.is_dir ?>
- <table class="listing" id="dirlist">
- <thead>
- <tr><?cs
- call:sortable_th(browser.order, browser.desc, 'name', 'Name', browser.href) ?><?cs
- call:sortable_th(browser.order, browser.desc, 'size', 'Size', browser.href) ?>
- <th class="rev">Rev</th><?cs
- call:sortable_th(browser.order, browser.desc, 'date', 'Age', browser.href) ?>
- <th class="change">Last Change</th>
- </tr>
- </thead>
- <tbody>
- <?cs if:len(links.up) != "/" ?>
- <tr class="even">
- <td class="name" colspan="4">
- <a class="parent" title="Parent Directory" href="<?cs
- var:links.up.0.href ?>">../</a>
- </td>
- </tr>
- <?cs /if ?>
- <?cs each:item = browser.items ?>
- <?cs set:change = browser.changes[item.rev] ?>
- <tr class="<?cs if:name(item) % #2 ?>even<?cs else ?>odd<?cs /if ?>">
- <td class="name"><?cs
- if:item.is_dir ?><?cs
- if:item.permission ?>
- <a class="dir" title="Browse Directory" href="<?cs
- var:item.browser_href ?>"><?cs var:item.name ?></a><?cs
- else ?>
- <span class="dir" title="Access Denied" href=""><?cs
- var:item.name ?></span><?cs
- /if ?><?cs
- else ?><?cs
- if:item.permission != '' ?>
- <a class="file" title="View File" href="<?cs
- var:item.browser_href ?>"><?cs var:item.name ?></a><?cs
- else ?>
- <span class="file" title="Access Denied" href=""><?cs
- var:item.name ?></span><?cs
- /if ?><?cs
- /if ?>
- </td>
- <td class="size"><?cs var:item.size ?></td>
- <td class="rev"><?cs if:item.permission != '' ?><a title="View Revision Log" href="<?cs
- var:item.log_href ?>"><?cs var:item.rev ?></a><?cs else ?><?cs var:item.rev ?><?cs /if ?></td>
- <td class="age"><span title="<?cs var:browser.changes[item.rev].date ?>"><?cs
- var:browser.changes[item.rev].age ?></span></td>
- <td class="change">
- <span class="author"><?cs var:browser.changes[item.rev].author ?>:</span>
- <span class="change"><?cs var:browser.changes[item.rev].message ?></span>
- </td>
- </tr>
- <?cs /each ?>
- </tbody>
- </table><?cs
- /if ?><?cs
-
- if:len(browser.props) || !browser.is_dir ?>
- <table id="info" summary="Revision info"><?cs
- if:!browser.is_dir ?><tr>
- <th scope="row">
- Revision <a href="<?cs var:file.changeset_href ?>"><?cs var:file.rev ?></a>
- (checked in by <?cs var:file.author ?>, <?cs var:file.age ?> ago)
+ <table class="listing" id="dirlist">
+ <thead>
+ <tr>
+ <th class="name<?cs if:browser.order == "name" ?> <?cs
+ var:browser.order_dir ?><?cs /if ?>"><a title="Sort by name<?cs
+ if:browser.order == "name" && browser.order_dir == "asc" ?> (descending)<?cs
+ /if ?>" href="<?cs var:browser.current_href?>?order=name<?cs
+ if:browser.order == "name" && browser.order_dir == "asc" ?>&desc=1<?cs
+ /if ?>">Name</a>
+ </th>
+ <th class="rev">Rev</th>
+ <th class="age<?cs if:browser.order == "date" ?> <?cs
+ var:browser.order_dir ?><?cs /if ?>"><a title="Sort by age<?cs
+ if:browser.order == "date" && browser.order_dir == "asc" ?> (descending)<?cs
+ /if ?>" href="<?cs var:browser.current_href?>?order=date<?cs
+ if:browser.order == "date" && browser.order_dir == "asc" ?>&desc=1<?cs
+ /if ?>">Age</a>
</th>
- <td class="message"><?cs var:file.message ?></td>
- </tr><?cs /if ?><?cs
- if:len(browser.props) ?><tr>
- <td colspan="2"><ul class="props"><?cs
- each:prop = browser.props ?>
- <li>Property <strong><?cs var:name(prop) ?></strong> set to <em><code><?cs
- var:prop ?></code></em></li><?cs
- /each ?>
- </ul></td><?cs
- /if ?></tr>
- </table><?cs
- /if ?><?cs
-
- if:!browser.is_dir ?>
- <div id="preview"><?cs
- if:file.preview ?><?cs
- var:file.preview ?><?cs
- elif:file.max_file_size_reached ?>
- <strong>HTML preview not available</strong>, since file-size exceeds <?cs
- var:file.max_file_size ?> bytes. Try <a href="<?cs
- var:file.raw_href ?>">downloading</a> the file instead.<?cs
- else ?><strong>HTML preview not available</strong>. To view, <a href="<?cs
- var:file.raw_href ?>">download</a> the file.<?cs
- /if ?>
- </div><?cs
- /if ?>
+ <th class="change">Last Change</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?cs if:browser.path != "/" ?>
+ <tr class="even">
+ <td class="name" colspan="4">
+ <a class="parent" title="Parent Directory" href="<?cs
+ var:browser.parent_href ?>">../</a>
+ </td>
+ </tr>
+ <?cs /if ?>
+ <?cs each:item = browser.items ?>
+ <tr class="<?cs if:name(item) % #2 ?>even<?cs else ?>odd<?cs /if ?>">
+ <td class="name"><?cs
+ if:item.is_dir ?><?cs
+ if:item.permission ?>
+ <a class="dir" title="Browse Directory" href="<?cs
+ var:item.browser_href ?>"><?cs var:item.name ?></a><?cs
+ else ?>
+ <span class="dir" title="Access Denied" href=""><?cs
+ var:item.name ?></span><?cs
+ /if ?><?cs
+ else ?><?cs
+ if:item.permission != '' ?>
+ <a class="file" title="View File" href="<?cs
+ var:item.browser_href ?>"><?cs var:item.name ?></a><?cs
+ else ?>
+ <span class="file" title="Access Denied" href=""><?cs
+ var:item.name ?></span><?cs
+ /if ?><?cs
+ /if ?>
+ </td>
+ <td class="rev"><?cs if:item.permission != '' ?><a title="View Revision Log" href="<?cs
+ var:item.log_href ?>"><?cs var:item.created_rev ?></a><?cs else ?><?cs var:item.created_rev ?><?cs /if ?></td>
+ <td class="age"><span title="<?cs var:item.date ?>"><?cs
+ var:item.age ?></span></td>
+ <td class="change">
+ <span class="author"><?cs var:item.author ?>:</span>
+ <span class="change"><?cs var:item.change ?></span>
+ </td>
+ </tr>
+ <?cs /each ?>
+ </tbody>
+ </table>
<div id="help">
<strong>Note:</strong> See <a href="<?cs var:trac.href.wiki
View
229 django_website/templates/trac_templates/changeset.cs
@@ -1,36 +1,29 @@
+<?cs set:html.stylesheet = 'css/changeset.css' ?>
<?cs include "header.cs"?>
<?cs include "macros.cs"?>
<div id="ctxtnav" class="nav">
- <h2>Changeset Navigation</h2><?cs
- with:links = chrome.links ?>
- <ul><?cs
- if:len(links.prev) ?>
- <li class="first<?cs if:!len(links.next) ?> last<?cs /if ?>">
- <a class="prev" href="<?cs var:links.prev.0.href ?>" title="<?cs
- var:links.prev.0.title ?>">Previous Changeset</a>
- </li><?cs
- /if ?><?cs
- if:len(links.next) ?>
- <li class="<?cs if:len(links.prev) ?>first <?cs /if ?>last">
- <a class="next" href="<?cs var:links.next.0.href ?>" title="<?cs
- var:links.next.0.title ?>">Next Changeset</a>
- </li><?cs
- /if ?>
- </ul><?cs
- /with ?>
+ <h2>Changeset Navigation</h2>
+ <ul><?cs
+ if:len(links.prev) ?>
+ <li class="first<?cs if:!len(links.next) ?> last<?cs /if ?>">
+ <a class="prev" href="<?cs var:links.prev.0.href ?>" title="<?cs
+ var:links.prev.0.title ?>">Previous Changeset</a>
+ </li><?cs
+ /if ?><?cs
+ if:len(links.next) ?>
+ <li class="<?cs if:len(links.prev) ?>first <?cs /if ?>last">
+ <a class="next" href="<?cs var:links.next.0.href ?>" title="<?cs
+ var:links.next.0.title ?>">Next Changeset</a>
+ </li><?cs
+ /if ?>
+ </ul>
</div>
<div id="content" class="changeset">
<h1>Changeset <?cs var:changeset.revision ?></h1>
-<?cs each:change = changeset.changes ?><?cs
- if:len(change.diff) ?><?cs
- set:has_diffs = 1 ?><?cs
- /if ?><?cs
-/each ?><?cs if:has_diffs || diff.options.ignoreblanklines
- || diff.options.ignorecase || diff.options.ignorewhitespace ?>
-<form method="post" id="prefs" action="">
+<?cs if:len(changeset.diff.files) ?><form method="post" id="prefs" action="">
<div>
<label for="style">View differences</label>
<select id="style" name="style">
@@ -70,36 +63,6 @@
</div>
</form><?cs /if ?>
-<?cs def:node_change(item,cl,kind) ?><?cs
- set:ndiffs = len(item.diff) ?><?cs
- set:nprops = len(item.props) ?>
- <div class="<?cs var:cl ?>"></div><?cs
- if:cl == "rem" ?>
- <a title="Show what was removed (rev. <?cs var:item.rev.old ?>)" href="<?cs
- var:item.browser_href.old ?>"><?cs var:item.path.old ?></a><?cs
- else ?>
- <a title="Show entry in browser" href="<?cs
- var:item.browser_href.new ?>"><?cs var:item.path.new ?></a><?cs
- /if ?>
- <span class="comment">(<?cs var:kind ?>)</span><?cs
- if:item.path.old && item.change == 'copy' || item.change == 'move' ?>
- <small><em>(<?cs var:kind ?> from <a href="<?cs
- var:item.browser_href.old ?>" title="Show original file (rev. <?cs
- var:item.rev.old ?>)"><?cs var:item.path.old ?></a>)</em></small><?cs
- /if ?><?cs
- if:$ndiffs + $nprops > #0 ?>
- (<a href="#file<?cs var:name(item) ?>" title="Show differences"><?cs
- if:$ndiffs > #0 ?><?cs var:ndiffs ?>&nbsp;diff<?cs if:$ndiffs > #1 ?>s<?cs /if ?><?cs
- /if ?><?cs
- if:$ndiffs && $nprops ?>, <?cs /if ?><?cs
- if:$nprops > #0 ?><?cs var:nprops ?>&nbsp;prop<?cs if:$nprops > #1 ?>s<?cs /if ?><?cs
- /if ?></a>)<?cs
- elif:cl == "mod" ?>
- (<a href="<?cs var:item.browser_href.old ?>"
- title="Show previous version in browser">previous</a>)<?cs
- /if ?>
-<?cs /def ?>
-
<dl id="overview">
<dt class="time">Timestamp:</dt>
<dd class="time"><?cs var:changeset.time ?></dd>
@@ -108,20 +71,24 @@
<dt class="message">Message:</dt>
<dd class="message" id="searchable"><?cs var:changeset.message ?></dd>
<dt class="files">Files:</dt>
- <dd class="files">
+ <dd class="files"><?cs set:anchor_idx = #0 ?>
<ul><?cs each:item = changeset.changes ?>
- <li><?cs
- if:item.change == 'add' ?><?cs
- call:node_change(item, 'add', 'added') ?><?cs
- elif:item.change == 'delete' ?><?cs
- call:node_change(item, 'rem', 'deleted') ?><?cs
- elif:item.change == 'copy' ?><?cs
- call:node_change(item, 'cp', 'copied') ?><?cs
- elif:item.change == 'move' ?><?cs
- call:node_change(item, 'mv', 'moved') ?><?cs
- elif:item.change == 'edit' ?><?cs
- call:node_change(item, 'mod', 'modified') ?><?cs
- /if ?>
+ <li>
+ <?cs if:item.change == "A" ?>
+ <div class="add"></div>
+ <a href="<?cs var:item.browser_href ?>" title="Show file in browser"><?cs
+ var:item.name ?></a> <span class="comment">(added)</span>
+ <?cs elif:item.change == "M" ?>
+ <div class="mod"></div>
+ <a href="<?cs var:item.browser_href ?>" title="Show file in browser"><?cs
+ var:item.name ?></a> <span class="comment">(modified)</span><?cs
+ if:len(changeset.diff.files[anchor_idx].changes) ?>
+ (<a href="#file<?cs var:anchor_idx ?>" title="Show differences">diff</a>)<?cs
+ /if ?><?cs set:anchor_idx = anchor_idx + #1 ?>
+ <?cs elif:item.change == "D" ?>
+ <div class="rem"></div>
+ <?cs var:item.name ?> <span class="comment">(deleted)</span>
+ <?cs /if ?>
</li>
<?cs /each ?></ul>
</dd>
@@ -135,71 +102,73 @@
<dt class="add"></dt><dd>Added</dd>
<dt class="rem"></dt><dd>Removed</dd>
<dt class="mod"></dt><dd>Modified</dd>
- <dt class="cp"></dt><dd>Copied</dd>
- <dt class="mv"></dt><dd>Moved</dd>
</dl>
</div>
- <ul class="entries"><?cs
- each:item = changeset.changes ?><?cs
- if:len(item.diff) || len(item.props) ?><li class="entry" id="file<?cs
- var:name(item) ?>"><h2><a href="<?cs
- var:item.browser_href.new ?>" title="Show new revision <?cs
- var:item.rev.new ?> of this file in browser"><?cs
- var:item.path.new ?></a></h2><?cs
- if:len(item.props) ?><ul class="props"><?cs
- each:prop = item.props ?><li>Property <strong><?cs
- var:name(prop) ?></strong> <?cs
- if:prop.old && prop.new ?>changed from <?cs
- elif:!prop.old ?>set<?cs
- else ?>deleted<?cs
- /if ?><?cs
- if:prop.old && prop.new ?><em><tt><?cs var:prop.old ?></tt></em><?cs /if ?><?cs
- if:prop.new ?> to <em><tt><?cs var:prop.new ?></tt></em><?cs /if ?></li><?cs
- /each ?></ul><?cs
- /if ?><?cs
- if:len(item.diff) ?><table class="<?cs
- var:diff.style ?>" summary="Differences" cellspacing="0"><?cs
- if:diff.style == 'sidebyside' ?>
- <colgroup class="l"><col class="lineno" /><col class="content" /></colgroup>
- <colgroup class="r"><col class="lineno" /><col class="content" /></colgroup>
- <thead><tr>
- <th colspan="2"><a href="<?cs
- var:item.browser_href.old ?>" title="Show old rev. <?cs
- var:item.rev.old ?> of <?cs var:item.path.old ?>">Revision <?cs
- var:item.rev.old ?></a></th>
- <th colspan="2"><a href="<?cs
- var:item.browser_href.new ?>" title="Show new rev. <?cs
- var:item.rev.old ?> of <?cs var:item.path.new ?>">Revision <?cs
- var:item.rev.new ?></a></th>
- </tr>
- </thead><?cs
- each:change = item.diff ?><tbody><?cs
- call:diff_display(change, diff.style) ?></tbody><?cs
- if:name(change) < len(item.diff) - 1 ?><tbody class="skipped"><tr>
- <th>&hellip;</th><td>&nbsp;</td><th>&hellip;</th><td>&nbsp;</td>
- </tr></tbody><?cs /if ?><?cs
- /each ?><?cs
- else ?>
- <colgroup><col class="lineno" /><col class="lineno" /><col class="content" /></colgroup>
- <thead><tr>
- <th title="Revision <?cs var:item.rev.old ?>"><a href="<?cs
- var:item.browser_href.old ?>" title="Show old version of <?cs
- var:item.path.old ?>">r<?cs var:item.rev.old ?></a></th>
- <th title="Revision <?cs var:item.rev.new ?>"><a href="<?cs
- var:item.browser_href.new ?>" title="Show new version of <?cs
- var:item.path.new ?>">r<?cs var:item.rev.new ?></a></th>
- <th>&nbsp;</th></tr>
- </thead><?cs
- each:change = item.diff ?><?cs
- call:diff_display(change, diff.style) ?><?cs
- if:name(change) < len(item.diff) - 1 ?><tbody class="skipped"><tr>
- <th>&hellip;</th><th>&hellip;</th><td>&nbsp;</td>
- </tr></tbody><?cs /if ?><?cs
- /each ?><?cs
- /if ?></table><?cs
- /if ?></li><?cs
- /if ?><?cs
- /each ?></ul>
+ <ul>
+ <?cs each:file = changeset.diff.files ?>
+ <?cs if:len(file.changes) ?>
+ <li id="file<?cs var:name(file) ?>">
+ <h2><a href="<?cs
+ var:file.browser_href.new ?>" title="Show version <?cs
+ var:file.rev.new ?> of this file in browser"><?cs
+ var:file.name.new ?></a></h2>
+ <?cs if:diff.style == 'sidebyside' ?>
+ <table class="sidebyside" summary="Differences" cellspacing="0">
+ <colgroup class="base">
+ <col class="lineno" /><col class="content" />
+ <colgroup class="chg">
+ <col class="lineno" /><col class="content" />
+ </colgroup>
+ <thead><tr>
+ <th colspan="2"><a href="<?cs var:file.browser_href.old ?>">Revision <?cs
+ var:file.rev.old ?></a></th>
+ <th colspan="2"><a href="<?cs var:file.browser_href.new ?>">Revision <?cs
+ var:file.rev.new ?></a></th>
+ </tr></thead>
+ <?cs each:change = file.changes ?>
+ <tbody>
+ <?cs call:diff_display(change, diff.style) ?>
+ </tbody>
+ <?cs if:name(change) < len(file.changes) - 1 ?>
+ <tbody class="skippedlines">
+ <tr><th>&hellip;</th><td>&nbsp;</td>
+ <th>&hellip;</th><td>&nbsp;</td></tr>
+ </tbody>
+ <?cs /if ?>
+ <?cs /each ?>
+ </table>
+ <?cs else ?>
+ <table class="inline" summary="Differences" cellspacing="0">
+ <colgroup>
+ <col class="lineno" />
+ <col class="lineno" />
+ <col class="content" />
+ </colgroup>
+ <thead><tr>
+ <th title="Revision <?cs var:file.rev.old ?>"><a href="<?cs
+ var:file.browser_href.old ?>" title="Show revision <?cs
+ var:file.rev.old ?> of this file in browser">r<?cs
+ var:file.rev.old ?></a></th>
+ <th title="Revision <?cs var:file.rev.new ?>"><a href="<?cs
+ var:file.browser_href.new ?>" title="Show revision <?cs
+ var:file.rev.new ?> of this file in browser">r<?cs
+ var:file.rev.new ?></a></th>
+ <th>&nbsp;</th>
+ </tr></thead>
+ <?cs each:change = file.changes ?>
+ <?cs call:diff_display(change, diff.style) ?>
+ <?cs if:name(change) < len(file.changes) - 1 ?>
+ <tbody class="skippedlines">
+ <tr><th>&hellip;</th><th>&hellip;</th><td>&nbsp;</td></tr>
+ </tbody>
+ <?cs /if ?>
+ <?cs /each ?>
+ </table>
+ <?cs /if ?>
+ </li>
+ <?cs /if ?>
+ <?cs /each ?>
+ </ul>
</div>
</div>
View
44 django_website/templates/trac_templates/footer.cs
@@ -1,25 +1,47 @@
-<script type="text/javascript">searchHighlight()</script><?cs
-if:len(chrome.links.alternate) ?>
-<div id="altlinks"><h3>Download in other formats:</h3><ul><?cs
- each:link = chrome.links.alternate ?><?cs
+<script type="text/javascript">searchHighlight()</script>
+
+<?cs if:len(links.alternate) ?>
+<div id="altlinks">
+ <h3>Download in other formats:</h3>
+ <ul><?cs each:link = links.alternate ?><?cs
set:isfirst = name(link) == 0 ?><?cs
- set:islast = name(link) == len(chrome.links.alternate) - 1?><li<?cs
+ set:islast = name(link) == len(links.alternate) - 1?>
+ <li<?cs
if:isfirst || islast ?> class="<?cs
if:isfirst ?>first<?cs /if ?><?cs
if:isfirst && islast ?> <?cs /if ?><?cs
if:islast ?>last<?cs /if ?>"<?cs
- /if ?>><a href="<?cs var:link.href ?>"<?cs if:link.class ?> class="<?cs
- var:link.class ?>"<?cs /if ?>><?cs var:link.title ?></a></li><?cs
- /each ?></ul></div><?cs
-/if ?>
+ /if ?>>
+ <a href="<?cs var:link.href ?>"<?cs if:link.class ?> class="<?cs
+ var:link.class ?>"<?cs /if ?>><?cs var:link.title ?></a>
+ </li><?cs /each ?>
+ </ul>
+</div>
+<?cs /if ?>
+
</div>
<div id="footer">
- <div id="metanav" class="nav"><?cs call:nav(chrome.nav.metanav) ?></div>
- </div>
+ <div id="metanav" class="nav">
+ <h2>Navigation</h2>
+ <ul>
+ <li class="first"><?cs if:trac.authname == "anonymous" || !trac.authname ?>
+ <a href="<?cs var:trac.href.login ?>">Login</a>
+ <?cs else ?>
+ logged in as <?cs var:trac.authname ?> </li>
+ <li><a href="<?cs var:trac.href.logout ?>">Logout</a>
+ <?cs /if ?></li>
+ <li><a href="<?cs var:trac.href.settings ?>">Settings</a></li>
+ <li style="display: none"><a accesskey="6" href="<?cs var:trac.href.wiki ?>/TracGuide">Help/Guide</a></li>
+ <li style="display: none"><a accesskey="5" href="http://projects.edgewall.com/trac/wiki/TracFaq">FAQ</a></li>
+ <li style="display: none"><a accesskey="0" href="<?cs var:trac.href.wiki ?>/TracAccessibility">Accessibility</a></li>
+ <li class="last"><a accesskey="9" href="<?cs var:trac.href.about ?>">About Trac</a></li>
+ </ul>
+ </div>
</div>
+
<?cs include "site_footer.cs" ?>
</body>
</html>
View
62 django_website/templates/trac_templates/header.cs
@@ -77,24 +77,44 @@
</div><?cs /if ?>
</form>
- <?cs def:nav(items) ?><?cs
- if:len(items) ?><ul><?cs
- set:idx = 0 ?><?cs
- set:max = len(items) - 1 ?><?cs
- each:item = items ?><?cs
- set:first = idx == 0 ?><?cs
- set:last = idx == max ?><li<?cs
- if:first || last || item.active ?> class="<?cs
- if:item.active ?>active<?cs /if ?><?cs
- if:item.active && (first || last) ?> <?cs /if ?><?cs
- if:first ?>first<?cs /if ?><?cs
- if:(item.active || first) && last ?> <?cs /if ?><?cs
- if:last ?>last<?cs /if ?>"<?cs
- /if ?>><?cs var:item ?></li><?cs
- set:idx = idx + 1 ?><?cs
- /each ?></ul><?cs
- /if ?><?cs
- /def ?>
-
- <div id="mainnav" class="nav"><?cs call:nav(chrome.nav.mainnav) ?></div>
- <div id="main">
+ <?cs if $trac.active_module == "wiki" ?><?cs
+ set:$wiki_view="wiki" ?><?cs
+ else ?><?cs
+ set:$wiki_view="attachment" ?><?cs
+ /if ?><?cs
+ if $trac.active_module == "ticket" ?><?cs
+ set:$ticket_view="ticket" ?><?cs
+ elif $trac.active_module == "query" ?><?cs
+ set:$ticket_view="query" ?><?cs
+ else ?><?cs
+ set:$ticket_view="report" ?><?cs
+ /if ?><?cs
+ if $trac.active_module == "log" ?><?cs
+ set:$browser_view="log" ?><?cs
+ elif $trac.active_module == "file" ?><?cs
+ set:$browser_view="file" ?><?cs
+ else ?><?cs
+ set:$browser_view="browser" ?><?cs
+ /if ?><?cs
+ if $trac.active_module == "milestone" ?><?cs
+ set:$roadmap_view="milestone" ?><?cs
+ else ?><?cs
+ set:$roadmap_view="roadmap" ?><?cs
+ /if ?>
+ <div id="mainnav" class="nav">
+ <ul><?cs
+ call:navlink("Start", trac.href.wiki, wiki_view,
+ trac.acl.WIKI_VIEW, "1") ?><?cs
+ call:navlink("Timeline", trac.href.timeline, "timeline",
+ trac.acl.TIMELINE_VIEW, "2") ?><?cs
+ call:navlink("Roadmap", trac.href.roadmap, roadmap_view,
+ trac.acl.ROADMAP_VIEW, "3") ?><?cs
+ call:navlink("Browse source", trac.href.browser, browser_view,
+ trac.acl.BROWSER_VIEW, "") ?><?cs
+ call:navlink("View tickets", trac.href.report, ticket_view,
+ trac.acl.REPORT_VIEW, "") ?><?cs
+ call:navlink("New ticket", trac.href.newticket, "newticket",
+ trac.acl.TICKET_CREATE, "7") ?><?cs
+ call:navlink("Search", trac.href.search, "search",
+ trac.acl.SEARCH_VIEW, "4") ?></ul>
+ </div>
View
126 django_website/templates/trac_templates/log.cs
@@ -1,83 +1,30 @@
+<?cs set:html.stylesheet = 'css/browser.css' ?>
<?cs include "header.cs"?>
<?cs include "macros.cs"?>
<div id="ctxtnav" class="nav">
<ul>
<li class="last"><a href="<?cs
- var:log.browser_href ?>">View Latest Revision</a></li><?cs
- if:len(chrome.links.prev) ?>
- <li class="first<?cs if:!len(chrome.links.next) ?> last<?cs /if ?>">
- &larr; <a href="<?cs var:chrome.links.prev.0.href ?>" title="<?cs
- var:chrome.links.prev.0.title ?>">Newer Revisions</a>
- </li><?cs
- /if ?><?cs
- if:len(chrome.links.next) ?>
- <li class="<?cs if:!len(chrome.links.prev) ?>first <?cs /if ?>last">
- <a href="<?cs var:chrome.links.next.0.href ?>" title="<?cs
- var:chrome.links.next.0.title ?>">Older Revisions</a> &rarr;
- </li><?cs
- /if ?>
+ var:log.items.0.file_href ?>">View Latest Revision</a></li>
</ul>
</div>
-
<div id="content" class="log">
- <h1><?cs call:browser_path_links(log.path, log) ?></h1>
- <form id="prefs" action="<?cs var:browser_current_href ?>" method="get">
- <div>
- <input type="hidden" name="action" value="<?cs var:log.mode ?>" />
- <label>View log starting at <input type="text" id="rev" name="rev" value="<?cs
- var:log.items.0.rev ?>" size="5" /></label>
- <label>and back to <input type="text" id="stop_rev" name="stop_rev" value="<?cs
- var:log.stop_rev ?>" size="5" /></label>
- <br />
- <div class="choice" ?>
- <fieldset>
- <legend>Mode:</legend>
- <label for="stop_on_copy">
- <input type="radio" id="stop_on_copy" name="mode" value="stop_on_copy" <?cs
- if:log.mode != "follow_copy" || log.mode != "path_history" ?> checked="checked" <?cs
- /if ?> />
- Stop on copy
- </label>
- <label for="follow_copy">
- <input type="radio" id="follow_copy" name="mode" value="follow_copy" <?cs
- if:log.mode == "follow_copy" ?> checked="checked" <?cs /if ?> />
- Follow copies
- </label>
- <label for="path_history">
- <input type="radio" id="path_history" name="mode" value="path_history" <?cs
- if:log.mode == "path_history" ?> checked="checked" <?cs /if ?> />
- Show only adds, moves and deletes
- </label>
- </fieldset>
+ <?cs call:browser_path_links(log.path, log) ?>
+
+ <div id="jumprev">
+ <form action="<?cs var:browser_current_href ?>" method="get">
+ <div>
+ <label for="rev">View revision:</label>
+ <input type="text" id="rev" name="rev" value="<?cs
+ var:log.items.0.rev ?>" size="4" />
</div>
- <label><input type="checkbox" name="verbose" <?cs
- if:log.verbose ?> checked="checked" <?cs
- /if ?> /> Show full log messages</label>
- </div>
- <div class="buttons">
- <input type="submit" value="Update"
- title="Warning: by updating, you will clear the page history" />
- </div>
- </form>
- <div class="diff">
- <div id="legend">
- <h3>Legend:</h3>
- <dl>
- <dt class="add"></dt><dd>Added</dd><?cs
- if:log.mode == "path_history" ?>
- <dt class="rem"></dt><dd>Removed</dd><?cs
- /if ?>
- <dt class="mod"></dt><dd>Modified</dd>
- <dt class="cp"></dt><dd>Copied or renamed</dd>
- </dl>
- </div>
+ </form>
</div>
+
<table id="chglist" class="listing">
<thead>
<tr>
- <th class="change"></th>
<th class="data">Date</th>
<th class="rev">Rev</th>
<th class="chgset">Chgset</th>
@@ -85,51 +32,22 @@ Follow copies
<th class="summary">Log Message</th>
</tr>
</thead>
- <tbody><?cs
- set:indent = #1 ?><?cs
- each:item = log.items ?><?cs
- if:item.copyfrom_path ?>
- <tr class="<?cs if:name(item) % #2 ?>even<?cs else ?>odd<?cs /if ?>">
- <td class="copyfrom_path" colspan="6" style="padding-left: <?cs var:indent ?>em">
- copied from <a href="<?cs var:item.browser_href ?>"?><?cs var:item.copyfrom_path ?></a>:
- </td>
- </tr><?cs
- set:indent = indent + #1 ?><?cs
- elif:log.mode == "path_history" ?><?cs
- set:indent = #1 ?><?cs
- /if ?>
+ <tbody>
+ <?cs each:item = log.items ?>
<tr class="<?cs if:name(item) % #2 ?>even<?cs else ?>odd<?cs /if ?>">
- <td class="change" style="padding-left:<?cs var:indent ?>em">
- <a title="View log starting at this revision" href="<?cs var:item.log_href ?>">
- <div class="<?cs var:item.change ?>"></div>
- <span class="comment">(<?cs var:item.change ?>)</span>
- </a>
- </td>
- <td class="date"><?cs var:log.changes[item.rev].date ?></td>
+ <td class="date"><?cs var:item.date ?></td>
<td class="rev">
- <a href="<?cs var:item.browser_href ?>"><?cs var:item.rev ?></a>
+ <a href="<?cs var:item.file_href ?>"><?cs var:item.rev ?></a>
</td>
<td class="chgset">
- <a href="<?cs var:item.changeset_href ?>"><?cs var:item.rev ?></a>
+ <a class="block-link" href="<?cs var:item.changeset_href ?>"><?cs var:item.rev ?></a>
</td>
- <td class="author"><?cs var:log.changes[item.rev].author ?></td>
- <td class="summary"><?cs var:log.changes[item.rev].message ?></td>
- </tr><?cs
- /each ?>
+ <td class="author"><?cs var:item.author ?></td>
+ <td class="summary"><?cs var:item.log ?></td>
+ </tr>
+ <?cs /each ?>
</tbody>
- </table><?cs
- if:len(links.prev) || len(links.next) ?><div id="paging" class="nav"><ul><?cs
- if:len(links.prev) ?><li class="first<?cs
- if:!len(links.next) ?> last<?cs /if ?>">&larr; <a href="<?cs
- var:links.prev.0.href ?>" title="<?cs
- var:links.prev.0.title ?>">Younger Revisions</a></li><?cs
- /if ?><?cs
- if:len(links.next) ?><li class="<?cs
- if:len(links.prev) ?>first <?cs /if ?>last"><a href="<?cs
- var:links.next.0.href ?>" title="<?cs
- var:links.next.0.title ?>">Older Revisions</a> &rarr;</li><?cs
- /if ?></ul></div><?cs
- /if ?>
+ </table>
</div>
<?cs include "footer.cs"?>
View
14 django_website/templates/trac_templates/log_changelog.cs
@@ -1,14 +0,0 @@
-#
-# ChangeLog for <?cs var:log.path ?>
-#
-# Generated by Trac <?cs var:trac.version ?>
-# <?cs var:trac.time ?>
-#
-<?cs each:item = $log.items ?>
-<?cs var:log.changes[item.rev].date ?> <?cs
- var:log.changes[item.rev].author ?> [<?cs var:item.rev ?>]
-<?cs each:file = $log.changes[item.rev].files ?>
- * <?cs var:file ?>:<?cs
-/each ?>
-<?cs var:log.changes[item.rev].message ?>
-<?cs /each ?>
View
52 django_website/templates/trac_templates/log_rss.cs
@@ -1,27 +1,31 @@
<?xml version="1.0"?>
-<!-- RSS generated by Trac v<?cs var:trac.version ?> on <?cs var:trac.time ?> -->
+<!-- RSS generated by Trac v<?cs var:$trac.version ?> on <?cs var:$trac.time ?> -->
<rss version="2.0">
- <channel><?cs
- if:project.name.encoded ?>
- <title><?cs var:project.name.encoded ?>: Revisions of <?cs var:log.path ?></title><?cs
- else ?>
- <title>Revisions of <?cs var:log.path ?></title><?cs
- /if ?>
- <link><?cs var:base_host ?><?cs var:log.log_href ?></link>
- <description>Trac Log - Revisions of <?cs var:log.path ?></description>
- <language>en-us</language>
- <generator>Trac v<?cs var:trac.version ?></generator><?cs
- each:item = log.items ?><?cs
- with:change = log.changes[item.rev] ?>
- <item>
- <author><?cs var:change.author ?></author>
- <pubDate><?cs var:change.date ?></pubDate>
- <title>Revision <?cs var:item.rev ?>: <?cs var:change.shortlog ?></title>
- <link><?cs var:base_host ?><?cs var:item.changeset_href ?></link>
- <description><?cs var:change.message ?></description>
- <category>Report</category>
- </item><?cs
- /with ?><?cs
- /each ?>
- </channel>
+ <?cs set base_url = $HTTP.Protocol+'://'+$HTTP.Host ?>
+ <?cs if $HTTP.Port ?>
+ <?cs set base_url = $base_url + ':' + $HTTP.Port ?>
+ <?cs /if ?>
+ <channel>
+ <?cs if $project.name.encoded ?>
+ <title><?cs var:$project.name.encoded ?>: Revisions of <?cs var:$log.path ?></title>
+ <?cs else ?>
+ <title>Revisions of <?cs var:$log.filename ?></title>
+ <?cs /if ?>
+ <link><?cs var:$base_url ?><?cs var:$log.href ?></link>
+ <description>Trac Log - Revisions of <?cs var:$log.path ?></description>
+ <language>en-us</language>
+ <generator>Trac v<?cs var:$trac.version ?></generator>
+ <?cs each:item = $log.items ?>
+ <item>
+<!-- XXX: author element requires email address in rss 2.0.
+ maybe we should use the DC rdf stuff for metadata instead?
+ <author><?cs var:$item.author ?></author> -->
+ <pubDate><?cs var:$item.gmt ?></pubDate>
+ <title><?cs var:$item.rev+': '+$item.shortlog ?></title>
+ <link><?cs var:$base_url+$item.file_href ?></link>
+ <description><?cs var:$item.log.raw ?></description>
+ <category>Report</category>
+ </item>
+ <?cs /each ?>
+ </channel>
</rss>
View
290 django_website/templates/trac_templates/macros.cs
@@ -1,179 +1,207 @@
-<?cs def:hdf_select(options, name, selected, optional) ?>
+<?cs def:hdf_select(options, name, selected) ?>
<select size="1" id="<?cs var:name ?>" name="<?cs var:name ?>"><?cs
- if:optional ?><option></option><?cs /if ?><?cs
- each:option = options ?>
- <option<?cs if:option == selected ?> selected="selected"<?cs /if ?>><?cs
- var:option ?></option><?cs
+ each:option = options ?><?cs
+ if option.name == $selected ?>
+ <option selected="selected"><?cs var:option.name ?></option><?cs
+ else ?>
+ <option><?cs var:option.name ?></option><?cs
+ /if ?><?cs
/each ?>
</select><?cs
-/def?><?cs
+/def?>
-def:labelled_hdf_select(label, options, name, selected, optional) ?><?cs
- if:len(options) > #0 ?>
- <label for="<?cs var:name ?>"><?cs var:label ?></label><?cs
- call:hdf_select(options, name, selected, optional) ?>
- </label>
- <br /><?cs
- /if ?><?cs
-/def ?><?cs
+<?cs def:hdf_select_multiple(options, name, size) ?>
+ <select size="<?cs var:size ?>" id="<?cs var:name ?>" name="<?cs
+ var:name ?>" multiple="multiple"><?cs
+ each:option = options ?>
+ <option<?cs if:option.selected ?> selected="selected"<?cs /if ?>><?cs
+ var:option.name ?></option><?cs
+ /each ?>
+ </select><?cs
+/def ?>
-def:browser_path_links(path, file) ?><?cs
- set:first = #1 ?><?cs
+<?cs def:browser_path_links(path, file) ?><?cs
+ set:first = #1 ?>
+ <h1><?cs
each:part = path ?><?cs
set:last = name(part) == len(path) - #1 ?><a<?cs
if:first ?> class="first" title="Go to root directory"<?cs
set:first = #0 ?><?cs
- else ?> title="View <?cs var:part.name ?>"<?cs
- /if ?> href="<?cs var:part.href ?>"><?cs var:part.name ?></a><?cs
- if:!last ?><span class="sep">/</span><?cs /if ?><?cs
+ else ?> title="Go to directory"<?cs
+ /if ?> href="<?cs var:part.url ?>"><?cs var:part ?></a><?cs
+ if:file.filename || !last ?><span class="sep">/</span><?cs /if ?><?cs
/each ?><?cs
-/def ?><?cs
+ if:file.filename ?><span class="filename"><?cs var:file.filename ?></span><?cs
+ /if ?></h1>
+<?cs /def ?>
-def:diff_line_class(block, line) ?><?cs
- set:first = name(line) == 0 ?><?cs
- set:last = name(line) + 1 == len(block.lines) ?><?cs
- if:first || last ?> class="<?cs
- if:first ?>first<?cs /if ?><?cs
- if:first && last ?> <?cs /if ?><?cs
- if:last ?>last<?cs /if ?>"<?cs
- /if ?><?cs
-/def ?><?cs
-
-def:diff_display(diff, style) ?><?cs
+<?cs def:diff_display(change, style) ?><?cs
if:style == 'sidebyside' ?><?cs
- each:block = diff ?><?cs
- if:block.type == 'unmod' ?><tbody><?cs
- each:line = block.base.lines ?><tr><th><?cs
- var:#block.base.offset + name(line) + 1 ?></th><td class="l"><span><?cs
- var:line ?></span>&nbsp;</td><th><?cs
- var:#block.changed.offset + name(line) + 1 ?></th><td class="r"><span><?cs
- var:block.changed.lines[name(line)] ?></span>&nbsp;</td></tr><?cs
- /each ?></tbody><?cs
+ each:block = change.blocks ?><?cs
+ if:block.type == 'unmod' ?><tbody class="unmod"><?cs
+ each:line = block.base.lines ?><tr>
+ <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th>
+ <td class="base"><span><?cs var:line ?></span>&nbsp;</td>
+ <th class="chg"><?cs var:#block.changed.offset + name(line) + 1 ?></th>
+ <td class="chg"><span><?cs var:line ?></span>&nbsp;</td>
+ </tr><?cs /each ?>
+ </tbody><?cs
elif:block.type == 'mod' ?><tbody class="mod"><?cs
if:len(block.base.lines) >= len(block.changed.lines) ?><?cs
- each:line = block.base.lines ?><tr><th><?cs
- var:#block.base.offset + name(line) + 1 ?></th><td class="l"><?cs
- var:line ?>&nbsp;</td><?cs
+ each:line = block.base.lines ?><tr>
+ <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th>
+ <td class="base"><?cs var:line ?>&nbsp;</td><?cs
if:len(block.changed.lines) >= name(line) + 1 ?><?cs
each:changedline = block.changed.lines ?><?cs
- if:name(changedline) == name(line) ?><th><?cs
- var:#block.changed.offset + name(changedline) + 1 ?></th><td class="r"><?cs
- var:changedline ?>&nbsp;</td><?cs
+ if:name(changedline) == name(line) ?>
+ <th class="chg"><?cs var:#block.changed.offset + name(changedline) + 1 ?></th>
+ <td class="chg"><?cs var:changedline ?>&nbsp;</td><?cs
/if ?><?cs
/each ?><?cs
- else ?><th>&nbsp;</th><td class="r">&nbsp;</td><?cs
- /if ?></tr><?cs
- /each ?><?cs
+ else ?>
+ <th class="chg">&nbsp;</th>
+ <td class="chg">&nbsp;</td><?cs
+ /if ?>
+ </tr><?cs /each ?><?cs
else ?><?cs
each:line = block.changed.lines ?><tr><?cs
if:len(block.base.lines) >= name(line) + 1 ?><?cs
each:baseline = block.base.lines ?><?cs
- if:name(baseline) == name(line) ?><th><?cs
- var:#block.base.offset + name(baseline) + 1 ?></th><td class="l"><?cs
- var:baseline ?>&nbsp;</td><?cs
+ if:name(baseline) == name(line) ?>
+ <th class="base"><?cs var:#block.base.offset + name(baseline) + 1 ?></th>
+ <td class="base"><?cs var:baseline ?>&nbsp;</td><?cs
/if ?><?cs
/each ?><?cs
- else ?><th>&nbsp;</th><td class="l">&nbsp;</td><?cs
+ else ?>
+ <th class="base">&nbsp;</th>
+ <td class="base">&nbsp;</td><?cs
/if ?>
- <th><?cs var:#block.changed.offset + name(line) + 1 ?></th>
- <td class="r"><?cs var:line ?>&nbsp;</td></tr><?cs
- /each ?><?cs
- /if ?></tbody><?cs
+ <th class="chg"><?cs var:#block.changed.offset + name(line) + 1 ?></th>
+ <td class="chg"><?cs var:line ?>&nbsp;</td>
+ </tr><?cs /each ?><?cs
+ /if ?>
+ </tbody><?cs
elif:block.type == 'add' ?><tbody class="add"><?cs
- each:line = block.changed.lines ?><tr><th>&nbsp;</th><td class="l">&nbsp;</td><th><?cs
- var:#block.changed.offset + name(line) + 1 ?></th><td class="r"><ins><?cs
- var:line ?></ins>&nbsp;</td></tr><?cs
- /each ?><?cs
+ each:line = block.changed.lines ?><tr>
+ <th class="base">&nbsp;</th>
+ <td class="base">&nbsp;</td>
+ <th class="chg"><?cs var:#block.changed.offset + name(line) + 1 ?></th>
+ <td class="chg"><ins><?cs var:line ?></ins>&nbsp;</td>
+ </tr><?cs /each ?><?cs
elif:block.type == 'rem' ?><tbody class="rem"><?cs
- each:line = block.base.lines ?><tr><th><?cs
- var:#block.base.offset + name(line) + 1 ?></th><td class="l"><del><?cs
- var:line ?></del>&nbsp;</td><th>&nbsp;</th><td class="r">&nbsp;</td></tr><?cs
- /each ?><?cs
- /if ?></tbody><?cs
+ each:line = block.base.lines ?><tr>
+ <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th>
+ <td class="base"><del><?cs var:line ?></del>&nbsp;</td>
+ <th class="chg">&nbsp;</th>
+ <td class="chg">&nbsp;</td>
+ </tr><?cs /each ?><?cs
+ /if ?>
+ </tbody><?cs
/each ?><?cs
else ?><?cs
- each:block = diff ?><?cs
- if:block.type == 'unmod' ?><tbody><?cs
- each:line = block.base.lines ?><tr><th><?cs
- var:#block.base.offset + name(line) + #1 ?></th><th><?cs
- var:#block.changed.offset + name(line) + #1 ?></th><td class="l"><span><?cs
- var:line ?></span>&nbsp;</td></tr><?cs
- /each ?></tbody><?cs
- elif:block.type == 'mod' ?><tbody class="mod"><?cs
- each:line = block.base.lines ?><tr<?cs
- if:name(line) == 0 ?> class="first"<?cs /if ?>><th><?cs
- var:#block.base.offset + name(line) + #1 ?></th><th>&nbsp;</th><td class="l"><?cs
- var:line ?>&nbsp;</td></tr><?cs
- /each ?><?cs
- each:line = block.changed.lines ?><tr<?cs
- if:name(line) + 1 == len(block.changed.lines) ?> class="last"<?cs /if ?>><th>&nbsp;</th><th><?cs
- var:#block.changed.offset + name(line) + #1 ?></th><td class="r"><?cs
- var:line ?>&nbsp;</td></tr><?cs
- /each ?></tbody><?cs
- elif:block.type == 'add' ?><tbody class="add"><?cs
- each:line = block.changed.lines ?><tr<?cs
- call:diff_line_class(block.changed, line) ?>><th>&nbsp;</th><th><?cs
- var:#block.changed.offset + name(line) + #1 ?></th><td class="r"><ins><?cs
- var:line ?></ins>&nbsp;</td></tr><?cs
- /each ?></tbody><?cs
- elif:block.type == 'rem' ?><tbody class="rem"><?cs
- each:line = block.base.lines ?><tr<?cs
- call:diff_line_class(block.base, line) ?>><th><?cs
- var:#block.base.offset + name(line) + 1 ?></th><th>&nbsp;</th><td class="l"><del><?cs
- var:line ?></del>&nbsp;</td></tr><?cs
- /each ?></tbody><?cs
- /if ?><?cs
+ each:block = change.blocks ?>
+ <?cs if:block.type == 'unmod' ?><tbody class="unmod"><?cs
+ each:line = block.base.lines ?><tr>
+ <th class="base"><?cs var:#block.base.offset + name(line) + #1 ?></th>
+ <th class="chg"><?cs var:#block.changed.offset + name(line) + #1 ?></th>
+ <td class="base"><span><?cs var:line ?></span>&nbsp;</td>
+ </tr><?cs /each ?>
+ </tbody>
+ <?cs elif:block.type == 'mod' ?><tbody class="mod"><?cs
+ each:line = block.base.lines ?><tr class="<?cs
+ if:name(line) == 0 ?>first<?cs /if ?>">
+ <th class="base"><?cs var:#block.base.offset + name(line) + #1 ?></th>
+ <th class="chg">&nbsp;</th>
+ <td class="base"><?cs var:line ?>&nbsp;</td>
+ </tr><?cs /each ?><?cs
+ each:line = block.changed.lines ?><tr class="<?cs
+ if:name(line) + 1 == len(block.changed.lines) ?> last<?cs /if ?>">
+ <th class="base">&nbsp;</th>
+ <th class="chg"><?cs var:#block.changed.offset + name(line) + #1 ?></th>
+ <td class="chg"><?cs var:line ?>&nbsp;</td>
+ </tr><?cs /each ?>
+ </tbody>
+ <?cs elif:block.type == 'add' ?><tbody class="add"><?cs
+ each:line = block.changed.lines ?><tr class="<?cs
+ if:name(line) == 0 ?>first<?cs /if ?><?cs
+ if:name(line) + 1 == len(block.changed.lines) ?> last ?><?cs /if ?>">
+ <th class="base">&nbsp;</th>
+ <th class="chg"><?cs var:#block.changed.offset + name(line) + #1 ?></th>
+ <td class="chg"><ins><?cs var:line ?></ins>&nbsp;</td>
+ </tr><?cs /each ?>
+ </tbody>
+ <?cs elif:block.type == 'rem' ?><tbody class="rem"><?cs
+ each:line = block.base.lines ?><tr class="<?cs
+ if:name(line) == 0 ?>first<?cs /if ?><?cs
+ if:name(line) + 1 == len(block.base.lines) ?> last ?><?cs /if ?>">
+ <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th>
+ <th class="chg">&nbsp;</th>
+ <td class="base"><del><?cs var:line ?></del>&nbsp;</td>
+ </tr><?cs /each ?>
+ </tbody>
+ <?cs /if ?><?cs
/each ?><?cs
/if ?><?cs
-/def ?><?cs
+/def ?>
+
+<?cs def:session_name_email() ?><?cs
+ if trac.authname != "anonymous" ?><?cs
+ var:trac.authname ?><?cs
+ elif trac.session.var.name && trac.session.var.email ?><?cs
+ var:trac.session.var.name ?> &lt;<?cs var:trac.session.var.email ?>&gt;<?cs
+ elif !trac.session.var.name && trac.session.var.email ?><?cs
+ var:trac.session.var.email ?><?cs
+ else ?><?cs
+ var:trac.authname ?><?cs
+ /if ?><?cs
+ /def ?>
-def:ticket_custom_props(ticket) ?><?cs
+<?cs def:ticket_custom_props(ticket) ?><?cs
each c=ticket.custom ?>
<div class="field custom_<?cs var c.name ?>"><?cs
+ if c.type == 'text' || c.type == 'select' ?>
+ <label for="custom_<?cs var c.name ?>"><?cs alt c.label ?><?cs
+ var c.name ?><?cs /alt ?></label>:<?cs
+ /if ?><?cs
if c.type == 'text' ?>
- <label>
- <?cs alt c.label ?><?cs var c.name ?><?cs /alt ?>:
- <input type="text" name="custom_<?cs var c.name ?>" value="<?cs var c.value ?>" />
- </label><?cs
+ <input type="text" id="custom_<?cs var c.name ?>" name="custom_<?cs
+ var c.name ?>" value="<?cs var c.value ?>" /><?cs
elif c.type == 'textarea' ?>
- <label>
- <?cs alt c.label ?><?cs var c.name ?><?cs /alt ?>:<br />
- <textarea cols="<?cs alt c.width ?>60<?cs /alt ?>" rows="<?cs
- alt c.height ?>12<?cs /alt ?>" name="custom_<?cs var c.name ?>"><?cs
- var c.value ?></textarea>
- </label><?cs
+ <label for="custom_<?cs var c.name ?>"><?cs alt c.label ?><?cs
+ var c.name ?><?cs /alt ?></label>:<br />
+ <textarea cols="<?cs alt c.width ?>60<?cs /alt ?>" rows="<?cs
+ alt c.height ?>12<?cs /alt ?>" name="custom_<?cs var c.name ?>"><?cs
+ var c.value ?></textarea><?cs
elif c.type == 'checkbox' ?>
- <input type="hidden" name="checkbox_<?cs var c.name ?>" />
- <label>
- <input type="checkbox" name="custom_<?cs var c.name ?>" value="1"<?cs
- if c.selected ?> checked="checked"<?cs /if ?> />
- <?cs alt c.label ?><?cs var c.name ?><?cs /alt ?>
- </label><?cs
+ <input type="hidden" name="checkbox_<?cs var c.name ?>" value="custom_<?cs
+ var c.name ?>" />
+ <input type="checkbox" id="custom_<?cs var c.name ?>" name="custom_<?cs
+ var c.name ?>" value="1" <?cs if c.selected ?>checked="checked"<?cs /if ?> />
+ <label for="custom_<?cs var c.name ?>"><?cs alt c.label ?><?cs
+ var c.name ?><?cs /alt ?></label><?cs
elif c.type == 'select' ?>
- <label>
- <?cs alt c.label ?><?cs var c.name ?><?cs /alt ?>:
- <select name="custom_<?cs var c.name ?>"><?cs each v = c.option ?>
- <option<?cs if v.selected ?> selected="selected"<?cs /if ?>><?cs
- var v ?></option><?cs /each ?>
- </select>
- </label><?cs
+ <select name="custom_<?cs var c.name ?>"><?cs each v = c.option ?>
+ <option <?cs if v.selected ?>selected="selected"<?cs /if ?>><?cs
+ var v ?></option><?cs /each ?>
+ </select><?cs
elif c.type == 'radio' ?>
<fieldset class="radio">
<legend><?cs alt c.label ?><?cs var c.name ?><?cs /alt ?>:</legend><?cs
each v = c.option ?>
- <label><input type="radio" name="custom_<?cs var c.name ?>" value="<?cs
- var v ?>"<?cs if v.selected ?> checked="checked"<?cs /if ?> /> <?cs
- var v ?></label><?cs
+ <input type="radio" id="custom_<?cs var c.name ?>_<?cs
+ var v ?>" name="custom_<?cs var c.name ?>"<?cs
+ if v.selected ?> checked="checked"<?cs /if ?> value="<?cs var v ?>"/>
+ <label for="custom_<?cs var c.name ?>_<?cs var v ?>"><?cs
+ var v ?></label><?cs
/each ?>
</fieldset><?cs
/if ?>
</div><?cs
/each ?><?cs
-/def ?><?cs
-
-def:sortable_th(order, desc, class, title, href) ?>
- <th class="<?cs var:class ?><?cs if:order == class ?> <?cs if:desc ?>desc<?cs else ?>asc<?cs /if ?><?cs /if ?>">
- <a title="Sort by <?cs var:class ?><?cs if:order == class && !desc ?> (descending)<?cs /if ?>"
- href="<?cs var:href ?>&order=<?cs var:class ?><?cs if:order == class && !desc ?>&desc=1<?cs /if ?>"><?cs var:title ?></a>
- </th><?cs
/def ?>
+
+<?cs def:wiki_toolbar(textarea_id) ?>
+<script type='text/javascript'>
+ addWikiFormattingToolbar(document.getElementById("<?cs var:textarea_id ?>"));
+</script>
+<?cs /def ?>
View
275 django_website/templates/trac_templates/milestone.cs
@@ -1,7 +1,15 @@
+<?cs set:html.stylesheet = 'css/roadmap.css' ?>
<?cs include:"header.cs"?>
<?cs include:"macros.cs"?>
-<div id="ctxtnav" class="nav"></div>
+<div id="ctxtnav" class="nav">
+ <ul>
+ <?cs if:milestone.href.edit ?><li class="first"><a href="<?cs
+ var:milestone.href.edit ?>">Edit Milestone Info</a></li><?cs /if ?>
+ <?cs if:milestone.href.delete ?><li class="last"><a href="<?cs
+ var:milestone.href.delete ?>">Delete Milestone</a></li><?cs /if ?>
+ </ul>
+</div>
<div id="content" class="milestone">
<?cs if:milestone.mode == "new" ?>
@@ -12,78 +20,76 @@
<h1>Delete Milestone <?cs var:milestone.name ?></h1>
<?cs else ?>
<h1>Milestone <?cs var:milestone.name ?></h1>
+ <form action="#stats" id="prefs" method="get">
+ <div>
+ <label for="by">View status by</label>
+ <select id="by" name="by"><?cs each:group = milestone.stats.available_groups ?>
+ <option<?cs
+ if:milestone.stats.grouped_by == group?> selected="selected"<?cs
+ /if ?>><?cs var:group ?></option>
+ <?cs /each ?></select>
+ <div>
+ <input name="showempty" id="showempty" type="checkbox"<?cs
+ if:milestone.stats.show_empty ?> checked="checked"<?cs /if ?>>
+ <label for="showempty">Show groups with no assigned tickets</label>
+ </div>
+ <div class="buttons">
+ <input type="submit" value="Update" />
+ </div>
+ </div>
+ </form>
<?cs /if ?>
<?cs if:milestone.mode == "edit" || milestone.mode == "new" ?>
<script type="text/javascript">
addEvent(window, 'load', function() {
- document.getElementById('name').focus();
- });
+ document.getElementById('name').focus() }
+ );
</script>
- <form id="edit" action="<?cs var:milestone.href ?>" method="post">
+ <form id="edit" action="<?cs var:cgi_location ?>" method="post">
+ <input type="hidden" name="mode" value="milestone" />
<input type="hidden" name="id" value="<?cs var:milestone.name ?>" />
- <input type="hidden" name="action" value="edit" />
+ <input type="hidden" name="action" value="commit_changes" />
<div class="field">
- <label>Name of the milestone:<br />
+ <label for="name">Name of the milestone:</label><br />
<input type="text" id="name" name="name" size="32" value="<?cs
- var:milestone.name ?>" /></label>
+ var:milestone.name ?>" />
+ </div>
+ <div class="field">
+ <label for="datemode">Completion date:</label><br />
+ <select name="datemode" id="datemode"
+ onchange="enableControl('date',this.value=='manual');
+ if (this.value=='manual') document.getElementById('date').focus();">
+ <option value="manual">Set manually</option>
+ <option value="now">Mark as completed now</option>
+ </select>
+ <input type="text" id="date" name="date" size="8" value="<?cs
+ var:milestone.date ?>" title="Format: <?cs var:milestone.date_hint ?>" />
+ <label for="date"><em>Format: <?cs var:milestone.date_hint ?></em></label>
</div>
- <fieldset>
- <legend>Schedule</legend>
- <label>Due:<br />
- <input type="text" id="duedate" name="duedate" size="<?cs
- var:len(milestone.date_hint) ?>" value="<?cs
- var:milestone.due_date ?>" title="Format: <?cs var:milestone.date_hint ?>" />
- <em>Format: <?cs var:milestone.date_hint ?></em>
- </label>
- <div class="field">
- <label>
- <input type="checkbox" id="completed" name="completed"<?cs
- if:milestone.completed ?> checked="checked"<?cs /if ?> />
- Completed:<br />
- </label>
- <label>
- <input type="text" id="completeddate" name="completeddate" size="<?cs
- var:len(milestone.date_hint) ?>" value="<?cs
- alt:milestone.completed_date ?><?cs
- var:milestone.datetime_now ?><?cs
- /alt ?>" title="Format: <?cs
- var:milestone.datetime_hint ?>" />
- <em>Format: <?cs var:milestone.datetime_hint ?></em>
- </label>
- <script type="text/javascript">
- var completed = document.getElementById("completed");
- var enableCompletedDate = function() {
- enableControl("completeddate", completed.checked);
- };
- addEvent(window, "load", enableCompletedDate);
- addEvent(completed, "click", enableCompletedDate);
- </script>
- </div>
- </fieldset>
<div class="field">
<fieldset class="iefix">
- <label for="description">Description (you may use <a tabindex="42" href="<?cs
+ <label for="descr">Description (you may use <a tabindex="42" href="<?cs
var:trac.href.wiki ?>/WikiFormatting">WikiFormatting</a> here):</label>
- <p><textarea id="description" name="description" class="wikitext" rows="10" cols="78"><?cs
- var:milestone.description_source ?></textarea></p>
+ <p><textarea id="descr" name="descr" rows="12" cols="80"><?cs
+ var:milestone.descr_source ?></textarea></p>
+ <?cs call:wiki_toolbar('descr') ?>
</fieldset>
</div>
<div class="buttons">
<?cs if:milestone.mode == "new"
- ?><input type="submit" value="Add milestone" /><?cs
+ ?><input type="submit" name="save" value="Add Milestone" /><?cs
else
- ?><input type="submit" value="Submit changes" /><?cs
+ ?><input type="submit" name="save" value="Save Changes" /><?cs
/if ?>
<input type="submit" name="cancel" value="Cancel" />
</div>
- <script type="text/javascript" src="<?cs
- var:htdocs_location ?>js/wikitoolbar.js"></script>
</form>
<?cs elif:milestone.mode == "delete" ?>
- <form action="<?cs var:milestone.href ?>" method="post">
+ <form action="<?cs var:cgi_location ?>" method="post">
+ <input type="hidden" name="mode" value="milestone" />
<input type="hidden" name="id" value="<?cs var:milestone.name ?>" />
- <input type="hidden" name="action" value="delete" />
+ <input type="hidden" name="action" value="confirm_delete" />
<p><strong>Are you sure you want to delete this milestone?</strong></p>
<input type="checkbox" id="retarget" name="retarget" checked="checked"
onclick="enableControl('target', this.checked)"/>
@@ -96,122 +102,71 @@
</select>
<div class="buttons">
<input type="submit" name="cancel" value="Cancel" />
- <input type="submit" value="Delete milestone" />
+ <input type="submit" name="delete" value="Delete Milestone" />
</div>
</form>
<?cs else ?>
+ <em class="date"><?cs if:milestone.date ?>
+ <?cs var:milestone.date ?><?cs else ?>No date set<?cs /if ?>
+ </em>
+ <div class="descr"><?cs var:milestone.descr ?></div>
+ <?cs /if ?>
+
<?cs if:milestone.mode == "view" ?>
- <div class="info">
- <p class="date"><?cs
- if:milestone.completed_date ?>
- Completed <?cs var:milestone.completed_delta ?> ago (<?cs var:milestone.completed_date ?>)<?cs
- elif:milestone.due_date ?><?cs
- if:milestone.late ?>
- <strong><?cs var:milestone.due_delta ?> late</strong><?cs
- else ?>
- Due in <?cs var:milestone.due_delta ?><?cs
- /if ?> (<?cs var:milestone.due_date ?>)<?cs
- else ?>
- No date set<?cs
- /if ?>
- </p><?cs
- with:stats = milestone.stats ?><?cs
- if:#stats.total_tickets > #0 ?>
- <div class="progress">
- <a class="closed" href="<?cs
- var:milestone.queries.closed_tickets ?>" style="width: <?cs
- var:#stats.percent_closed ?>%" title="<?cs
- var:#stats.closed_tickets ?> of <?cs
- var:#stats.total_tickets ?> ticket<?cs
- if:#stats.total_tickets != #1 ?>s<?cs /if ?> closed"></a>
- <a class="open" href="<?cs
- var:milestone.queries.active_tickets ?>" style="width: <?cs
- var:#stats.percent_active ?>%" title="<?cs
- var:#stats.active_tickets ?> of <?cs
- var:#stats.total_tickets ?> ticket<?cs
- if:#stats.total_tickets != #1 ?>s<?cs /if ?> active"></a>
+ <h2 class="stats">Status by <?cs var:milestone.stats.grouped_by ?></h2>
+ <table class="listing" id="stats"
+ summary="Shows the milestone completion status grouped by <?cs
+ var:milestone.stats.grouped_by ?>">
+ <thead><tr>
+ <th class="name" rowspan="2"><?cs var:milestone.stats.grouped_by ?></th>
+ <th class="tickets" scope="col" colspan="2">Tickets</th>
+ <th class="progress" rowspan="2">Percent Resolved</th>
+ </tr><tr>
+ <th class="open" scope="col">Active</th>
+ <th class="closed" scope="col">Closed</th>
+ </tr></thead>
+ <?cs if:len(milestone.stats.groups) ?><tbody>
+ <?cs each:group = milestone.stats.groups ?>
+ <tr class="<?cs if:name(group) % 2 ?>odd<?cs else ?>even<?cs /if ?>">
+ <th class="name" scope="row"><a href="<?cs
+ var:group.queries.all_tickets ?>"><?cs var:group.name ?></a></th>
+ <td class="open tickets"><a href="<?cs
+ var:group.queries.active_tickets ?>"><?cs
+ var:group.active_tickets ?></a></td>
+ <td class="closed tickets"><a href="<?cs
+ var:group.queries.closed_tickets ?>"><?cs
+ var:group.closed_tickets ?></a></td>
+ <td class="progress">
+ <?cs if:#group.total_tickets ?>
+ <div class="progress" style="width: <?cs
+ var:#group.percent_total * #80 / #100 ?>%"><div style="width: <?cs
+ var:#group.percent_complete ?>%"></div>
+ </div>
+ <p class="percent"><?cs var:#group.percent_complete ?>%</p>
+ <?cs /if ?>
+ </td>
+ </tr>
+ <?cs /each ?>
+ </tbody><?cs /if ?>
+ <tbody class="totals"><tr>
+ <th class="name" scope="row"><a href="<?cs
+ var:milestone.queries.all_tickets ?>">Total</a></th>
+ <td class="open tickets"><a href="<?cs
+ var:milestone.queries.active_tickets ?>"><?cs
+ var:milestone.stats.active_tickets ?></a></td>
+ <td class="closed tickets"><a href="<?cs
+ var:milestone.queries.closed_tickets ?>"><?cs
+ var:milestone.stats.closed_tickets ?></a></td>
+ <td class="progress">
+ <?cs if:#milestone.stats.total_tickets ?>
+ <div class="progress" style="width: 80%">
+ <div style="width: <?cs var:#milestone.stats.percent_complete ?>%"></div>
</div>
- <p class="percent"><?cs var:#stats.percent_closed ?>%</p>
- <dl>
- <dt>Closed tickets:</dt>
- <dd><a href="<?cs var:milestone.queries.closed_tickets ?>"><?cs
- var:stats.closed_tickets ?></a></dd>
- <dt>Active tickets:</dt>
- <dd><a href="<?cs var:milestone.queries.active_tickets ?>"><?cs
- var:stats.active_tickets ?></a></dd>
- </dl><?cs
- /if ?><?cs
- /with ?>
- </div>
- <form id="stats" method="get">
- <fieldset><?cs
- if:milestone.id_param ?>
- <input type="hidden" name="id" value="<?cs var:milestone.name ?>" /><?cs
- /if ?>
- <legend>
- <label for="by">Ticket status by</label>
- <select id="by" name="by" onchange="this.form.submit()"><?cs
- each:group = milestone.stats.available_groups ?>
- <option value="<?cs var:group.name ?>" <?cs
- if:milestone.stats.grouped_by == group.name ?> selected="selected"<?cs
- /if ?>><?cs var:group.label ?></option><?cs
- /each ?></select>
- <noscript><input type="submit" value="Update" /></noscript>
- </legend>
- <table summary="Shows the milestone completion status grouped by <?cs
- var:milestone.stats.grouped_by ?>"><?cs
- each:group = milestone.stats.groups ?>
- <tr>
- <th scope="row"><a href="<?cs
- var:group.queries.all_tickets ?>"><?cs var:group.name ?></a></th>
- <td nowrap=nowrap><?cs if:#group.total_tickets ?>
- <div class="progress" style="width: <?cs
- var:#group.percent_total * #80 / #milestone.stats.max_percent_total ?>%">
- <a class="closed" href="<?cs
- var:group.queries.closed_tickets ?>" style="width: <?cs
- var:#group.percent_closed ?>%" title="<?cs
- var:group.closed_tickets ?> of <?cs
- var:group.total_tickets ?> ticket<?cs
- if:group.total_tickets != #1 ?>s<?cs /if ?> closed"></a>
- <a class="open" href="<?cs
- var:group.queries.active_tickets ?>" style="width: <?cs
- var:#group.percent_active - 1 ?>%" title="<?cs
- var:group.active_tickets ?> of <?cs
- var:group.total_tickets ?> ticket<?cs
- if:group.total_tickets != 1 ?>s<?cs /if ?> active"></a>
- </div>
- <p class="percent"><?cs var:group.closed_tickets ?>/<?cs
- var:group.total_tickets ?></p>
- <?cs /if ?></td>
- </tr><?cs
- /each ?>
- </table><?cs /if ?>
- </fieldset>
- </form>
- <div class="description"><?cs var:milestone.description ?></div><?cs
- if:trac.acl.MILESTONE_MODIFY || trac.acl.MILESTONE_DELETE ?>
- <div class="buttons"><?cs
- if:trac.acl.MILESTONE_MODIFY ?>
- <form method="get" action=""><div>
- <input type="hidden" name="action" value="edit" /><?cs
- if:milestone.id_param ?>
- <input type="hidden" name="id" value="<?cs var:milestone.name ?>" /><?cs
- /if ?>
- <input type="submit" value="Edit milestone info" />
- </div></form><?cs
- /if ?><?cs
- if:trac.acl.MILESTONE_DELETE ?>
- <form method="get" action=""><div>
- <input type="hidden" name="action" value="delete" /><?cs
- if:milestone.id_param ?>
- <input type="hidden" name="id" value="<?cs var:milestone.name ?>" /><?cs
- /if ?>
- <input type="submit" value="Delete milestone" />
- </div></form><?cs
- /if ?>
- </div><?cs
- /if ?><?cs
- /if ?>
+ <p class="percent"><?cs var:#milestone.stats.percent_complete ?>%</p>
+ <?cs /if ?>
+ </td>
+ </tr></tbody>
+ </table><?cs /if ?>
<div id="help">
<strong>Note:</strong> See <a href="<?cs
View
113 django_website/templates/trac_templates/newticket.cs
@@ -1,3 +1,4 @@
+<?cs set:html.stylesheet = 'css/ticket.css' ?>
<?cs include "header.cs" ?>
<?cs include "macros.cs" ?>
<script type="text/javascript">
@@ -8,9 +9,8 @@
<div id="content" class="ticket">
-<h1>Create New Ticket</h1>
-<form id="newticket" method="post" action="<?cs
- var:trac.href.newticket ?>#preview">
+<h3>Create New Ticket:</h3>
+<form id="newticket" action="<?cs var:cgi_location ?>#preview" method="post">
<div class="field">
<label for="reporter">Your email or username:</label><br />
<input type="text" id="reporter" name="reporter" size="40" value="<?cs
@@ -18,20 +18,14 @@
</div>
<div class="field">
<label for="summary">Short summary:</label><br />
- <input id="summary" type="text" name="summary" size="80" value="<?cs
- var:newticket.summary ?>"/>
- </div><?cs
- if:len(newticket.fields.type.options) ?>
- <div class="field"><label for="type">Type:</label> <?cs
- call:hdf_select(newticket.fields.type.options, 'type',
- newticket.type, 0) ?>
- </div><?cs
- /if ?>
+ <input id="summary" type="text" name="summary" size="80" value="<?cs var:newticket.summary ?>"/>
+ </div>
<div class="field">
<label for="description">Full description (you may use <a tabindex="42" href="<?cs
var:$trac.href.wiki ?>/WikiFormatting">WikiFormatting</a> here):</label><br />
- <textarea id="description" name="description" class="wikitext" rows="10" cols="78"><?cs
+ <textarea id="description" name="description" rows="10" cols="78"><?cs
var:newticket.description ?></textarea><?cs
+ call:wiki_toolbar('description') ?><?cs
if:newticket.description_preview ?>
<fieldset id="preview">
<legend>Description Preview</legend>
@@ -42,72 +36,49 @@
<fieldset id="properties">
<legend>Ticket Properties</legend>
+ <input type="hidden" name="mode" value="newticket" />
<input type="hidden" name="action" value="create" />
<input type="hidden" name="status" value="new" />
- <table><tr><?cs set:num_fields = 0 ?><?cs
- each:field = newticket.fields ?><?cs
- if:!field.skip ?><?cs
- set:num_fields = num_fields + 1 ?><?cs
- /if ?><?cs
- /each ?><?cs set:idx = 0 ?><?cs
- each:field = newticket.fields ?><?cs
- if:!field.skip ?><?cs set:fullrow = field.type == 'textarea' ?><?cs
- if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?><th class="col2"></th><td></td></tr><tr><?cs /if ?>
- <th class="col<?cs var:idx % 2 + 1 ?>"><?cs
- if:field.type != 'radio' ?><label for="<?cs var:name(field) ?>"><?cs
- /if ?><?cs alt:field.label ?><?cs var:field.name ?><?cs /alt ?>:<?cs
- if:field.type != 'radio' ?></label><?cs /if ?></th>
- <td<?cs if:fullrow ?> colspan="3"<?cs /if ?>><?cs
- if:field.type == 'text' ?><input type="text" id="<?cs
- var:name(field) ?>" name="<?cs
- var:name(field) ?>" value="<?cs var:newticket[name(field)] ?>" /><?cs
- elif:field.type == 'select' ?><select id="<?cs
- var:name(field) ?>" name="<?cs var:name(field) ?>"><?cs
- if:field.optional ?><option></option><?cs /if ?><?cs
- each:option = field.options ?><option<?cs
- if:option == newticket[name(field)] ?> selected="selected"<?cs /if ?>><?cs
- var:option ?></option><?cs
- /each ?></select><?cs
- elif:field.type == 'checkbox' ?><input type="hidden" name="checkbox_<?cs
- var:name(field) ?>" /><input type="checkbox" id="<?cs
- var:name(field) ?>" name="<?cs
- var:name(field) ?>" value="1"<?cs
- if:newticket[name(field)] ?> checked="checked"<?cs /if ?> /><?cs
- elif:field.type == 'textarea' ?><textarea id="<?cs
- var:name(field) ?>" name="<?cs
- var:name(field) ?>"<?cs
- if:field.height ?> rows="<?cs var:field.height ?>"<?cs /if ?><?cs
- if:field.width ?> cols="<?cs var:field.width ?>"<?cs /if ?>><?cs
- var:newticket[name(field)] ?></textarea><?cs
- elif:field.type == 'radio' ?><?cs set:optidx = 0 ?><?cs
- each:option = field.options ?><label><input type="radio" id="<?cs
- var:name(field) ?>" name="<?cs
- var:name(field) ?>" value="<?cs var:option ?>"<?cs
- if:ticket[name(field)] == option ?> checked="checked"<?cs /if ?> /> <?cs
- var:option ?></label> <?cs set:optidx = optidx + 1 ?><?cs
- /each ?><?cs
- /if ?></td><?cs
- if:idx % 2 || fullrow ?></tr><tr><?cs
- elif:idx == num_fields - 1 ?><th class="col2"></th><td></td><?cs
- /if ?><?cs set:idx = idx + #fullrow + 1 ?><?cs
- /if ?><?cs
- /each ?></tr>
- </table>
+ <div class="col1">
+ <label for="component">Component:</label><?cs
+ call:hdf_select(newticket.components, "component", newticket.component) ?>
+ <br />
+ <label for="version">Version:</label><?cs
+ call:hdf_select(newticket.versions, "version", newticket.version) ?>
+ <br />
+ <label for="severity">Severity:</label><?cs
+ call:hdf_select(enums.severity, "severity", newticket.severity) ?>
+ <br />
+ <label for="keywords">Keywords:</label>
+ <input type="text" id="keywords" name="keywords" size="20"
+ value="<?cs var:newticket.keywords ?>" />
+ </div>
+ <div class="col2">
+ <label for="priority">Priority:</label><?cs
+ call:hdf_select(enums.priority, "priority", newticket.priority) ?><br />
+ <label for="milestone">Milestone:</label><?cs
+ call:hdf_select(newticket.milestones, "milestone", newticket.milestone) ?><br />
+ <label for="owner">Assign to:</label>
+ <input type="text" id="owner" name="owner" size="20" value="<?cs
+ var:newticket.owner ?>" /><br />
+ <label for="cc">Cc:</label>
+ <input type="text" id="cc" name="cc" size="30" value="<?cs var:newticket.cc ?>" />
+ </div>
+ <?cs if:len(ticket.custom) ?><div class="custom">
+ <?cs call:ticket_custom_props(ticket) ?>
+ </div><?cs /if ?>
</fieldset>
- <script type="text/javascript" src="<?cs
- var:htdocs_location ?>js/wikitoolbar.js"></script>
-
<div class="buttons">
- <input type="submit" name="preview" value="Preview" />&nbsp;
- <input type="submit" value="Submit ticket" />
+ <input type="submit" value="Preview" />&nbsp;
+ <input type="submit" name="create" value="Submit ticket" />
</div>
</form>
-<div id="help">
- <strong>Note:</strong> See <a href="<?cs
- var:trac.href.wiki ?>/TracTickets">TracTickets</a> for help on using tickets.
-</div>
+ <div id="help">
+ <strong>Note:</strong> See <a href="<?cs var:$trac.href.wiki
+ ?>/TracTickets">TracTickets</a> for help on using tickets.
+ </div>
</div>
<?cs include "footer.cs" ?>
View
355 django_website/templates/trac_templates/query.cs
@@ -1,231 +1,162 @@
+<?cs set:html.stylesheet = 'css/report.css' ?>
<?cs include:"header.cs" ?>
<?cs include:"macros.cs" ?>
-<div id="ctxtnav" class="nav"><?cs
- if:query.report_href ?><ul>
- <li class="first"><a href="<?cs
- var:query.report_href ?>">Available Reports</a></li>
- <li class="last">Custom Query</li></ul><?cs
- /if ?>
-</div>
+<div id="ctxtnav" class="nav"><?cs if:query.edit_href ?>
+ <ul>
+ <li class="last"><a href="<?cs var:query.edit_href ?>">Refine Query</a></li>
+ </ul>
+<?cs /if ?></div>
<div id="content" class="query">
- <h1><?cs var:title ?> <span class="numrows">(<?cs alt:len(query.results) ?>No<?cs /alt ?> match<?cs
- if:len(query.results) != 1 ?>es<?cs /if ?>)</span></h1>
+ <h1><?cs var:title ?></h1>
+
+<?cs if:query.action == 'edit' ?>
-<form id="query" method="post" action="<?cs var:trac.href.query ?>">
- <fieldset id="filters">
- <legend>Filters</legend>
- <?cs def:checkbox_checked(constraint, option) ?><?cs
- each:value = constraint.values ?><?cs
- if:value == option ?> checked="checked"<?cs
+<form id="query" action="<?cs var:cgi_location ?>" method="post">
+ <fieldset>
+ <input type="hidden" name="mode" value="query" />
+ <input type="hidden" name="order" value="<?cs var:query.order ?>" />
+ <?cs if:query.desc ?><input type="hidden" name="desc" value="1" /><?cs /if ?>
+ <legend>Ticket Properties</legend>
+ <div>
+ <label for="component" accesskey="c">Component:</label>
+ <?cs call:hdf_select_multiple(query.options.component, 'component', 4) ?>
+ </div>
+ <div>
+ <label for="version" accesskey="v">Version:</label>
+ <?cs call:hdf_select_multiple(query.options.version, 'version', 4) ?>
+ </div>
+ <div>
+ <label for="severity" accesskey="e">Severity:</label>
+ <?cs call:hdf_select_multiple(query.options.severity, 'severity', 4) ?>
+ </div>
+ <br />
+ <div>
+ <label for="keywords">Keywords contain:</label>
+ <input type="text" name="keywords" id="keywords" accesskey="k" value="<?cs
+ var:query.constraints.keywords.0 ?>" />
+ </div>
+ <br />
+ <div>
+ <label for="status" accesskey="s">Status:</label>
+ <?cs call:hdf_select_multiple(query.options.status, 'status', 4) ?>
+ </div>
+ <div>
+ <label for="resolution" accesskey="r">Resolution:</label>
+ <?cs call:hdf_select_multiple(query.options.resolution, 'resolution', 4) ?>
+ <script type="text/javascript">
+ var status = document.getElementById("status");
+ var updateResolution = function() {
+ enableControl('resolution', status.selectedIndex == -1 ||
+ status.selectedIndex >= 3);
+ };
+ addEvent(window, 'load', updateResolution);
+ addEvent(status, 'change', updateResolution);
+ </script>
+ </div>
+ <div>
+ <label for="milestone" accesskey="m">Milestone:</label>
+ <?cs call:hdf_select_multiple(query.options.milestone, 'milestone', 4) ?>
+ </div>
+ <div>
+ <label for="priority" accesskey="p">Priority:</label>
+ <?cs call:hdf_select_multiple(query.options.priority, 'priority', 4) ?>
+ </div>
+ <br />
+ <div>
+ <label for="owner">Assigned to:</label>
+ <input type="text" name="owner" id="owner" accesskey="a" value="<?cs
+ var:query.constraints.owner.0 ?>" />
+ </div>
+ <div>
+ <label for="reporter">Reported by:</label>
+ <input type="text" name="reporter" id="reporter" accesskey="b" value="<?cs
+ var:query.constraints.reporter.0 ?>" />
+ </div>
+ <div>
+ <label for="cc">Cc contains:</label>
+ <input type="text" name="cc" id="cc" value="<?cs
+ var:query.constraints.cc.0 ?>" />
+ </div>
+ <?cs if:len(query.custom) ?><?cs set:idx = 0 ?><?cs
+ each:custom = query.custom ?><?cs
+ if:custom.type == 'select' || custom.type == 'radio' ?>
+ <?cs if:idx == 0 ?><br /><?cs /if ?><div>
+ <label for="<?cs var:custom.name ?>"><?cs var:custom.label ?></label>
+ <?cs call:hdf_select_multiple(custom.options, custom.name, 4) ?>
+ </div><?cs set:idx = idx + 1 ?><?cs
/if ?><?cs
- /each ?><?cs
- /def ?><?cs
- def:option_selected(constraint, option) ?><?cs
- each:value = constraint.values ?><?cs
- if:value == option ?> selected="selected"<?cs
+ /each ?><?cs set:idx = 0 ?><?cs
+ each:custom = query.custom ?><?cs
+ if:custom.type == 'text' ?>
+ <?cs if:idx == 0 ?><br /><?cs /if ?><div>
+ <label for="<?cs var:custom.name ?>"><?cs var:custom.label ?></label>
+ <input type="text" name="<?cs var:custom.name ?>" id="<?cs
+ var:custom.name ?>" value="<?cs var:query[custom.name] ?>" />
+ </div><?cs set:idx = idx + 1 ?><?cs
/if ?><?cs
/each ?><?cs
- /def ?>
- <table summary="Query filters"><?cs each:field = query.fields ?><?cs
- each:constraint = query.constraints ?><?cs
- if:name(field) == name(constraint) ?>
- <tbody><tr class="<?cs var:name(field) ?>">
- <th scope="row"><label><?cs var:field.label ?></label></th><?cs
- if:field.type != "radio" ?>
- <td class="mode">
- <select name="<?cs var:name(field) ?>_mode"><?cs
- each:mode = query.modes[field.type] ?>
- <option value="<?cs var:mode.value ?>"<?cs
- if:mode.value == constraint.mode ?> selected="selected"<?cs
- /if ?>><?cs var:mode.name ?></option><?cs
- /each ?>
- </select>
- </td><?cs
- /if ?>
- <td class="filter"<?cs if:field.type == "radio" ?> colspan="2"<?cs /if ?>><?cs
- if:field.type == "select" ?><?cs
- each:value = constraint.values ?>
- <select name="<?cs var:name(constraint) ?>"><option></option><?cs
- each:option = field.options ?>
- <option<?cs if:option == value ?> selected="selected"<?cs /if ?>><?cs
- var:option ?></option><?cs
- /each ?></select><?cs
- if:name(value) != len(constraint.values) - 1 ?>
- </td>
- <td class="actions"><input type="submit" name="rm_filter_<?cs
- var:name(field) ?>_<?cs var:name(value) ?>" value="-" /></td>
- </tr><tr class="<?cs var:name(field) ?>">
- <th colspan="2"><label>or</label></th>
- <td class="filter"><?cs
- /if ?><?cs
- /each ?><?cs
- elif:field.type == "radio" ?><?cs
- each:option = field.options ?>
- <input type="checkbox" id="<?cs var:name(field) ?>_<?cs
- var:option ?>" name="<?cs var:name(field) ?>" value="<?cs
- var:option ?>"<?cs call:checkbox_checked(constraint, option) ?> />
- <label for="<?cs var:name(field) ?>_<?cs var:option ?>"><?cs
- alt:option ?>none<?cs /alt ?></label><?cs
- /each ?><?cs
- elif:field.type == "text" ?><?cs
- each:value = constraint.values ?>
- <input type="text" name="<?cs var:name(field) ?>" value="<?cs
- var:value ?>" size="42" /><?cs
- if:name(value) != len(constraint.values) - 1 ?>
- </td>
- <td class="actions"><input type="submit" name="rm_filter_<?cs
- var:name(field) ?>_<?cs var:name(value) ?>" value="-" /></td>
- </tr><tr class="<?cs var:name(field) ?>">
- <th colspan="2"><label>or</label></th>
- <td class="filter"><?cs
- /if ?><?cs
- /each ?><?cs
- /if ?>
- </td>
- <td class="actions"><input type="submit" name="rm_filter_<?cs
- var:name(field) ?><?cs
- if:field.type != 'radio' ?>_<?cs
- var:len(constraint.values) - 1 ?><?cs
- /if ?>" value="-" /></td>
- </tr></tbody><?cs /if ?><?cs
- /each ?><?cs
- /each ?>
- <tbody><tr class="actions">
- <td class="actions" colspan="4" style="text-align: right">
- <label for="add_filter">Add filter</label>&nbsp;
- <select name="add_filter" id="add_filter">
- <option></option><?cs
- each:field = query.fields ?>
- <option value="<?cs var:name(field) ?>"<?cs
- if:field.type == "radio" ?><?cs
- if:len(query.constraints[name(field)]) != 0 ?> disabled="disabled"<?cs
- /if ?><?cs
- /if ?>><?cs var:field.label ?></option><?cs
- /each ?>
- </select>
- <input type="submit" name="add" value="+" />
- </td>
- </tr></tbody>
- </table>
+ /if ?>
+ <br />
</fieldset>
- <p class="option">
- <label for="group">Group results by</label>
- <select name="group" id="group">
- <option></option><?cs
- each:field = query.fields ?><?cs
- if:field.type == 'select' || field.type == 'radio' ||
- name(field) == 'owner' ?>
- <option value="<?cs var:name(field) ?>"<?cs
- if:name(field) == query.group ?> selected="selected"<?cs /if ?>><?cs
- var:field.label ?></option><?cs
- /if ?><?cs
- /each ?>
- </select>
- <input type="checkbox" name="groupdesc" id="groupdesc"<?cs
- if:query.groupdesc ?> checked="checked"<?cs /if ?> />
- <label for="groupdesc">descending</label>
- <script type="text/javascript">
- var group = document.getElementById("group");
- var updateGroupDesc = function() {
- enableControl('groupdesc', group.selectedIndex > 0);
- }
- addEvent(window, 'load', updateGroupDesc);
- addEvent(group, 'change', updateGroupDesc);
- </script>
- </p>
- <p class="option">
- <input type="checkbox" name="verbose" id="verbose"<?cs
- if:query.verbose ?> checked="checked"<?cs /if ?> />
- <label for="verbose">Show full description under each result</label>
- </p>
<div class="buttons">
- <input type="hidden" name="order" value="<?cs var:query.order ?>" />
- <?cs if:query.desc ?><input type="hidden" name="desc" value="1" /><?cs /if ?>
- <input type="submit" name="update" value="Update" />
+ <input type="submit" name="search" value="Search">
</div>
- <hr />
</form>
-<script type="text/javascript" src="<?cs
- var:htdocs_location ?>js/query.js"></script>
-<script type="text/javascript"><?cs set:idx = 0 ?>
- var properties={<?cs each:field = query.fields ?><?cs
- var:name(field) ?>:{type:"<?cs var:field.type ?>",label:"<?cs
- var:field.label ?>",options:[<?cs
- each:option = field.options ?>"<?cs var:option ?>"<?cs
- if:name(option) < len(field.options) -1 ?>,<?cs /if ?><?cs
- /each ?>]}<?cs
- set:idx = idx + 1 ?><?cs if:idx < len(query.fields) ?>,<?cs /if ?><?cs
- /each ?>};<?cs set:idx = 0 ?>
- var modes = {<?cs each:type = query.modes ?><?cs var:name(type) ?>:[<?cs
- each:mode = type ?>{text:"<?cs var:mode.name ?>",value:"<?cs var:mode.value ?>"}<?cs
- if:name(mode) < len(type) -1 ?>,<?cs /if ?><?cs
- /each ?>]<?cs
- set:idx = idx + 1 ?><?cs if:idx < len(query.modes) ?>,<?cs /if ?><?cs
- /each ?>};
- initializeFilters();
-</script>
-<?cs def:thead() ?>
- <thead><tr><?cs each:header = query.headers ?><?cs
- if:name(header) == 0 ?><?cs
- call:sortable_th(query.order, query.desc, 'id', 'ticket', query.href) ?><?cs
- else ?><?cs
- call:sortable_th(query.order, query.desc, header.name, header.name, query.href) ?><?cs
- /if ?>
- <?cs /each ?></tr></thead>
-<?cs /def ?>
+<?cs else ?>
-<?cs if:len(query.results) ?><?cs
- if:!query.group ?>
- <table class="listing tickets">
- <?cs call:thead() ?><tbody><?cs
- /if ?><?cs
- each:result = query.results ?><?cs
- if:result[query.group] != prev_group ?>
- <?cs if:prev_group ?></tbody></table><?cs /if ?>
- <h2><?cs