miniflux-legacy/templates/bookmark_links.php
Mathias Kresin 3dae99ac27 remove multiple definition of item id
The item id exists as data attribute or as element.id postfix on multiple
elements in an article.

The basic idea is to traverse the DOM tree - starting from the event firing
element - in reverse order till an article element is found.

This article element is passed to the JavaScript functions. These JavaScript
functions are getting the elements which they want to manipulate starting from
the article utilizing the JavaScript querySelector function.

The bootstrap themes had a conflicting and unused class style definied, which is
removed by now.
2014-11-20 10:43:29 +01:00

17 lines
681 B
PHP

<li class="hide-mobile">
<?php if ($item['bookmark']): ?>
<a
class="bookmark"
href="?action=bookmark&amp;value=0&amp;id=<?= $item['id'] ?>&amp;menu=<?= $menu ?>&amp;offset=<?= $offset ?>&amp;source=<?= $source ?>"
data-action="bookmark"
data-reverse-label="<?= t('bookmark') ?>"
><?= t('remove bookmark') ?></a>
<?php else: ?>
<a
class="bookmark"
href="?action=bookmark&amp;value=1&amp;id=<?= $item['id'] ?>&amp;menu=<?= $menu ?>&amp;offset=<?= $offset ?>&amp;source=<?= $source ?>"
data-action="bookmark"
data-reverse-label="<?= t('remove bookmark') ?>"
><?= t('bookmark') ?></a>
<?php endif ?>
</li>