4
0

header.phtml 4.7 KB

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