Reorganize templates into subfolders
This commit is contained in:
parent
9b670a9909
commit
52a05f0489
@ -12,7 +12,7 @@ use Miniflux\Helper;
|
|||||||
Router\get_action('about', function () {
|
Router\get_action('about', function () {
|
||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
|
|
||||||
Response\html(Template\layout('about', array(
|
Response\html(Template\layout('config/about', array(
|
||||||
'csrf' => Helper\generate_csrf(),
|
'csrf' => Helper\generate_csrf(),
|
||||||
'config' => Model\Config\get_all($user_id),
|
'config' => Model\Config\get_all($user_id),
|
||||||
'user' => Model\User\get_user_by_id_without_password($user_id),
|
'user' => Model\User\get_user_by_id_without_password($user_id),
|
||||||
|
@ -11,7 +11,7 @@ use Miniflux\Template;
|
|||||||
Router\get_action('api', function () {
|
Router\get_action('api', function () {
|
||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
|
|
||||||
Response\html(Template\layout('api', array(
|
Response\html(Template\layout('config/api', array(
|
||||||
'config' => Model\Config\get_all($user_id),
|
'config' => Model\Config\get_all($user_id),
|
||||||
'user' => Model\User\get_user_by_id_without_password($user_id),
|
'user' => Model\User\get_user_by_id_without_password($user_id),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
|
@ -27,7 +27,7 @@ Router\get_action('login', function () {
|
|||||||
Response\redirect('?action=unread');
|
Response\redirect('?action=unread');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\load('login', array(
|
Response\html(Template\load('auth/login', array(
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'csrf' => Helper\generate_csrf(),
|
'csrf' => Helper\generate_csrf(),
|
||||||
@ -45,7 +45,7 @@ Router\post_action('login', function () {
|
|||||||
Response\redirect('?action=unread');
|
Response\redirect('?action=unread');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\load('login', array(
|
Response\html(Template\load('auth/login', array(
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
||||||
)));
|
)));
|
||||||
|
@ -73,7 +73,7 @@ Router\get_action('bookmarks', function () {
|
|||||||
$feed_ids
|
$feed_ids
|
||||||
);
|
);
|
||||||
|
|
||||||
Response\html(Template\layout('bookmarks', array(
|
Response\html(Template\layout('bookmarks/items', array(
|
||||||
'favicons' => Model\Favicon\get_items_favicons($items),
|
'favicons' => Model\Favicon\get_items_favicons($items),
|
||||||
'original_marks_read' => Helper\config('original_marks_read'),
|
'original_marks_read' => Helper\config('original_marks_read'),
|
||||||
'order' => '',
|
'order' => '',
|
||||||
|
@ -26,7 +26,7 @@ Router\get_action('generate-tokens', function () {
|
|||||||
Router\get_action('config', function () {
|
Router\get_action('config', function () {
|
||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
|
|
||||||
Response\html(Template\layout('config', array(
|
Response\html(Template\layout('config/preferences', array(
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'values' => Model\Config\get_all($user_id) + array('csrf' => Helper\generate_csrf()),
|
'values' => Model\Config\get_all($user_id) + array('csrf' => Helper\generate_csrf()),
|
||||||
'languages' => Model\Config\get_languages(),
|
'languages' => Model\Config\get_languages(),
|
||||||
@ -61,7 +61,7 @@ Router\post_action('config', function () {
|
|||||||
Response\redirect('?action=config');
|
Response\redirect('?action=config');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('config', array(
|
Response\html(Template\layout('config/preferences', array(
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'values' => Model\Config\get_all($user_id) + array('csrf' => Helper\generate_csrf()),
|
'values' => Model\Config\get_all($user_id) + array('csrf' => Helper\generate_csrf()),
|
||||||
'languages' => Model\Config\get_languages(),
|
'languages' => Model\Config\get_languages(),
|
||||||
|
@ -30,7 +30,7 @@ Router\get_action('edit-feed', function () {
|
|||||||
'feed_group_ids' => Model\Group\get_feed_group_ids($feed_id)
|
'feed_group_ids' => Model\Group\get_feed_group_ids($feed_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
Response\html(Template\layout('edit_feed', array(
|
Response\html(Template\layout('feeds/edit', array(
|
||||||
'values' => $values,
|
'values' => $values,
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'groups' => Model\Group\get_all($user_id),
|
'groups' => Model\Group\get_all($user_id),
|
||||||
@ -64,7 +64,7 @@ Router\post_action('edit-feed', function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('edit_feed', array(
|
Response\html(Template\layout('feeds/edit', array(
|
||||||
'values' => $values,
|
'values' => $values,
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'groups' => Model\Group\get_all($user_id),
|
'groups' => Model\Group\get_all($user_id),
|
||||||
@ -78,7 +78,7 @@ Router\get_action('confirm-remove-feed', function () {
|
|||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
$feed_id = Request\int_param('feed_id');
|
$feed_id = Request\int_param('feed_id');
|
||||||
|
|
||||||
Response\html(Template\layout('confirm_remove_feed', array(
|
Response\html(Template\layout('feeds/remove', array(
|
||||||
'feed' => Model\Feed\get_feed($user_id, $feed_id),
|
'feed' => Model\Feed\get_feed($user_id, $feed_id),
|
||||||
'menu' => 'feeds',
|
'menu' => 'feeds',
|
||||||
'title' => t('Confirmation')
|
'title' => t('Confirmation')
|
||||||
@ -133,7 +133,7 @@ Router\get_action('feeds', function () {
|
|||||||
Response\redirect('?action=unread');
|
Response\redirect('?action=unread');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('feeds', array(
|
Response\html(Template\layout('feeds/list', array(
|
||||||
'favicons' => Model\Favicon\get_feeds_favicons($feeds),
|
'favicons' => Model\Favicon\get_feeds_favicons($feeds),
|
||||||
'feeds' => $feeds,
|
'feeds' => $feeds,
|
||||||
'nothing_to_read' => $nothing_to_read,
|
'nothing_to_read' => $nothing_to_read,
|
||||||
@ -155,7 +155,7 @@ Router\get_action('add', function () {
|
|||||||
'feed_group_ids' => array(),
|
'feed_group_ids' => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Response\html(Template\layout('add', array(
|
Response\html(Template\layout('feeds/create', array(
|
||||||
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'groups' => Model\Group\get_all($user_id),
|
'groups' => Model\Group\get_all($user_id),
|
||||||
@ -209,7 +209,7 @@ Router\action('subscribe', function () {
|
|||||||
SessionStorage::getInstance()->setFlashErrorMessage($error_message);
|
SessionStorage::getInstance()->setFlashErrorMessage($error_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('add', array(
|
Response\html(Template\layout('feeds/create', array(
|
||||||
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
||||||
'groups' => Model\Group\get_all($user_id),
|
'groups' => Model\Group\get_all($user_id),
|
||||||
'menu' => 'feeds',
|
'menu' => 'feeds',
|
||||||
|
@ -12,15 +12,9 @@ use Miniflux\Template;
|
|||||||
Router\get_action('help', function () {
|
Router\get_action('help', function () {
|
||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
|
|
||||||
Response\html(Template\layout('help', array(
|
Response\html(Template\layout('config/help', array(
|
||||||
'config' => Model\Config\get_all($user_id),
|
'config' => Model\Config\get_all($user_id),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
'title' => t('Help')
|
'title' => t('Help')
|
||||||
)));
|
)));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Show help
|
|
||||||
Router\get_action('show-help', function () {
|
|
||||||
Response\html(Template\load('show_help'));
|
|
||||||
});
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ use Miniflux\Model;
|
|||||||
Router\get_action('history', function () {
|
Router\get_action('history', function () {
|
||||||
$params = items_list(Model\Item\STATUS_READ);
|
$params = items_list(Model\Item\STATUS_READ);
|
||||||
|
|
||||||
Response\html(Template\layout('history', $params + array(
|
Response\html(Template\layout('history/items', $params + array(
|
||||||
'title' => t('History') . ' (' . $params['nb_items'] . ')',
|
'title' => t('History') . ' (' . $params['nb_items'] . ')',
|
||||||
'menu' => 'history',
|
'menu' => 'history',
|
||||||
)));
|
)));
|
||||||
@ -23,7 +23,7 @@ Router\get_action('history', function () {
|
|||||||
Router\get_action('confirm-flush-history', function () {
|
Router\get_action('confirm-flush-history', function () {
|
||||||
$group_id = Request\int_param('group_id');
|
$group_id = Request\int_param('group_id');
|
||||||
|
|
||||||
Response\html(Template\layout('confirm_flush_items', array(
|
Response\html(Template\layout('history/flush', array(
|
||||||
'group_id' => $group_id,
|
'group_id' => $group_id,
|
||||||
'menu' => 'history',
|
'menu' => 'history',
|
||||||
'title' => t('Confirmation')
|
'title' => t('Confirmation')
|
||||||
|
@ -20,7 +20,7 @@ Router\get_action('unread', function () {
|
|||||||
Response\redirect('?action='.$action.'¬hing_to_read=1');
|
Response\redirect('?action='.$action.'¬hing_to_read=1');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('unread_items', $params + array(
|
Response\html(Template\layout('unread/items', $params + array(
|
||||||
'title' => 'Miniflux (' . $params['nb_items'] . ')',
|
'title' => 'Miniflux (' . $params['nb_items'] . ')',
|
||||||
'menu' => 'unread',
|
'menu' => 'unread',
|
||||||
)));
|
)));
|
||||||
@ -64,7 +64,7 @@ Router\get_action('show', function () {
|
|||||||
$item['enclosure_url'] = Handler\Proxy\rewrite_link($item['enclosure_url']);
|
$item['enclosure_url'] = Handler\Proxy\rewrite_link($item['enclosure_url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('show_item', array(
|
Response\html(Template\layout('item/show', array(
|
||||||
'item' => $item,
|
'item' => $item,
|
||||||
'feed' => $feed,
|
'feed' => $feed,
|
||||||
'item_nav' => isset($nav) ? $nav : null,
|
'item_nav' => isset($nav) ? $nav : null,
|
||||||
@ -85,7 +85,7 @@ Router\get_action('feed-items', function () {
|
|||||||
$items = Model\ItemFeed\get_all_items($user_id, $feed_id, $offset, Helper\config('items_per_page'), $order, $direction);
|
$items = Model\ItemFeed\get_all_items($user_id, $feed_id, $offset, Helper\config('items_per_page'), $order, $direction);
|
||||||
$nb_items = Model\ItemFeed\count_items($user_id, $feed_id);
|
$nb_items = Model\ItemFeed\count_items($user_id, $feed_id);
|
||||||
|
|
||||||
Response\html(Template\layout('feed_items', array(
|
Response\html(Template\layout('feeds/items', array(
|
||||||
'favicons' => Model\Favicon\get_favicons_by_feed_ids(array($feed['id'])),
|
'favicons' => Model\Favicon\get_favicons_by_feed_ids(array($feed['id'])),
|
||||||
'original_marks_read' => Helper\config('original_marks_read'),
|
'original_marks_read' => Helper\config('original_marks_read'),
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
|
@ -19,7 +19,7 @@ Router\get_action('export', function () {
|
|||||||
|
|
||||||
// OPML import form
|
// OPML import form
|
||||||
Router\get_action('import', function () {
|
Router\get_action('import', function () {
|
||||||
Response\html(Template\layout('import', array(
|
Response\html(Template\layout('config/import', array(
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'menu' => 'feeds',
|
'menu' => 'feeds',
|
||||||
'title' => t('OPML Import')
|
'title' => t('OPML Import')
|
||||||
|
@ -14,7 +14,7 @@ use Miniflux\Validator;
|
|||||||
Router\get_action('profile', function () {
|
Router\get_action('profile', function () {
|
||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
|
|
||||||
Response\html(Template\layout('profile', array(
|
Response\html(Template\layout('users/profile', array(
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'values' => Model\User\get_user_by_id_without_password($user_id) + array('csrf' => Helper\generate_csrf()),
|
'values' => Model\User\get_user_by_id_without_password($user_id) + array('csrf' => Helper\generate_csrf()),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
@ -40,7 +40,7 @@ Router\post_action('profile', function () {
|
|||||||
Response\redirect('?action=profile');
|
Response\redirect('?action=profile');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('profile', array(
|
Response\html(Template\layout('users/profile', array(
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'values' => Model\User\get_user_by_id_without_password($user_id) + array('csrf' => Helper\generate_csrf()),
|
'values' => Model\User\get_user_by_id_without_password($user_id) + array('csrf' => Helper\generate_csrf()),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
|
@ -22,7 +22,7 @@ Router\get_action('search', function() {
|
|||||||
$nb_items = Model\ItemSearch\count_items($user_id, $text);
|
$nb_items = Model\ItemSearch\count_items($user_id, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('search', array(
|
Response\html(Template\layout('search/items', array(
|
||||||
'favicons' => Model\Favicon\get_items_favicons($items),
|
'favicons' => Model\Favicon\get_items_favicons($items),
|
||||||
'original_marks_read' => Helper\config('original_marks_read'),
|
'original_marks_read' => Helper\config('original_marks_read'),
|
||||||
'text' => $text,
|
'text' => $text,
|
||||||
|
@ -14,7 +14,7 @@ use Miniflux\Helper;
|
|||||||
Router\get_action('services', function () {
|
Router\get_action('services', function () {
|
||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
|
|
||||||
Response\html(Template\layout('services', array(
|
Response\html(Template\layout('config/services', array(
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'values' => Model\Config\get_all($user_id) + array('csrf' => Helper\generate_csrf()),
|
'values' => Model\Config\get_all($user_id) + array('csrf' => Helper\generate_csrf()),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
|
@ -16,7 +16,7 @@ Router\get_action('users', function () {
|
|||||||
Response\text('Access Forbidden', 403);
|
Response\text('Access Forbidden', 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('users', array(
|
Response\html(Template\layout('users/list', array(
|
||||||
'users' => Model\User\get_all_users(),
|
'users' => Model\User\get_all_users(),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
'title' => t('Users'),
|
'title' => t('Users'),
|
||||||
@ -28,7 +28,7 @@ Router\get_action('new-user', function () {
|
|||||||
Response\text('Access Forbidden', 403);
|
Response\text('Access Forbidden', 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('new_user', array(
|
Response\html(Template\layout('users/create', array(
|
||||||
'values' => array('csrf' => Helper\generate_csrf()),
|
'values' => array('csrf' => Helper\generate_csrf()),
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
@ -55,7 +55,7 @@ Router\post_action('new-user', function () {
|
|||||||
Response\redirect('?action=users');
|
Response\redirect('?action=users');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('new_user', array(
|
Response\html(Template\layout('users/create', array(
|
||||||
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
@ -74,7 +74,7 @@ Router\get_action('edit-user', function () {
|
|||||||
Response\redirect('?action=users');
|
Response\redirect('?action=users');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('edit_user', array(
|
Response\html(Template\layout('users/edit', array(
|
||||||
'values' => $user + array('csrf' => Helper\generate_csrf()),
|
'values' => $user + array('csrf' => Helper\generate_csrf()),
|
||||||
'errors' => array(),
|
'errors' => array(),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
@ -103,7 +103,7 @@ Router\post_action('edit-user', function () {
|
|||||||
Response\redirect('?action=users');
|
Response\redirect('?action=users');
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('edit_user', array(
|
Response\html(Template\layout('users/edit', array(
|
||||||
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
'values' => $values + array('csrf' => Helper\generate_csrf()),
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
@ -116,7 +116,7 @@ Router\get_action('confirm-remove-user', function () {
|
|||||||
Response\text('Access Forbidden', 403);
|
Response\text('Access Forbidden', 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
Response\html(Template\layout('confirm_remove_user', array(
|
Response\html(Template\layout('users/remove', array(
|
||||||
'user' => Model\User\get_user_by_id_without_password(Request\int_param('user_id')),
|
'user' => Model\User\get_user_by_id_without_password(Request\int_param('user_id')),
|
||||||
'csrf_token' => Helper\generate_csrf(),
|
'csrf_token' => Helper\generate_csrf(),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?php if (empty($items) && $group_id === null): ?>
|
<?php if (empty($items) && $group_id === null): ?>
|
||||||
<p class="alert alert-info"><?php echo t('No bookmark') ?></p>
|
<p class="alert alert-info"><?php echo t('No bookmark') ?></p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo Miniflux\Template\load('search_form') ?>
|
<?php echo Miniflux\Template\load('common/search') ?>
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h2><?php echo t('Bookmarks') ?><span id="page-counter"><?php echo isset($nb_items) ? $nb_items : '' ?></span></h2>
|
<h2><?php echo t('Bookmarks') ?><span id="page-counter"><?php echo isset($nb_items) ? $nb_items : '' ?></span></h2>
|
||||||
<?php if (!empty($groups)): ?>
|
<?php if (!empty($groups)): ?>
|
||||||
@ -15,7 +16,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($nothing_to_read): ?>
|
<?php if ($nothing_to_read): ?>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<section class="items" id="listing">
|
<section class="items" id="listing">
|
||||||
<?php foreach ($items as $item): ?>
|
<?php foreach ($items as $item): ?>
|
||||||
<?php echo Miniflux\Template\load('item', array(
|
<?php echo Miniflux\Template\load('items/item', array(
|
||||||
'item' => $item,
|
'item' => $item,
|
||||||
'menu' => $menu,
|
'menu' => $menu,
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
@ -36,6 +36,6 @@
|
|||||||
)) ?>
|
)) ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<?php echo Miniflux\Template\load('paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
|
<?php echo Miniflux\Template\load('items/paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
|
||||||
</section>
|
</section>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
38
app/templates/common/menu.php
Normal file
38
app/templates/common/menu.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<header>
|
||||||
|
<nav>
|
||||||
|
<a class="logo" href="?"><?php echo tne('mini%sflux%s','<span>','</span>') ?></a>
|
||||||
|
<ul>
|
||||||
|
<li<?php echo isset($menu) && $menu === 'unread' ? ' class="active"' : '' ?>>
|
||||||
|
<a href="?action=unread"><?php echo t('unread') ?><span id="nav-counter"><?php echo empty($nb_unread_items) ? '' : $nb_unread_items ?></span></a>
|
||||||
|
</li>
|
||||||
|
<li class="hide-mobile<?php echo isset($menu) && $menu === 'bookmarks' ? ' active' : '' ?>">
|
||||||
|
<a href="?action=bookmarks"><?php echo t('bookmarks') ?></a>
|
||||||
|
</li>
|
||||||
|
<li class="hide-mobile<?php echo isset($menu) && $menu === 'history' ? ' active' : '' ?>">
|
||||||
|
<a href="?action=history"><?php echo t('history') ?></a>
|
||||||
|
</li>
|
||||||
|
<li class="hide-mobile<?php echo isset($menu) && $menu === 'feeds' ? ' active' : '' ?>">
|
||||||
|
<a href="?action=feeds"><?php echo t('subscriptions') ?></a>
|
||||||
|
</li>
|
||||||
|
<li class="hide-mobile<?php echo isset($menu) && $menu === 'config' ? ' active' : '' ?>">
|
||||||
|
<a href="?action=config"><?php echo t('preferences') ?></a>
|
||||||
|
</li>
|
||||||
|
<li class="hide-mobile">
|
||||||
|
<a href="?action=logout"><?php echo t('logout') ?></a>
|
||||||
|
</li>
|
||||||
|
<li class="hide-desktop">
|
||||||
|
<span data-action="toggle-menu-more" class="menu-more-switcher" href="#">∨ <?php echo t('menu') ?></span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<div id="menu-more" class="hide">
|
||||||
|
<ul>
|
||||||
|
<li<?php echo isset($menu) && $menu === 'unread' ? ' class="active"' : '' ?>><a href="?action=unread"><?= t('unread') ?></a></li>
|
||||||
|
<li<?php echo isset($menu) && $menu === 'bookmarks' ? ' class="active"' : '' ?>><a href="?action=bookmarks"><?= t('bookmarks') ?></a></li>
|
||||||
|
<li<?php echo isset($menu) && $menu === 'history' ? ' class="active"' : '' ?>><a href="?action=history"><?= t('history') ?></a></li>
|
||||||
|
<li<?php echo isset($menu) && $menu === 'feeds' ? ' class="active"' : '' ?>><a href="?action=feeds"><?= t('subscriptions') ?></a></li>
|
||||||
|
<li<?php echo isset($menu) && $menu === 'config' ? ' class="active"' : '' ?>><a href="?action=config"><?= t('preferences') ?></a></li>
|
||||||
|
<li><a href="?action=logout"><?= t('logout') ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
@ -15,7 +15,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<section>
|
<section>
|
||||||
<?php echo Miniflux\Template\load('keyboard_shortcuts') ?>
|
<?php echo Miniflux\Template\load('common/keyboard_shortcuts') ?>
|
||||||
</section>
|
</section>
|
||||||
<div class="page-section">
|
<div class="page-section">
|
||||||
<h2><?php echo t('Documentation') ?></h2>
|
<h2><?php echo t('Documentation') ?></h2>
|
@ -1,6 +1,6 @@
|
|||||||
<div id="help-layer" class="hide">
|
<div id="help-layer" class="hide">
|
||||||
<span class="btn-close" data-action="close-help">×</span>
|
<span class="btn-close" data-action="close-help">×</span>
|
||||||
<section>
|
<section>
|
||||||
<?php echo Miniflux\Template\load('keyboard_shortcuts') ?>
|
<?php echo Miniflux\Template\load('common/keyboard_shortcuts') ?>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
@ -1,22 +0,0 @@
|
|||||||
<div class="page-header">
|
|
||||||
<h2><?php echo $title ?></h2>
|
|
||||||
<nav>
|
|
||||||
<ul>
|
|
||||||
<li><a href="?action=config"><?php echo t('general') ?></a></li>
|
|
||||||
<li><a href="?action=services"><?php echo t('external services') ?></a></li>
|
|
||||||
<li><a href="?action=api"><?php echo t('api') ?></a></li>
|
|
||||||
<li class="active"><a href="?action=database"><?php echo t('database') ?></a></li>
|
|
||||||
<li><a href="?action=help"><?php echo t('help') ?></a></li>
|
|
||||||
<li><a href="?action=about"><?php echo t('about') ?></a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
<section>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<ul>
|
|
||||||
<li><?php echo t('Database size:') ?> <strong><?php echo Miniflux\Helper\format_bytes($db_size) ?></strong></li>
|
|
||||||
<li><a href="?action=optimize-db&csrf=<?php echo $csrf ?>"><?php echo t('Optimize the database') ?></a> <?php echo t('(VACUUM command)') ?></li>
|
|
||||||
<li><a href="?action=download-db&csrf=<?php echo $csrf ?>"><?php echo t('Download the entire database') ?></a> <?php echo t('(Gzip compressed Sqlite file)') ?></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<section class="items" id="listing" data-feed-id="<?php echo $feed['id'] ?>">
|
<section class="items" id="listing" data-feed-id="<?php echo $feed['id'] ?>">
|
||||||
<?php foreach ($items as $item): ?>
|
<?php foreach ($items as $item): ?>
|
||||||
<?php echo Miniflux\Template\load('item', array(
|
<?php echo Miniflux\Template\load('items/item', array(
|
||||||
'feed' => $feed,
|
'feed' => $feed,
|
||||||
'item' => $item,
|
'item' => $item,
|
||||||
'menu' => $menu,
|
'menu' => $menu,
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<a href="?action=mark-feed-as-read&feed_id=<?php echo $feed['id'] ?>" data-action="mark-feed-read"><?php echo t('mark all as read') ?></a>
|
<a href="?action=mark-feed-as-read&feed_id=<?php echo $feed['id'] ?>" data-action="mark-feed-read"><?php echo t('mark all as read') ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo Miniflux\Template\load('paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'feed_id' => $feed['id'])) ?>
|
<?php echo Miniflux\Template\load('items/paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'feed_id' => $feed['id'])) ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
@ -1,7 +1,8 @@
|
|||||||
<?php if (empty($items)): ?>
|
<?php if (empty($items)): ?>
|
||||||
<p class="alert alert-info"><?php echo t('No history') ?></p>
|
<p class="alert alert-info"><?php echo t('No history') ?></p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo Miniflux\Template\load('search_form') ?>
|
<?php echo Miniflux\Template\load('common/search') ?>
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h2><?php echo t('History') ?><span id="page-counter"><?php echo isset($nb_items) ? $nb_items : '' ?></span></h2>
|
<h2><?php echo t('History') ?><span id="page-counter"><?php echo isset($nb_items) ? $nb_items : '' ?></span></h2>
|
||||||
<?php if (!empty($groups)): ?>
|
<?php if (!empty($groups)): ?>
|
||||||
@ -30,7 +31,7 @@
|
|||||||
|
|
||||||
<section class="items" id="listing">
|
<section class="items" id="listing">
|
||||||
<?php foreach ($items as $item): ?>
|
<?php foreach ($items as $item): ?>
|
||||||
<?php echo Miniflux\Template\load('item', array(
|
<?php echo Miniflux\Template\load('items/item', array(
|
||||||
'item' => $item,
|
'item' => $item,
|
||||||
'menu' => $menu,
|
'menu' => $menu,
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
@ -42,7 +43,7 @@
|
|||||||
)) ?>
|
)) ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<?php echo Miniflux\Template\load('paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
|
<?php echo Miniflux\Template\load('items/paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
@ -83,8 +83,8 @@
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</li>
|
</li>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php echo Miniflux\Template\load('bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset)) ?>
|
<?php echo Miniflux\Template\load('items/bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset)) ?>
|
||||||
<?php echo Miniflux\Template\load('status_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset)) ?>
|
<?php echo Miniflux\Template\load('items/status_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset)) ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php if ($display_mode === 'full'): ?>
|
<?php if ($display_mode === 'full'): ?>
|
||||||
<div class="preview-full-content" <?php echo Miniflux\Helper\rtl($item) ?>><?php echo $item['content'] ?></div>
|
<div class="preview-full-content" <?php echo Miniflux\Helper\rtl($item) ?>><?php echo $item['content'] ?></div>
|
@ -25,49 +25,14 @@
|
|||||||
<script type="text/javascript" src="assets/js/app.min.js?<?php echo filemtime('assets/js/app.min.js') ?>" defer></script>
|
<script type="text/javascript" src="assets/js/app.min.js?<?php echo filemtime('assets/js/app.min.js') ?>" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<?php echo Miniflux\Template\load('common/menu') ?>
|
||||||
<nav>
|
|
||||||
<a class="logo" href="?"><?php echo tne('mini%sflux%s','<span>','</span>') ?></a>
|
|
||||||
<ul>
|
|
||||||
<li<?php echo isset($menu) && $menu === 'unread' ? ' class="active"' : '' ?>>
|
|
||||||
<a href="?action=unread"><?php echo t('unread') ?><span id="nav-counter"><?php echo empty($nb_unread_items) ? '' : $nb_unread_items ?></span></a>
|
|
||||||
</li>
|
|
||||||
<li class="hide-mobile<?php echo isset($menu) && $menu === 'bookmarks' ? ' active' : '' ?>">
|
|
||||||
<a href="?action=bookmarks"><?php echo t('bookmarks') ?></a>
|
|
||||||
</li>
|
|
||||||
<li class="hide-mobile<?php echo isset($menu) && $menu === 'history' ? ' active' : '' ?>">
|
|
||||||
<a href="?action=history"><?php echo t('history') ?></a>
|
|
||||||
</li>
|
|
||||||
<li class="hide-mobile<?php echo isset($menu) && $menu === 'feeds' ? ' active' : '' ?>">
|
|
||||||
<a href="?action=feeds"><?php echo t('subscriptions') ?></a>
|
|
||||||
</li>
|
|
||||||
<li class="hide-mobile<?php echo isset($menu) && $menu === 'config' ? ' active' : '' ?>">
|
|
||||||
<a href="?action=config"><?php echo t('preferences') ?></a>
|
|
||||||
</li>
|
|
||||||
<li class="hide-mobile">
|
|
||||||
<a href="?action=logout"><?php echo t('logout') ?></a>
|
|
||||||
</li>
|
|
||||||
<li class="hide-desktop">
|
|
||||||
<span data-action="toggle-menu-more" class="menu-more-switcher" href="#">∨ <?php echo t('menu') ?></span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<div id="menu-more" class="hide">
|
|
||||||
<ul>
|
|
||||||
<li<?php echo isset($menu) && $menu === 'unread' ? ' class="active"' : '' ?>><a href="?action=unread"><?= t('unread') ?></a></li>
|
|
||||||
<li<?php echo isset($menu) && $menu === 'bookmarks' ? ' class="active"' : '' ?>><a href="?action=bookmarks"><?= t('bookmarks') ?></a></li>
|
|
||||||
<li<?php echo isset($menu) && $menu === 'history' ? ' class="active"' : '' ?>><a href="?action=history"><?= t('history') ?></a></li>
|
|
||||||
<li<?php echo isset($menu) && $menu === 'feeds' ? ' class="active"' : '' ?>><a href="?action=feeds"><?= t('subscriptions') ?></a></li>
|
|
||||||
<li<?php echo isset($menu) && $menu === 'config' ? ' class="active"' : '' ?>><a href="?action=config"><?= t('preferences') ?></a></li>
|
|
||||||
<li><a href="?action=logout"><?= t('logout') ?></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<section class="page" data-item-page="<?= $menu ?>">
|
<section class="page" data-item-page="<?= $menu ?>">
|
||||||
<?php echo Miniflux\Helper\flash('flash_message', '<div class="alert alert-success">%s</div>') ?>
|
<?php echo Miniflux\Helper\flash('flash_message', '<div class="alert alert-success">%s</div>') ?>
|
||||||
<?php echo Miniflux\Helper\flash('flash_error_message', '<div class="alert alert-error">%s</div>') ?>
|
<?php echo Miniflux\Helper\flash('flash_error_message', '<div class="alert alert-error">%s</div>') ?>
|
||||||
<?php echo $content_for_layout ?>
|
<?php echo $content_for_layout ?>
|
||||||
</section>
|
</section>
|
||||||
<?php echo Miniflux\Template\load('help_layer') ?>
|
|
||||||
|
<?php echo Miniflux\Template\load('config/help_layer') ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php echo Miniflux\Template\load('search_form', array('text' => $text, 'opened' => true)) ?>
|
<?php echo Miniflux\Template\load('common/search', array('opened' => true, 'text' => $text)) ?>
|
||||||
|
|
||||||
<?php if (empty($items)): ?>
|
<?php if (empty($items)): ?>
|
||||||
<p class="alert alert-info"><?php echo t('There are no results for your search') ?></p>
|
<p class="alert alert-info"><?php echo t('There are no results for your search') ?></p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
@ -8,7 +9,7 @@
|
|||||||
|
|
||||||
<section class="items" id="listing">
|
<section class="items" id="listing">
|
||||||
<?php foreach ($items as $item): ?>
|
<?php foreach ($items as $item): ?>
|
||||||
<?php echo Miniflux\Template\load('item', array(
|
<?php echo Miniflux\Template\load('items/item', array(
|
||||||
'item' => $item,
|
'item' => $item,
|
||||||
'menu' => $menu,
|
'menu' => $menu,
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
@ -20,7 +21,7 @@
|
|||||||
)) ?>
|
)) ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<?php echo Miniflux\Template\load('paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'text' => $text)) ?>
|
<?php echo Miniflux\Template\load('items/paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'text' => $text)) ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
@ -1,4 +1,4 @@
|
|||||||
<?php echo Miniflux\Template\load('search_form') ?>
|
<?php echo Miniflux\Template\load('common/search') ?>
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h2><?php echo t('Unread') ?><span id="page-counter"><?php echo isset($nb_items) ? $nb_items : '' ?></span></h2>
|
<h2><?php echo t('Unread') ?><span id="page-counter"><?php echo isset($nb_items) ? $nb_items : '' ?></span></h2>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<p class="alert alert-info"><?php echo t('Nothing to read') ?></p>
|
<p class="alert alert-info"><?php echo t('Nothing to read') ?></p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php foreach ($items as $item): ?>
|
<?php foreach ($items as $item): ?>
|
||||||
<?php echo Miniflux\Template\load('item', array(
|
<?php echo Miniflux\Template\load('items/item', array(
|
||||||
'item' => $item,
|
'item' => $item,
|
||||||
'menu' => $menu,
|
'menu' => $menu,
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
@ -46,6 +46,6 @@
|
|||||||
<a href="?action=mark-all-read<?php echo $group_id === null ? '' : '&group_id='.$group_id ?>"><?php echo t('mark all as read') ?></a>
|
<a href="?action=mark-all-read<?php echo $group_id === null ? '' : '&group_id='.$group_id ?>"><?php echo t('mark all as read') ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo Miniflux\Template\load('paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
|
<?php echo Miniflux\Template\load('items/paging', array('menu' => $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</section>
|
</section>
|
Loading…
Reference in New Issue
Block a user