Added ticket 86, preview attached files to issues.
This commit is contained in:
26
src/IDF/templates/idf/issues/attachment.html
Normal file
26
src/IDF/templates/idf/issues/attachment.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{extends "idf/issues/base.html"}
|
||||
{block extraheader}<link rel="stylesheet" type="text/css" href="{media '/idf/css/prettify.css'}" />{/block}
|
||||
{block docclass}yui-t2{assign $inIssue=true}{/block}
|
||||
{block body}
|
||||
<table class="code" summary=" ">
|
||||
<tbody>
|
||||
{$file}
|
||||
</tbody>
|
||||
</table>
|
||||
{aurl 'url', 'IDF_Views_Issue::getAttachment', array($project.shortname, $attachment.id, $attachment.filename)}
|
||||
<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download this file'}</a></p>
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
{aurl 'url', 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}
|
||||
{assign $url = $url~'#ic'~$comment.id}
|
||||
<p>{blocktrans}Attachment to issue <a href="{$url}">{$issue.id}</a>{/blocktrans}</p>
|
||||
{ashowuser 'submitter', $attachment.get_submitter(), $request}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$attachment.creation_dtime|dateago}</span> <span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
|
||||
{/block}
|
||||
|
||||
{block javascript}
|
||||
<script type="text/javascript" src="{media '/idf/js/prettify.js'}"></script>
|
||||
<script type="text/javascript">prettyPrint();</script>
|
||||
{/block}
|
@@ -8,6 +8,10 @@
|
||||
<input accesskey="4" type="text" value="{$q}" name="q" size="20" />
|
||||
<input type="submit" name="s" value="{trans 'Search'}" />
|
||||
</form>
|
||||
{if $inIssue} |
|
||||
{aurl 'url', 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}
|
||||
<a href="{$url}">{trans 'Back to the issue'}</a>
|
||||
{/if}
|
||||
{superblock}
|
||||
</div>
|
||||
{/block}
|
||||
|
@@ -16,7 +16,7 @@ to you:{/blocktrans}
|
||||
{if $attachments.count() > 0}
|
||||
{trans 'Attachments:'}{foreach $attachments as $a}
|
||||
- {$a.filename|safe} - {$a.filesize|ssize}
|
||||
{$url_base}{url 'IDF_Views_Issue::getAttachment', array($project.shortname, $a.id, $a.filename)}{/foreach}
|
||||
{$url_base}{url 'IDF_Views_Issue::viewAttachment', array($project.shortname, $a.id, $a.filename)}{/foreach}
|
||||
{/if}
|
||||
--
|
||||
{trans 'Issue:'} {$url_base}{url 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
{trans 'Attachments:'}{foreach $attachments as $a}
|
||||
- {$a.filename|safe} - {$a.filesize|ssize}
|
||||
{$url_base}{url 'IDF_Views_Issue::getAttachment', array($project.shortname, $a.id, $a.filename)}{/foreach}
|
||||
{$url_base}{url 'IDF_Views_Issue::viewAttachment', array($project.shortname, $a.id, $a.filename)}{/foreach}
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
{if $attachments.count() > 0}
|
||||
<hr align="left" class="attach" />
|
||||
<ul>
|
||||
{foreach $attachments as $a}<li><a href="{url 'IDF_Views_Issue::getAttachment', array($project.shortname, $a.id, $a.filename)}">{$a.filename}</a> - {$a.filesize|size}</li>{/foreach}
|
||||
{foreach $attachments as $a}<li><a href="{url 'IDF_Views_Issue::viewAttachment', array($project.shortname, $a.id, $a.filename)}">{$a.filename}</a> - {$a.filesize|size}</li>{/foreach}
|
||||
</ul>{/if}
|
||||
{if $i> 0 and $c.changedIssue()}
|
||||
<div class="issue-changes">
|
||||
|
Reference in New Issue
Block a user