mirror of
https://github.com/openvk/openvk
synced 2025-04-23 00:23:01 +03:00
54 lines
No EOL
3.5 KiB
XML
54 lines
No EOL
3.5 KiB
XML
{php $id = $audio->getId() . rand(0, 1000)}
|
|
{php $isWithdrawn = $audio->isWithdrawn()}
|
|
{php $editable = isset($thisUser) && $audio->canBeModifiedBy($thisUser)}
|
|
<div id="audioEmbed-{$id}" data-realid="{$audio->getId()}" {if $hideButtons}data-prettyid="{$audio->getPrettyId()}" data-name="{$audio->getName()}"{/if} data-genre="{$audio->getGenre()}" class="audioEmbed {if !$audio->isAvailable()}processed{/if} {if $isWithdrawn}withdrawn{/if}" onmouseenter="!this.classList.contains('inited') ? initPlayer({$id}, {$audio->getKeys()}, {$audio->getURL()}, {$audio->getLength()}) : void(0)">
|
|
<audio class="audio" />
|
|
|
|
<div id="miniplayer" class="audioEntry" style="min-height: 37px;">
|
|
<div class="playerButton">
|
|
<div class="playIcon"></div>
|
|
</div>
|
|
|
|
<div class="status" style="margin-top: 11px;">
|
|
<div class="mediaInfo" style="margin-bottom: -8px; cursor: pointer;">
|
|
<strong class="performer">
|
|
<a style="color: unset" href="/search?query=&type=audios&sort=id&only_performers=on&query={$audio->getPerformer()}">{ovk_proc_strtr($audio->getPerformer(), 50)}</a>
|
|
</strong>
|
|
—
|
|
<span class="title {if !empty($audio->getLyrics())}withLyrics{/if}">{ovk_proc_strtr($audio->getTitle(), 50)}</span>
|
|
<svg n:if="$audio->isExplicit()" xmlns="http://www.w3.org/2000/svg" height="11" viewBox="0 0 11 11" width="11">
|
|
<path d="m1 2.506v5.988a1.5 1.5 0 0 0 1.491 1.506h6.019c.827 0 1.49-.674 1.49-1.506v-5.988a1.5 1.5 0 0 0 -1.491-1.506h-6.019c-.827 0-1.49.674-1.49 1.506zm4 2.494v-1h2v-1h-3v5h3v-1h-2v-1h2v-1zm-5-2.494a2.496 2.496 0 0 1 2.491-2.506h6.019a2.5 2.5 0 0 1 2.49 2.506v5.988a2.496 2.496 0 0 1 -2.491 2.506h-6.019a2.5 2.5 0 0 1 -2.49-2.506z"
|
|
fill="#828a99" fill-opacity=".7"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="volume" style="display: flex; flex-direction: column;width:14%;">
|
|
<span class="nobold" data-unformatted="{$audio->getLength()}" style="text-align: center;margin-top: 12px;">{$audio->getFormattedLength()}</span>
|
|
<div class="buttons" style="margin-top: 8px;">
|
|
{php $hasAudio = isset($thisUser) && $audio->isInLibraryOf($thisUser)}
|
|
|
|
{if !$hideButtons}
|
|
<div class="remove-icon musicIcon" data-id="{$audio->getId()}" n:if="isset($thisUser) && $hasAudio" ></div>
|
|
<div class="add-icon musicIcon" data-id="{$audio->getId()}" n:if="isset($thisUser) && !$hasAudio && !$isWithdrawn" ></div>
|
|
<div class="edit-icon musicIcon" data-lyrics="{$audio->getLyrics()}" data-title="{$audio->getTitle()}" data-performer="{$audio->getPerformer()}" data-explicit="{(int)$audio->isExplicit()}" data-searchable="{(int)!$audio->isUnlisted()}" n:if="isset($thisUser) && $editable && !$isWithdrawn" ></div>
|
|
<div class="report-icon musicIcon" data-id="{$audio->getId()}" n:if="isset($thisUser) && !$editable && !$isWithdrawn" ></div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tracks">
|
|
<div class="track" style="margin-top: 3px;display:none">
|
|
<div class="selectableTrack" n:attr="style => $isWithdrawn ? 'display: none;' : ''">
|
|
<div>
|
|
<!-- actual track -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="lyrics" n:if="!empty($audio->getLyrics())">
|
|
{nl2br($audio->getLyrics())|noescape}
|
|
</div>
|
|
</div> |