2008-11-18 08:15:02 +00:00
{extends "idf/downloads/base.html"}
2008-08-03 22:42:05 +00:00
{block docclass}yui-t3{assign $inDownloads=true}{/block}
{block body}
< div class = "download-file" >
2008-08-06 20:30:44 +00:00
{if $deprecated}< p class = "smaller" > {blocktrans}< strong > Attention!< / strong > This file is marked as deprecated, download it only if you are sure you need this specific version.{/blocktrans}< / p > {/if}
2011-05-27 22:48:24 +00:00
< a href = "{url 'IDF_Views_Download::download', array($project.shortname, $file.file)}" > {$file}< / a > - {$file.filesize|size}
2008-08-03 22:42:05 +00:00
< / div >
2009-06-22 19:08:33 +00:00
{if $file.changelog}
< h2 class = "changes" > {trans 'Changes'}< / h2 >
2008-08-03 22:42:05 +00:00
2009-06-22 19:08:33 +00:00
{markdown $file.changelog, $request}
{/if}
2008-08-03 22:42:05 +00:00
{if $form}
{if $form.errors}
< div class = "px-message-error" >
< p > {trans 'The form contains some errors. Please correct them to update the file.'}< / p >
{if $form.get_top_errors}
{$form.render_top_errors|unsafe}
{/if}
< / div >
{/if}
< form method = "post" enctype = "multipart/form-data" action = "." >
2009-06-22 19:08:33 +00:00
< table class = "form download" summary = "" >
2008-08-03 22:42: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 >
2009-06-22 19:08:33 +00:00
< th > {$form.f.changelog.labelTag}:< / th >
< td > {if $form.f.changelog.errors}{$form.f.changelog.fieldErrors}{/if}
{$form.f.changelog|unsafe}
< / td >
< / tr >
< tr >
2008-08-03 22:42: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}
2008-08-05 18:04:42 +00:00
{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}
2008-08-03 22:42:05 +00:00
< / td >
< / tr >
< tr >
2008-08-08 19:33:10 +00:00
< td > < / td > {aurl 'url', 'IDF_Views_Download::delete', array($project.shortname, $file.id)}
2009-06-29 20:10:32 +00:00
< td > {* float left is a fix for Firefox < 3.5 * }
< span style = "float: left;" > < input type = "submit" value = "{trans 'Update File'}" name = "submit" / > | < a href = "{url 'IDF_Views_Download::index', array($project.shortname)}" > {trans 'Cancel'}< / a > < / span > < span class = "dellink" > < a href = "{$url}" title = "{trans 'Remove this file'}" > < img src = "{media '/idf/img/trash.png'}" style = "vertical-align: text-bottom;" alt = "{trans 'Trash'}" / > < / a > < a href = "{$url}" title = "{trans 'Remove this file'}" > {trans 'Delete this file'}< / a > < / span >
2008-08-03 22:42:05 +00:00
< / td >
< / tr >
< / table >
< / form >
{/if}
{/block}
{block context}
2008-12-05 13:51:51 +00:00
{ashowuser 'submitter', $file.get_submitter(), $request}
2008-08-03 22:42:05 +00:00
< p > < strong > {trans 'Uploaded:'}< / strong > < span class = "nobrk" > {$file.creation_dtime|dateago}< / span > < span class = "nobrk" > {blocktrans}by {$submitter}{/blocktrans}< / span > < / p >
2008-08-07 07:24:15 +00:00
{if $file.modif_dtime != $file.creation_dtime}< p >
< strong > {trans 'Updated:'}< / strong > < span class = "nobrk" > {$file.modif_dtime|dateago}< / span > < / p > {/if}
2008-08-05 13:44:27 +00:00
< p >
< strong > {trans 'Downloads:'}< / strong > < span class = "nobrk" > {$file.downloads}< / span > < / p >
2008-08-06 20:30:44 +00:00
{if $tags.count()}
2008-08-03 22:42:05 +00:00
< p >
< strong > {trans 'Labels:'}< / strong > < br / >
2008-08-06 19:54:45 +00:00
{foreach $tags as $tag}{aurl 'url', 'IDF_Views_Download::listLabel', array($project.shortname, $tag.id)}
< span class = "label" > < a href = "{$url}" class = "label" > < strong > {$tag.class}:< / strong > {$tag.name}< / a > < / span > < br / >
2008-08-03 22:42:05 +00:00
{/foreach}
< / p > {/if}
{/block}
{block javascript}{if $form}
< script type = "text/javascript" >
document.getElementById('id_summary').focus()
< / script >
2008-11-18 08:15:02 +00:00
{include 'idf/downloads/js-autocomplete.html'}{/if}{/block}
2008-08-03 22:42:05 +00:00