index.phtml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. declare(strict_types=1);
  3. /** @var FreshRSS_View $this */
  4. $this->partial('aside_subscription');
  5. ?>
  6. <main class="post">
  7. <h1><?= _t('sub.menu.label_management') ?></h1>
  8. <h2><?= _t('sub.title.add_label') ?></h2>
  9. <form id="add_tag" method="post" action="<?= _url('tag', 'add') ?>" autocomplete="off">
  10. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  11. <div class="form-group">
  12. <label class="group-name" for="new_label_name"><?= _t('sub.tag.name') ?></label>
  13. <div class="group-controls">
  14. <input id="new_label_name" name="name" type="text" autocomplete="off" required="required" />
  15. </div>
  16. </div>
  17. <div class="form-group form-actions">
  18. <div class="group-controls">
  19. <button type="submit" class="btn btn-important"><?= _t('gen.action.add') ?></button>
  20. </div>
  21. </div>
  22. </form>
  23. <?php if (count($this->tags) > 0): ?>
  24. <h2><?= _t('gen.action.manage') ?></h2>
  25. <ul id="tagsList" <?= (count($this->tags) > 11) ? 'class="listInColumns"' : '' ?>>
  26. <?php foreach ($this->tags as $tag): ?>
  27. <li>
  28. <a href="<?= _url('tag', 'update', 'id', $tag->id()) ?>" class="configure open-slider" title="<?= _t('gen.action.manage') ?>">
  29. <?= _i('configure') ?>
  30. </a>
  31. <?= $tag->name() ?>
  32. </li>
  33. <?php endforeach; ?>
  34. </ul>
  35. <?php endif; ?>
  36. </main>
  37. <?php $class = isset($this->tag) ? ' active' : ''; ?>
  38. <aside id="slider" class="<?= $class ?>">
  39. <a class="toggle_aside" href="#close"><img class="icon" src="../themes/icons/close.svg" loading="lazy" alt="❌"></a>
  40. <div id="slider-content">
  41. <?php
  42. if (isset($this->tag)) {
  43. $this->renderHelper('tag/update');
  44. }
  45. ?>
  46. </div>
  47. </aside>
  48. <a href="#" id="close-slider">
  49. <?= _i('close') ?>
  50. </a>