openvk/Web/Presenters/templates/Documents/components/doc.xml

38 lines
1.4 KiB
XML
Raw Normal View History

2024-12-28 18:33:09 +03:00
{var $preview = $doc->hasPreview() ? $doc->getPreview() : NULL}
{var $tags = $doc->getTags()}
{var $copied = $doc->isCopiedBy($thisUser)}
{var $modifiable = $doc->canBeModifiedBy($thisUser)}
<div class="docListViewItem" data-id="{$doc->getId()}">
<a>
{if $preview}
<img class="doc_icon" alt="document_preview" src="{$preview->getURLBySizeId('tiny')}">
{else}
<div class="doc_icon no_image">
<span>{$doc->getFileExtension()}</span>
</div>
{/if}
</a>
<div class="doc_content noOverflow">
<a><b class="noOverflow">{$doc->getName()}</b></a>
<div class="doc_content_info">
<span>{$doc->getPublicationTime()}</span>,
<span>{readable_filesize($doc->getFilesize())}</span>{if sizeof($tags) > 0} -
<span>
{foreach $tags as $tag}
<a href="/search?section=docs&tags={urlencode($tag)}">
{$tag}{if $tag != $tags[sizeof($tags) - 1]},{/if}
</a>
{/foreach}
</span>{/if}
</div>
</div>
<div class="doc_volume">
<div n:if="!$$modifiable" id="report_icon"></div>
<div n:if="$modifiable" id="edit_icon"></div>
<div n:if="!$copied" id="add_icon"></div>
<div n:if="$copied" id="remove_icon"></div>
</div>
</div>