header.phtml 4.7 KB

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