viewposts.tpl 3.05 KB
Newer Older
1
{foreach from=$posts item=post}
2
<div class="post">
3
    <h3 class="title"><a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">{$post->title}</a></h3>
4
    <div class="postdetails">{$post->postedby}</div>
Evonne Cheung's avatar
Evonne Cheung committed
5
    <div>{$post->description|clean_html|safe}
6
    {if $post->tags}
7
    <div class="tags">{str tag=tags}: {list_tags owner=$post->owner tags=$post->tags}</div>
Evonne Cheung's avatar
Evonne Cheung committed
8
    {/if}</div>
9
    {if $post->files}
10
    <table class="cb attachments fullwidth" id="blockinstance-attachments-{$post->id}-{$options.blockid}">
11
12
        <thead class="expandable-head">
            <tr>
13
                <td colspan="2">
14
15
16
17
18
19
20
21
22
23
24
                    <a class="toggle" href="#">{str tag=attachedfiles section=artefact.blog}</a>
                    <span class="fr">
                        <img class="fl" src="{theme_url filename='images/attachment.png'}" alt="{str tag=attachments section=artefact.blog}">
                        {$post->files|count}
                    </span>
                </td>
            </tr>
        </thead>
        <tbody class="expandable-body">
            {foreach from=$post->files item=file}
            <tr class="{cycle values='r0,r1'}">
25
                <td class="icon-container"><img src="{$file->icon}" alt=""></td>
26
                <td>
27
                    <h3 class="title">
28
                        <a href="{$WWWROOT}artefact/artefact.php?artefact={$file->attachment}&view={$options.viewid}">{$file->title}</a>
29
30
31
                        <span class="description">({$file->size|display_size}) - <a href="{$WWWROOT}artefact/file/download.php?file={$file->attachment}&view={$options.viewid}">{str tag=Download section=artefact.file}</a></span>
                    </h3>
                    <div class="detail">{$file->description}</div>
32
33
34
35
                </td>
            </tr>
            {/foreach}
        </tbody>
36
37
    </table>
    {/if}
38
    {if $options.viewid && ($post->commentcount || $post->commentcount === '0')}
39
40
    <div class="comments">
        {if $post->commentcount > 0}
41
42
43
            {if !$options.editing}<a id="block_0{$post->id}{$options.blockid}" class="commentlink" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">{/if}
            {str tag=Comments section=artefact.comment} ({$post->commentcount})
            {if !$options.editing}</a>{/if}
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
        {else}
            {if $post->allowcomments}
                <span class="nocomments">{str tag=Comments section=artefact.comment} ({$post->commentcount})</span>
            {/if}
        {/if}
        {if $post->allowcomments}
            <a class="addcomment bar-before" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">{str tag=addcomment section=artefact.comment}</a>
        {/if}
    </div>
    <div class="feedbacktablewrapper">
        <div id="feedbacktable_0{$post->id}{$options.blockid}" class="feedbacktable">
          {$post->comments->tablerows|safe}
        </div>
    </div>
    {/if}
59
</div>
60
61
62
<script type="application/javascript">
setupExpanders($j('#blockinstance-attachments-{$post->id}-{$options.blockid}'));
</script>
63
{/foreach}