2008-11-18 08:15:02 +00:00
{extends "idf/issues/base.html"}
2011-01-04 15:51:33 +00:00
{block titleicon}{if $form}< form class = "star" method = "post" action = "{url 'IDF_Views_Issue::star', array($project.shortname, $issue.id)}" > < input type = "image" src = "{if $starred}{media '/idf/img/star.png'}{else}{media '/idf/img/star-grey.png'}{/if}" name = "submit" title = "{if $starred}{trans 'Remove this issue from your watch list'}{else}{trans 'Add this issue to your watch list'}{/if}" / > < / form > {/if}{/block}
2008-07-25 08:26:05 +00:00
{block body}
2011-03-18 01:14:22 +00:00
< div class = "issue-prev-next" >
2011-01-06 21:38:38 +00:00
{if $previous_issue_id}
< a href = "{url 'IDF_Views_Issue::view', array($project.shortname, $previous_issue_id)}" title = "{if $closed}{trans 'Click here to view the previous closed issue'}{else}{trans 'Click here to view the previous open issue'}{/if}" > Previous issue< / a >
{/if}
{if $previous_issue_id and $next_issue_id} - {/if}
{if $next_issue_id}
< a href = "{url 'IDF_Views_Issue::view', array($project.shortname, $next_issue_id)}" title = "{if $closed}{trans 'Click here to view the next closed issue'}{else}{trans 'Click here to view the next open issue'}{/if}" > Next issue< / a >
{/if}
< / div >
2010-12-02 00:50:01 +00:00
{assign $i = 0}
{assign $nc = $comments.count()}
2010-12-05 00:22:32 +00:00
{foreach $comments as $c}{ashowuser 'submitter', $c.get_submitter(), $request}
{assign $submitter = $c.get_submitter()}
{assign $submitter_data = $c.get_submitter_data()}
< div class = "issue-comment{if $i == 0} issue-comment-first{/if}{if $i == ($nc-1)} issue-comment-last{/if}" id = "ic{$c.id}" >
{if $submitter_data.avatar != ''}
< img style = "float:right; position: relative; max-height: 60px; max-width: 60px;" src = "{media}/upload/avatars/{$submitter_data.avatar}" alt = " " / >
{else}
< img style = "float:right; position: relative; max-height: 60px; max-width: 60px;" src = "http://www.gravatar.com/avatar/{$submitter.email|md5}.jpg?s=60&d={media}/idf/img/spacer.gif" alt = " " / >
{/if}
2008-08-12 20:17:49 +00:00
{if $i == 0}
2008-12-05 13:51:51 +00:00
< p > {blocktrans}Reported by {$submitter}, {$c.creation_dtime|date}{/blocktrans}< / p >
2008-08-12 20:17:49 +00:00
{else}
2008-07-25 08:26:05 +00:00
{aurl 'url', 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}
{assign $id = $c.id}
{assign $url = $url~'#ic'~$c.id}
2008-12-05 13:51:51 +00:00
< p > {blocktrans}Comment < a href = "{$url}" > {$i}< / a > by {$submitter}, {$c.creation_dtime|date}{/blocktrans}< / p >
2008-07-25 08:26:05 +00:00
{/if}
2008-12-01 13:30:00 +00:00
2009-10-01 12:24:36 +00:00
{if strlen($c.content) > 0}< pre class = "issue-comment-text" > {issuetext $c.content, $request}< / pre > {/if}
2008-11-12 19:40:58 +00:00
{assign $attachments = $c.get_attachment_list()}
{if $attachments.count() > 0}
2008-11-16 11:19:30 +00:00
< hr align = "left" class = "attach" / >
2008-11-12 19:40:58 +00:00
< ul >
2010-12-02 00:50:01 +00:00
{foreach $attachments as $a}< li > < a href = "{url 'IDF_Views_Issue::getAttachment', array($project.shortname, $a.id, $a.filename)}" title = "{trans 'download'}" > {$a.filename}< / a > - {$a.filesize|size}{if $a.isText()} - < a href = "{url 'IDF_Views_Issue::viewAttachment', array($project.shortname, $a.id, $a.filename)}" > {trans 'view'}< / a > {/if}< / li > {/foreach}< / ul > {/if}
2008-07-25 08:26:05 +00:00
{if $i> 0 and $c.changedIssue()}
2010-12-02 00:50:01 +00:00
< div class = "issue-changes" >
2008-07-25 08:26:05 +00:00
{foreach $c.changes as $w => $v}
< 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 / >
{/foreach}
2010-12-02 00:50:01 +00:00
< / div >
2008-07-25 08:26:05 +00:00
{/if}
< / div > {assign $i = $i + 1}{if $i == $nc and false == $form}
< div class = "issue-comment-signin" >
{aurl 'url', 'IDF_Views::login'}{blocktrans}< a href = "{$url}" > Sign in< / a > to reply to this comment.{/blocktrans}
< / div >
{/if}
{/foreach}
{if $form}
< hr / >
{if $form.errors}
< div class = "px-message-error" >
< p > {trans 'The form contains some errors. Please correct them to change the issue.'}< / p >
{if $form.get_top_errors}
{$form.render_top_errors|unsafe}
{/if}
< / div >
{/if}
2008-08-13 19:20:47 +00:00
{if $closed and (!$isOwner and !$isMember)}
< p > < img src = "{media '/idf/img/warning.png'}" style = "vertical-align: text-bottom;" alt = " " / > {blocktrans}This issue is marked as closed, add a comment only if you think this issue is still valid and more work is needed to fully fix it.{/blocktrans}< / p >
2009-02-27 13:21:09 +00:00
{/if}
2008-08-13 19:20:47 +00:00
2009-02-27 13:21:09 +00:00
{if $preview}
2009-05-26 09:48:02 +00:00
< h2 id = "preview" > {trans 'Preview'}< / h2 >
2009-02-27 13:21:09 +00:00
< div class = "issue-comment issue-comment-first issue-comment-last" >
< br / > < pre class = "issue-comment-text" > {issuetext $preview, $request}< / pre >
< / div >
< hr / >
2008-08-13 19:20:47 +00:00
{/if}
2009-02-27 13:21:09 +00:00
2008-07-25 08:26:05 +00:00
< form method = "post" enctype = "multipart/form-data" action = "{url 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}" >
< table class = "form" summary = "" >
< tr >
< th > < strong > {$form.f.content.labelTag}:< / strong > < / th >
< td > {if $form.f.content.errors}{$form.f.content.fieldErrors}{/if}
{$form.f.content|unsafe}
< / td >
< / tr >
2008-11-27 10:10:23 +00:00
< tr id = "form-attachment-1" >
< th > {$form.f.attachment1.labelTag}:< / th >
< td > {if $form.f.attachment1.errors}{$form.f.attachment1.fieldErrors}{/if}
{$form.f.attachment1|unsafe}
< / td >
< / tr >
< tr id = "form-attachment-2" >
< th > {$form.f.attachment2.labelTag}:< / th >
< td > {if $form.f.attachment2.errors}{$form.f.attachment2.fieldErrors}{/if}
{$form.f.attachment2|unsafe}
< / td >
< / tr >
< tr id = "form-attachment-3" >
< th > {$form.f.attachment3.labelTag}:< / th >
< td > {if $form.f.attachment3.errors}{$form.f.attachment3.fieldErrors}{/if}
{$form.f.attachment3|unsafe}
2008-11-12 19:40:58 +00:00
< / td >
< / tr > {if $isOwner or $isMember}
2008-07-25 08:26:05 +00:00
< tr >
< th > < strong > {$form.f.summary.labelTag}:< / strong > < / th >
< td > {if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if}
{$form.f.summary|unsafe}
< / td >
< / tr >
< tr >
< th > < strong > {$form.f.status.labelTag}:< / strong > < / th >
< td > {if $form.f.status.errors}{$form.f.status.fieldErrors}{/if}
{$form.f.status|unsafe}
< / td >
< / tr >
< tr >
< th > {$form.f.owner.labelTag}:< / th >
< td > {if $form.f.owner.errors}{$form.f.owner.fieldErrors}{/if}
{$form.f.owner|unsafe}
< / td >
< / tr >
< tr >
2011-05-10 14:21:29 +00:00
< th > {$form.f.relation_type.labelTag}:< / th >
< td >
{if $form.f.relation_type.errors}{$form.f.relation_type.fieldErrors}{/if}
{if $form.f.relation_issue.errors}{$form.f.relation_issue.fieldErrors}{/if}
{$form.f.relation_type|unsafe}
{$form.f.relation_issue|unsafe}
< / td >
< / tr >
< tr >
2008-07-25 08:26:05 +00:00
< th > {$form.f.label1.labelTag}:< / th >
< td >
{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe}
{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe}
{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}< br / >
{if $form.f.label4.errors}{$form.f.label4.fieldErrors}{/if}{$form.f.label4|unsafe}
{if $form.f.label5.errors}{$form.f.label5.fieldErrors}{/if}{$form.f.label5|unsafe}
{if $form.f.label6.errors}{$form.f.label6.fieldErrors}{/if}{$form.f.label6|unsafe}
< / td >
< / tr > {/if}
< tr >
< td > < / td >
2009-02-27 13:21:09 +00:00
< td >
< input type = "submit" value = "{trans 'Submit Changes'}" name = "submit" / >
2010-12-02 00:50:01 +00:00
< input type = "submit" value = "{trans 'Preview'}" name = "preview" / > |
2009-02-27 13:21:09 +00:00
< a href = "{url 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}" > {trans 'Cancel'}< / a >
2008-07-25 08:26:05 +00:00
< / td >
< / tr >
< / table >
< / form >
{/if}
{/block}
{block context}
< div class = "issue-info" >
2008-12-05 13:51:51 +00:00
{ashowuser 'submitter', $issue.get_submitter(), $request}
< p > < strong > {trans 'Created:'}< / strong > < span class = "nobrk" > {$issue.creation_dtime|dateago}< / span > < span class = "nobrk" > {blocktrans}by {$submitter}{/blocktrans}< / span > < / p >
2008-08-07 17:44:59 +00:00
{if $issue.modif_dtime != $issue.creation_dtime}< p >
< strong > {trans 'Updated:'}< / strong > < span class = "nobrk" > {$issue.modif_dtime|dateago}< / span > < / p > {/if}
2008-07-25 08:26:05 +00:00
< p >
< strong > {trans 'Status:'}< / strong > {$issue.get_status.name}< / p >
2008-12-05 13:51:51 +00:00
{if $issue.get_owner != null}< p >
< strong > {trans 'Owner:'}< / strong > {showuser $issue.get_owner(), $request}
2009-01-31 21:23:49 +00:00
< / p > {/if}
{if $interested > 0}< p > < strong > {trans 'Followed by:'}< / strong > {blocktrans $interested}{$interested} person{plural}{$interested} persons{/blocktrans}< / p > {/if}
{assign $tags = $issue.get_tags_list()}{if $tags.count()}
2008-07-25 08:26:05 +00:00
< p >
< strong > {trans 'Labels:'}< / strong > < br / >
2008-08-03 22:42:05 +00:00
{foreach $tags as $tag}{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $tag.id, 'open')}
2008-07-25 08:26:05 +00:00
< span class = "label" > < a href = "{$url}" class = "label" > < strong > {$tag.class}:< / strong > {$tag.name}< / a > < / span > < br / >
{/foreach}
< / p > {/if}
2011-05-28 21:48:00 +00:00
{if count($related_issues) > 0}
{foreach $related_issues as $verb => $rel_issues}
< strong > {blocktrans}This issue {$verb}{/blocktrans}< / strong > < br / >
{foreach $rel_issues as $rel_issue}
< span class = "label" >
< a href = "{url 'IDF_Views_Issue::view', array($project.shortname, $rel_issue.other_issue)}"
title="{$rel_issue.other_summary}">
< strong > {$rel_issue.other_issue}< / strong > - {$rel_issue.other_summary|shorten:30}
< / a >
< / span > < br / >
{/foreach}
{/foreach}
{/if}
2008-07-25 08:26:05 +00:00
< / div >
{/block}
2008-11-27 10:10:23 +00:00
{block javascript}{if $form}{include 'idf/issues/js-autocomplete.html'}
< script type = "text/javascript" >
{literal}
$(document).ready(function(){
// Hide the upload forms, we insert before the first attach file
// row an "Attach File" little link.
// We hide all the rows.
$("#form-attachment-1").before("{/literal}< tr id = \"form-block-0\" > < td > < / td > < td > < img style = \"vertical-align: text-bottom ; \ " src = \"{media ' / idf / img / attachment . png ' } \ " alt = \" \ " align = \"bottom\" / > < a id = \"form-show-0\" href = \"#\" > {trans 'Attach file'}{literal}< / a > < / td > < / tr > ");
$("#form-show-0").click(function(){
$("#form-attachment-1").show();
$("#form-block-0").hide();
2009-06-29 19:23:58 +00:00
return false;
2008-11-27 10:10:23 +00:00
});
$("#form-attachment-1 td").append("< span id = \"form-block-1\" > < a id = \"form-show-1\" href = \"#\" > {/literal}{trans 'Attach another file'}{literal}< / a > < / span > ");
$("#form-show-1").click(function(){
$("#form-attachment-2").show();
$("#form-block-1").hide();
2009-06-29 19:23:58 +00:00
return false;
2008-11-27 10:10:23 +00:00
});
$("#form-attachment-2 td").append("< span id = \"form-block-2\" > < a id = \"form-show-2\" href = \"#\" > {/literal}{trans 'Attach another file'}{literal}< / a > < / span > ");
$("#form-show-2").click(function(){
$("#form-attachment-3").show();
$("#form-block-2").hide();
2009-06-29 19:23:58 +00:00
return false;
2008-11-27 10:10:23 +00:00
});
var j=0;
for (j=1;j< 4 ; j = j+1) {
$("#form-attachment-"+j).hide();
}
});{/literal}
< / script >
{/if}{/block}