1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
freshrss_ynh/sources/app/layout/header.phtml

94 lines
4.8 KiB
PHTML
Raw Normal View History

2014-07-23 15:52:50 +02:00
<?php
2015-02-08 18:55:48 +01:00
if (FreshRSS_Auth::accessNeedsAction()) {
2014-07-23 15:52:50 +02:00
?><ul class="nav nav-head nav-login"><?php
2015-02-08 18:55:48 +01:00
if (FreshRSS_Auth::hasAccess()) {
?><li class="item"><?php echo _i('logout'); ?> <a class="signout" href="<?php echo _url('auth', 'logout'); ?>"><?php echo _t('gen.auth.logout'); ?></a></li><?php
2014-07-23 15:52:50 +02:00
} else {
2015-02-08 18:55:48 +01:00
?><li class="item"><?php echo _i('login'); ?> <a class="signin" href="<?php echo _url('auth', 'login'); ?>"><?php echo _t('gen.auth.login'); ?></a></li><?php
2014-07-23 15:52:50 +02:00
}
?></ul><?php
}
?>
<div class="header">
<div class="item title">
<h1>
<a href="<?php echo _url('index', 'index'); ?>">
<img class="logo" src="<?php echo _i('icon', true); ?>" alt="⊚" />
2015-02-08 18:55:48 +01:00
<?php echo FreshRSS_Context::$system_conf->title; ?>
2014-07-23 15:52:50 +02:00
</a>
</h1>
</div>
<div class="item search">
2015-02-08 18:55:48 +01:00
<?php if (FreshRSS_Auth::hasAccess() || FreshRSS_Context::$system_conf->allow_anonymous) { ?>
2014-07-23 15:52:50 +02:00
<form action="<?php echo _url('index', 'index'); ?>" method="get">
<div class="stick">
2015-02-08 18:55:48 +01:00
<input type="search" name="search" id="search" class="extend" value="<?php echo FreshRSS_Context::$search; ?>" placeholder="<?php echo _t('gen.menu.search'); ?>" />
2014-07-23 15:52:50 +02:00
<?php $get = Minz_Request::param('get', ''); ?>
<?php if ($get != '') { ?>
<input type="hidden" name="get" value="<?php echo $get; ?>" />
<?php } ?>
<?php $order = Minz_Request::param('order', ''); ?>
<?php if ($order != '') { ?>
<input type="hidden" name="order" value="<?php echo $order; ?>" />
<?php } ?>
<?php $state = Minz_Request::param('state', ''); ?>
<?php if ($state != '') { ?>
<input type="hidden" name="state" value="<?php echo $state; ?>" />
<?php } ?>
<button class="btn" type="submit"><?php echo _i('search'); ?></button>
</div>
</form>
<?php } ?>
</div>
2015-02-08 18:55:48 +01:00
<?php if (FreshRSS_Auth::hasAccess()) { ?>
2014-07-23 15:52:50 +02:00
<div class="item configure">
<div class="dropdown">
<div id="dropdown-configure" class="dropdown-target"></div>
<a class="btn dropdown-toggle" href="#dropdown-configure"><?php echo _i('configure'); ?></a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close"></a></li>
2015-02-08 18:55:48 +01:00
<li class="dropdown-header"><?php echo _t('gen.menu.configuration'); ?></li>
<li class="item"><a href="<?php echo _url('configure', 'display'); ?>"><?php echo _t('gen.menu.display'); ?></a></li>
<li class="item"><a href="<?php echo _url('configure', 'reading'); ?>"><?php echo _t('gen.menu.reading'); ?></a></li>
<li class="item"><a href="<?php echo _url('configure', 'archiving'); ?>"><?php echo _t('gen.menu.archiving'); ?></a></li>
<li class="item"><a href="<?php echo _url('configure', 'sharing'); ?>"><?php echo _t('gen.menu.sharing'); ?></a></li>
<li class="item"><a href="<?php echo _url('configure', 'shortcut'); ?>"><?php echo _t('gen.menu.shortcuts'); ?></a></li>
<li class="item"><a href="<?php echo _url('configure', 'queries'); ?>"><?php echo _t('gen.menu.queries'); ?></a></li>
<li class="item"><a href="<?php echo _url('user', 'profile'); ?>"><?php echo _t('gen.menu.user_profile'); ?></a></li>
<li class="item"><a href="<?php echo _url('extension', 'index'); ?>"><?php echo _t('gen.menu.extensions'); ?></a></li>
<?php if (FreshRSS_Auth::hasAccess('admin')) { ?>
2014-07-23 15:52:50 +02:00
<li class="separator"></li>
2015-02-08 18:55:48 +01:00
<li class="dropdown-header"><?php echo _t('gen.menu.admin'); ?></li>
2015-11-06 16:54:20 +01:00
<li class="item"><a href="<?php echo _url('configure', 'system'); ?>"><?php echo _t('gen.menu.system'); ?></a></li>
2015-02-08 18:55:48 +01:00
<li class="item"><a href="<?php echo _url('user', 'manage'); ?>"><?php echo _t('gen.menu.user_management'); ?></a></li>
<li class="item"><a href="<?php echo _url('auth', 'index'); ?>"><?php echo _t('gen.menu.authentication'); ?></a></li>
<li class="item"><a href="<?php echo _url('update', 'checkInstall'); ?>"><?php echo _t('gen.menu.check_install'); ?></a></li>
<li class="item"><a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('gen.menu.update'); ?></a></li>
2014-09-27 10:10:43 +02:00
<?php } ?>
2014-07-23 15:52:50 +02:00
<li class="separator"></li>
2015-02-08 18:55:48 +01:00
<li class="item"><a href="<?php echo _url('stats', 'index'); ?>"><?php echo _t('gen.menu.stats'); ?></a></li>
<li class="item"><a href="<?php echo _url('index', 'logs'); ?>"><?php echo _t('gen.menu.logs'); ?></a></li>
<li class="item"><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('gen.menu.about'); ?></a></li>
2014-07-23 15:52:50 +02:00
<?php
2015-02-08 18:55:48 +01:00
if (FreshRSS_Auth::accessNeedsAction()) {
?><li class="separator"></li>
<li class="item"><a class="signout" href="<?php echo _url('auth', 'logout'); ?>"><?php echo _i('logout'), ' ', _t('gen.auth.logout'); ?></a></li><?php
2014-07-23 15:52:50 +02:00
} ?>
</ul>
</div>
</div>
2015-02-08 18:55:48 +01:00
<?php } elseif (FreshRSS_Auth::accessNeedsAction()) { ?>
<div class="item configure">
<?php echo _i('login'); ?><a class="signin" href="<?php echo _url('auth', 'login'); ?>"><?php echo _t('gen.auth.login'); ?></a>
</div>
<?php } ?>
2014-07-23 15:52:50 +02:00
</div>