header.phtml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <header class="header">
  2. <div class="item title">
  3. <a href="<?= _url('index', 'index') ?>">
  4. <img class="logo" src="<?= _i('FreshRSS-logo', true) ?>" alt="" />
  5. </a>
  6. </div>
  7. <div class="item search">
  8. <?php if (FreshRSS_Auth::hasAccess() || FreshRSS_Context::$system_conf->allow_anonymous) { ?>
  9. <form action="<?= _url('index', 'index') ?>" method="get">
  10. <div class="stick">
  11. <input type="search" name="search" id="search" class="extend" value="<?php
  12. echo htmlspecialchars(htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES), ENT_COMPAT, 'UTF-8'); ?>" placeholder="<?= _t('gen.menu.search') ?>" />
  13. <?php $get = Minz_Request::param('get', ''); ?>
  14. <?php if ($get != '') { ?>
  15. <input type="hidden" name="get" value="<?= $get ?>" />
  16. <?php } ?>
  17. <?php $order = Minz_Request::param('order', ''); ?>
  18. <?php if ($order != '') { ?>
  19. <input type="hidden" name="order" value="<?= $order ?>" />
  20. <?php } ?>
  21. <?php $state = Minz_Request::param('state', ''); ?>
  22. <?php if ($state != '') { ?>
  23. <input type="hidden" name="state" value="<?= $state ?>" />
  24. <?php } ?>
  25. <button class="btn" type="submit"><?= _i('search') ?></button>
  26. </div>
  27. </form>
  28. <?php } ?>
  29. </div>
  30. <?php if (FreshRSS_Auth::hasAccess()) { ?>
  31. <nav class="item configure">
  32. <div class="dropdown">
  33. <div id="dropdown-configure" class="dropdown-target"></div>
  34. <a class="btn dropdown-toggle" href="#dropdown-configure"><?= _i('configure') ?></a>
  35. <ul class="dropdown-menu scrollbar-thin">
  36. <li class="dropdown-header-close"><a class="toggle_aside" href="#close"><?= _i('close') ?></a></li>
  37. <li class="dropdown-close"><a href="#close">❌</a></li>
  38. <li class="dropdown-header"><?= _t('gen.menu.account') ?>: <?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8') ?></li>
  39. <li class="item"><a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a></li>
  40. <?php if (FreshRSS_Auth::accessNeedsAction()): ?>
  41. <li class="item"><a class="signout" href="<?= _url('auth', 'logout') ?>"><?= _t('gen.auth.logout'); ?><?= _i('logout') ?></a></li>
  42. <?php else: ?>
  43. <li class="item"><span class="signout">(<?= htmlspecialchars(Minz_Session::param('currentUser', '_'), ENT_NOQUOTES, 'UTF-8') ?>)</span></li>
  44. <?php endif; ?>
  45. <li class="separator"></li>
  46. <li class="dropdown-header"><?= _t('gen.menu.configuration') ?></li>
  47. <li class="item"><a href="<?= _url('configure', 'display') ?>"><?= _t('gen.menu.display') ?></a></li>
  48. <li class="item"><a href="<?= _url('configure', 'reading') ?>"><?= _t('gen.menu.reading') ?></a></li>
  49. <li class="item"><a href="<?= _url('configure', 'archiving') ?>"><?= _t('gen.menu.archiving') ?></a></li>
  50. <li class="item"><a href="<?= _url('configure', 'integration') ?>"><?= _t('gen.menu.sharing') ?></a></li>
  51. <li class="item"><a href="<?= _url('configure', 'shortcut') ?>"><?= _t('gen.menu.shortcuts') ?></a></li>
  52. <li class="item"><a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a></li>
  53. <li class="item"><a href="<?= _url('extension', 'index') ?>"><?= _t('gen.menu.extensions') ?></a></li>
  54. <?= Minz_ExtensionManager::callHook('menu_configuration_entry') ?>
  55. <?php if (FreshRSS_Auth::hasAccess('admin')) { ?>
  56. <li class="separator"></li>
  57. <li class="dropdown-header"><?= _t('gen.menu.admin') ?></li>
  58. <li class="item"><a href="<?= _url('configure', 'system') ?>"><?= _t('gen.menu.system') ?></a></li>
  59. <li class="item"><a href="<?= _url('user', 'manage') ?>"><?= _t('gen.menu.user_management') ?></a></li>
  60. <li class="item"><a href="<?= _url('auth', 'index') ?>"><?= _t('gen.menu.authentication') ?></a></li>
  61. <li class="item"><a href="<?= _url('update', 'checkInstall') ?>"><?= _t('gen.menu.check_install') ?></a></li>
  62. <?php if (!Minz_Configuration::get('system')->disable_update) { ?>
  63. <li class="item"><a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a></li>
  64. <?php } ?>
  65. <?= Minz_ExtensionManager::callHook('menu_admin_entry') ?>
  66. <?php } ?>
  67. <li class="separator"></li>
  68. <li class="item"><a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a></li>
  69. <li class="item"><a href="<?= _url('index', 'about') ?>"><?= _t('gen.menu.about') ?></a></li>
  70. <?= Minz_ExtensionManager::callHook('menu_other_entry') ?>
  71. </ul>
  72. </div>
  73. </nav>
  74. <?php } elseif (FreshRSS_Auth::accessNeedsAction()) { ?>
  75. <div class="item configure">
  76. <?= _i('login') ?><a class="signin" href="<?= _url('auth', 'login') ?>"><?= _t('gen.auth.login') ?></a>
  77. </div>
  78. <?php } ?>
  79. </header>