header.phtml 4.5 KB

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