filedownload.tpl 2.11 KB
Newer Older
1
<ul class="list-group">
Naomi Guyer's avatar
Naomi Guyer committed
2
{foreach $files file}
3 4 5 6 7 8 9 10
    <li class="filedownload-item list-group-item">
        <a href="{$file.downloadurl}" class="outer-link icon-on-hover">
            <span class="sr-only">
                {str tag=Download section=artefact.file} {$file.title}
            </span>
        </a>

        {if $file.iconsrc}
11
            <img src="{$file.iconsrc}" alt="" class="file-icon text-inline" />
12
        {else}
13
            <span class="icon icon-{$file.artefacttype} icon-lg left" role="presentation" aria-hidden="true"></span>
14
        {/if}
Naomi Guyer's avatar
Naomi Guyer committed
15

16
        <h4 class="title list-group-item-heading text-inline">
17 18 19 20 21 22 23 24 25 26 27 28
            {if !$editing}
            <a class="modal_link inner-link"
                data-toggle="modal-docked"
                data-target="#configureblock"
                href="#"
                data-artefactid="{$file.id}"
                data-blockid="{$blockid}"
                {if $file.commentcount > 0}
                    title="{str tag=commentsanddetails section=artefact.file arg1=$file.commentcount}">
                {else}
                    title={str tag=Details section=artefact.file}>
                {/if}
Naomi Guyer's avatar
Naomi Guyer committed
29
                 {$file.title}
30
                 <span class="sr-only">
Naomi Guyer's avatar
Naomi Guyer committed
31
                    {str tag=Details section=artefact.file}
32 33
                </span>
            </a>
34 35 36 37 38 39
            {else}
                {$file.title}
                <span class="sr-only">
                   {str tag=Details section=artefact.file}
               </span>
            {/if}
40
        </h4>
41
        <span class="text-small text-midtone"> -
42 43 44
            {$file.ctime|format_date:'strftimedaydate'}
            [{$file.size|display_size}]
        </span>
Liam's avatar
Liam committed
45
        <span class="icon icon-download icon-lg float-right text-watermark icon-action" role="presentation" aria-hidden="true"></span>
46
        {if $file.description}
47
        <div class="file-description">
48
            <p class="text-small">
49
                {$file.description|safe|clean_html}
50 51
            </p>
        </div>
52
        <script>
53 54
        jQuery("div.file-description a").addClass('inner-link');
        </script>
55 56 57
        {/if}
    </li>
    {/foreach}
Naomi Guyer's avatar
Naomi Guyer committed
58
</ul>