openvk/Web/Presenters/templates/Documents/components/doc.xml
2024-12-29 15:58:31 +03:00

37 lines
1.5 KiB
XML

{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->getPrettiestId()}">
<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_name">{$doc->getName()}</b></a>
<div class="doc_content_info">
<span>{$doc->getPublicationTime()}</span>,
<span>{readable_filesize($doc->getFilesize())}</span>{if sizeof($tags) > 0} -
<span class="doc_tags" style="text-wrap: wrap;">
{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 || $copied && $copyImportance" id="add_icon"></div>
<div n:if="$copied && !$copyImportance" id="remove_icon"></div>
</div>
</div>