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

38 lines
1.7 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()}
2024-12-29 23:16:21 +03:00
{var $copied = !isset($club) ? $doc->isCopiedBy($thisUser) : $doc->isCopiedBy($club)}
2024-12-28 18:33:09 +03:00
{var $modifiable = $doc->canBeModifiedBy($thisUser)}
2024-12-29 19:26:47 +03:00
<div n:class="docMainItem, docListViewItem, $scroll_context ? scroll_node" data-id="{$doc->getPrettiestId()}">
<a class="viewerOpener" href="/doc{$doc->getPrettyId()}">
2024-12-28 18:33:09 +03:00
{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">
2024-12-29 19:26:47 +03:00
<a class="viewerOpener" href="/doc{$doc->getPrettyId()}"><b class="noOverflow doc_name">{$doc->getName()}</b></a>
2024-12-28 18:33:09 +03:00
<div class="doc_content_info">
<span>{$doc->getPublicationTime()}</span>,
<span>{readable_filesize($doc->getFilesize())}</span>{if sizeof($tags) > 0} -
2024-12-29 23:16:21 +03:00
<span n:if="!$noTags" class="doc_tags" style="text-wrap: wrap;">
2024-12-28 18:33:09 +03:00
{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>
2024-12-29 23:16:21 +03:00
<div class="doc_volume" n:if="!$hideButtons">
<div n:if="!$modifiable" id="report_icon"></div>
2024-12-28 18:33:09 +03:00
<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>
2024-12-28 18:33:09 +03:00
</div>
</div>