Root/
| Source at commit 7383e18dff19e7e6a1e56d55cdfbfa109e91bfb3 created 2 years 1 month ago. By Loic d'Anterroches, Fixed issue 4, with fine control over the tabs access. | |
|---|---|
| 1 | {extends "issues/base.html"} |
| 2 | {block body} |
| 3 | {assign $i = 0} |
| 4 | {assign $nc = $comments.count()} |
| 5 | {foreach $comments as $c} |
| 6 | <div class="issue-comment{if $i == 0} issue-comment-first{/if}{if $i == ($nc-1)} issue-comment-last{/if}" id="ic{$c.id}"> |
| 7 | {if $i == 0}{assign $who = $issue.get_submitter()} |
| 8 | <p>{blocktrans}Reported by {$who}, {$c.creation_dtime|date}{/blocktrans}</p> |
| 9 | {else}{assign $who = $c.get_submitter()} |
| 10 | {aurl 'url', 'IDF_Views_Issue::view', array($project.shortname, $issue.id)} |
| 11 | {assign $id = $c.id} |
| 12 | {assign $url = $url~'#ic'~$c.id} |
| 13 | <p>{blocktrans}Comment <a href="{$url}">{$i}</a> by {$who}, {$c.creation_dtime|date}{/blocktrans}</p> |
| 14 | {/if} |
| 15 | |
| 16 | <pre class="issue-comment-text">{if strlen($c.content) > 0}{issuetext $c.content, $request}{else}<i>{trans '(No comments were given for this change.)'}</i>{/if}</pre> |
| 17 | |
| 18 | {if $i> 0 and $c.changedIssue()} |
| 19 | <div class="issue-changes"> |
| 20 | {foreach $c.changes as $w => $v} |
| 21 | <strong>{if $w == 'su'}{trans 'Summary:'}{/if}{if $w == 'st'}{trans 'Status:'}{/if}{if $w == 'ow'}{trans 'Owner:'}{/if}{if $w == 'lb'}{trans 'Labels:'}{/if}</strong> {if $w == 'lb'}{assign $l = implode(', ', $v)}{$l}{else}{$v}{/if}<br /> |
| 22 | {/foreach} |
| 23 | </div> |
| 24 | {/if} |
| 25 | </div>{assign $i = $i + 1}{if $i == $nc and false == $form} |
| 26 | <div class="issue-comment-signin"> |
| 27 | {aurl 'url', 'IDF_Views::login'}{blocktrans}<a href="{$url}">Sign in</a> to reply to this comment.{/blocktrans} |
| 28 | </div> |
| 29 | {/if} |
| 30 | {/foreach} |
| 31 | |
| 32 | {if $form} |
| 33 | <hr /> |
| 34 | |
| 35 | {if $form.errors} |
| 36 | <div class="px-message-error"> |
| 37 | <p>{trans 'The form contains some errors. Please correct them to change the issue.'}</p> |
| 38 | {if $form.get_top_errors} |
| 39 | {$form.render_top_errors|unsafe} |
| 40 | {/if} |
| 41 | </div> |
| 42 | {/if} |
| 43 | |
| 44 | <form method="post" enctype="multipart/form-data" action="{url 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}" > |
| 45 | <table class="form" summary=""> |
| 46 | <tr> |
| 47 | <th><strong>{$form.f.content.labelTag}:</strong></th> |
| 48 | <td>{if $form.f.content.errors}{$form.f.content.fieldErrors}{/if} |
| 49 | {$form.f.content|unsafe} |
| 50 | </td> |
| 51 | </tr> |
| 52 | {if $isOwner or $isMember} |
| 53 | <tr> |
| 54 | <th><strong>{$form.f.summary.labelTag}:</strong></th> |
| 55 | <td>{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if} |
| 56 | {$form.f.summary|unsafe} |
| 57 | </td> |
| 58 | </tr> |
| 59 | <tr> |
| 60 | <th><strong>{$form.f.status.labelTag}:</strong></th> |
| 61 | <td>{if $form.f.status.errors}{$form.f.status.fieldErrors}{/if} |
| 62 | {$form.f.status|unsafe} |
| 63 | </td> |
| 64 | </tr> |
| 65 | <tr> |
| 66 | <th>{$form.f.owner.labelTag}:</th> |
| 67 | <td>{if $form.f.owner.errors}{$form.f.owner.fieldErrors}{/if} |
| 68 | {$form.f.owner|unsafe} |
| 69 | </td> |
| 70 | </tr> |
| 71 | <tr> |
| 72 | <th>{$form.f.label1.labelTag}:</th> |
| 73 | <td> |
| 74 | {if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe} |
| 75 | {if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe} |
| 76 | {if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}<br /> |
| 77 | {if $form.f.label4.errors}{$form.f.label4.fieldErrors}{/if}{$form.f.label4|unsafe} |
| 78 | {if $form.f.label5.errors}{$form.f.label5.fieldErrors}{/if}{$form.f.label5|unsafe} |
| 79 | {if $form.f.label6.errors}{$form.f.label6.fieldErrors}{/if}{$form.f.label6|unsafe} |
| 80 | </td> |
| 81 | </tr>{/if} |
| 82 | <tr> |
| 83 | <td> </td> |
| 84 | <td><input type="submit" value="{trans 'Submit Changes'}" name="submit" /> | <a href="{url 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}">{trans 'Cancel'}</a> |
| 85 | </td> |
| 86 | </tr> |
| 87 | </table> |
| 88 | </form> |
| 89 | {/if} |
| 90 | {/block} |
| 91 | {block context} |
| 92 | <div class="issue-info"> |
| 93 | {assign $submitter = $issue.get_submitter()} |
| 94 | <p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$issue.creation_dtime|dateago}</span> <span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p> |
| 95 | <p> |
| 96 | <strong>{trans 'Updated:'}</strong> <span class="nobrk">{$issue.modif_dtime|dateago}</span></p> |
| 97 | <p> |
| 98 | <strong>{trans 'Status:'}</strong> {$issue.get_status.name}</p> |
| 99 | <p> |
| 100 | <strong>{trans 'Owner:'}</strong> {if $issue.get_owner == null}{trans 'No owner'}{else}{$issue.get_owner}{/if} |
| 101 | </p>{assign $tags = $issue.get_tags_list()}{if $tags.count()} |
| 102 | <p> |
| 103 | <strong>{trans 'Labels:'}</strong><br /> |
| 104 | {foreach $tags as $tag}{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $tag.id, 'open')} |
| 105 | <span class="label"><a href="{$url}" class="label"><strong>{$tag.class}:</strong>{$tag.name}</a></span><br /> |
| 106 | {/foreach} |
| 107 | </p>{/if} |
| 108 | </div> |
| 109 | {/block} |
| 110 | {block javascript}{if $form}{include 'issues/js-autocomplete.html'}{/if}{/block} |
| 111 | |
