{extends "idf/downloads/base.html"}
{block docclass}yui-t3{assign $inDownloads=true}{/block}
{block body}
<
div
class
=
"download-file"
>
{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}
<
a
href
=
"{url 'IDF_Views_Download::download', array($project.shortname, $file.file)}"
>{$file}</
a
> - {$file.filesize|size}
{if !$file.ext_file}
<
br
/>
<
span
class
=
"helptext"
>{trans 'md5:'} {$file.md5}</
span
>
{/if}
</
div
>
{if $file.changelog}
<
h2
class
=
"changes"
>{trans 'Changes'}</
h2
>
{markdown $file.changelog, $request}
{/if}
{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
=
"."
>
<
table
class
=
"form download"
summary
=
""
>
<
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
>{$form.f.changelog.labelTag}:</
th
>
<
td
>{if $form.f.changelog.errors}{$form.f.changelog.fieldErrors}{/if}
{$form.f.changelog|unsafe}
</
td
>
</
tr
>
<
tr
>
<
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
>
<
tr
>
<
td
> </
td
>{aurl 'url', 'IDF_Views_Download::delete', array($project.shortname, $file.id)}
<
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
>
</
td
>
</
tr
>
</
table
>
</
form
>
{/if}
{/block}
{block context}
{ashowuser 'submitter', $file.get_submitter(), $request}
<
p
><
strong
>{trans 'Uploaded:'}</
strong
> <
span
class
=
"nobrk"
>{$file.creation_dtime|dateago}</
span
> <
span
class
=
"nobrk"
>{blocktrans}by {$submitter}{/blocktrans}</
span
></
p
>
{if $file.modif_dtime != $file.creation_dtime}<
p
>
<
strong
>{trans 'Updated:'}</
strong
> <
span
class
=
"nobrk"
>{$file.modif_dtime|dateago}</
span
></
p
>{/if}
<
p
>
<
strong
>{trans 'Downloads:'}</
strong
> <
span
class
=
"nobrk"
>{$file.downloads}</
span
></
p
>
{if $tags.count()}
<
p
>
<
strong
>{trans 'Labels:'}</
strong
><
br
/>
{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
/>
{/foreach}
</
p
>{/if}
{/block}
{block javascript}{if $form}
<
script
type
=
"text/javascript"
>
document.getElementById('id_summary').focus()
</
script
>
{include 'idf/downloads/js-autocomplete.html'}{/if}{/block}