Add to preferences Item title links to
This commit is contained in:
parent
bd0e6af722
commit
ee805bebfc
@ -46,6 +46,7 @@ Router\get_action('bookmarks', function() {
|
|||||||
'order' => '',
|
'order' => '',
|
||||||
'direction' => '',
|
'direction' => '',
|
||||||
'display_mode' => Model\Config\get('items_display_mode'),
|
'display_mode' => Model\Config\get('items_display_mode'),
|
||||||
|
'item_title_link' => Model\Config\get('item_title_link'),
|
||||||
'items' => $items,
|
'items' => $items,
|
||||||
'nb_items' => $nb_items,
|
'nb_items' => $nb_items,
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
|
@ -123,6 +123,7 @@ Router\get_action('config', function() {
|
|||||||
'theme_options' => Model\Config\get_themes(),
|
'theme_options' => Model\Config\get_themes(),
|
||||||
'sorting_options' => Model\Config\get_sorting_directions(),
|
'sorting_options' => Model\Config\get_sorting_directions(),
|
||||||
'display_mode' => Model\Config\get_display_mode(),
|
'display_mode' => Model\Config\get_display_mode(),
|
||||||
|
'item_title_link' => Model\Config\get_item_title_link(),
|
||||||
'redirect_nothing_to_read_options' => Model\Config\get_nothing_to_read_redirections(),
|
'redirect_nothing_to_read_options' => Model\Config\get_nothing_to_read_redirections(),
|
||||||
'nb_unread_items' => Model\Item\count_by_status('unread'),
|
'nb_unread_items' => Model\Item\count_by_status('unread'),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
@ -161,6 +162,7 @@ Router\post_action('config', function() {
|
|||||||
'sorting_options' => Model\Config\get_sorting_directions(),
|
'sorting_options' => Model\Config\get_sorting_directions(),
|
||||||
'redirect_nothing_to_read_options' => Model\Config\get_nothing_to_read_redirections(),
|
'redirect_nothing_to_read_options' => Model\Config\get_nothing_to_read_redirections(),
|
||||||
'display_mode' => Model\Config\get_display_mode(),
|
'display_mode' => Model\Config\get_display_mode(),
|
||||||
|
'item_title_link' => Model\Config\get_item_title_link(),
|
||||||
'nb_unread_items' => Model\Item\count_by_status('unread'),
|
'nb_unread_items' => Model\Item\count_by_status('unread'),
|
||||||
'menu' => 'config',
|
'menu' => 'config',
|
||||||
'title' => t('Preferences')
|
'title' => t('Preferences')
|
||||||
|
@ -21,6 +21,7 @@ Router\get_action('history', function() {
|
|||||||
'order' => '',
|
'order' => '',
|
||||||
'direction' => '',
|
'direction' => '',
|
||||||
'display_mode' => Model\Config\get('items_display_mode'),
|
'display_mode' => Model\Config\get('items_display_mode'),
|
||||||
|
'item_title_link' => Model\Config\get('item_title_link'),
|
||||||
'nb_items' => $nb_items,
|
'nb_items' => $nb_items,
|
||||||
'nb_unread_items' => Model\Item\count_by_status('unread'),
|
'nb_unread_items' => Model\Item\count_by_status('unread'),
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
|
@ -39,6 +39,7 @@ Router\get_action('unread', function() {
|
|||||||
'order' => $order,
|
'order' => $order,
|
||||||
'direction' => $direction,
|
'direction' => $direction,
|
||||||
'display_mode' => Model\Config\get('items_display_mode'),
|
'display_mode' => Model\Config\get('items_display_mode'),
|
||||||
|
'item_title_link' => Model\Config\get('item_title_link'),
|
||||||
'group_id' => $group_id,
|
'group_id' => $group_id,
|
||||||
'items' => $items,
|
'items' => $items,
|
||||||
'nb_items' => $nb_items,
|
'nb_items' => $nb_items,
|
||||||
|
@ -242,4 +242,6 @@ return array(
|
|||||||
'Groups' => 'Libellés',
|
'Groups' => 'Libellés',
|
||||||
'Back to the group' => 'Revenir sur le groupe',
|
'Back to the group' => 'Revenir sur le groupe',
|
||||||
'view' => 'voir',
|
'view' => 'voir',
|
||||||
|
// 'Item title links to' => '',
|
||||||
|
// 'Original' => ''
|
||||||
);
|
);
|
||||||
|
@ -242,4 +242,6 @@ return array(
|
|||||||
'Groups' => 'Группы',
|
'Groups' => 'Группы',
|
||||||
'Back to the group' => 'Назад в группу',
|
'Back to the group' => 'Назад в группу',
|
||||||
'view' => 'смотреть',
|
'view' => 'смотреть',
|
||||||
|
'Item title links to' => 'Заголовок статьи ведет на',
|
||||||
|
'Original' => 'Оригинал'
|
||||||
);
|
);
|
||||||
|
@ -149,6 +149,15 @@ function get_display_mode()
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Item title links to original or full contents
|
||||||
|
function get_item_title_link()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'original' => t('Original'),
|
||||||
|
'full' => t('Full contents')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Autoflush choices for read items
|
// Autoflush choices for read items
|
||||||
function get_autoflush_read_options()
|
function get_autoflush_read_options()
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
'hide' => false,
|
'hide' => false,
|
||||||
'display_mode' => $display_mode,
|
'display_mode' => $display_mode,
|
||||||
|
'item_title_link' => $item_title_link,
|
||||||
'favicons' => $favicons,
|
'favicons' => $favicons,
|
||||||
'original_marks_read' => $original_marks_read,
|
'original_marks_read' => $original_marks_read,
|
||||||
)) ?>
|
)) ?>
|
||||||
|
@ -66,6 +66,9 @@
|
|||||||
<?= Helper\form_label(t('Display items on lists'), 'items_display_mode') ?>
|
<?= Helper\form_label(t('Display items on lists'), 'items_display_mode') ?>
|
||||||
<?= Helper\form_select('items_display_mode', $display_mode, $values, $errors) ?><br/>
|
<?= Helper\form_select('items_display_mode', $display_mode, $values, $errors) ?><br/>
|
||||||
|
|
||||||
|
<?= Helper\form_label(t('Item title links to'), 'item_title_link') ?>
|
||||||
|
<?= Helper\form_select('item_title_link', $item_title_link, $values, $errors) ?><br/>
|
||||||
|
|
||||||
<?= Helper\form_label(t('When there is nothing to read, redirect me to this page'), 'redirect_nothing_to_read') ?>
|
<?= Helper\form_label(t('When there is nothing to read, redirect me to this page'), 'redirect_nothing_to_read') ?>
|
||||||
<?= Helper\form_select('redirect_nothing_to_read', $redirect_nothing_to_read_options, $values, $errors) ?><br/>
|
<?= Helper\form_select('redirect_nothing_to_read', $redirect_nothing_to_read_options, $values, $errors) ?><br/>
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
'hide' => true,
|
'hide' => true,
|
||||||
'display_mode' => $display_mode,
|
'display_mode' => $display_mode,
|
||||||
|
'item_title_link' => $item_title_link,
|
||||||
'favicons' => $favicons,
|
'favicons' => $favicons,
|
||||||
'original_marks_read' => $original_marks_read,
|
'original_marks_read' => $original_marks_read,
|
||||||
)) ?>
|
)) ?>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<span class="bookmark-icon"></span>
|
<span class="bookmark-icon"></span>
|
||||||
<span class="read-icon"></span>
|
<span class="read-icon"></span>
|
||||||
<?= Helper\favicon($favicons, $item['feed_id']) ?>
|
<?= Helper\favicon($favicons, $item['feed_id']) ?>
|
||||||
<?php if ($display_mode === 'full'): ?>
|
<?php if ($display_mode === 'full' || $item_title_link == 'original'): ?>
|
||||||
<a class="original" rel="noreferrer" target="_blank"
|
<a class="original" rel="noreferrer" target="_blank"
|
||||||
href="<?= $item['url'] ?>"
|
href="<?= $item['url'] ?>"
|
||||||
<?= ($original_marks_read) ? 'data-action="mark-read"' : '' ?>
|
<?= ($original_marks_read) ? 'data-action="mark-read"' : '' ?>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<li class="hide-mobile">
|
<li class="hide-mobile">
|
||||||
<span title="<?= dt('%e %B %Y %k:%M', $item['updated']) ?>"><?= Helper\relative_time($item['updated']) ?></span>
|
<span title="<?= dt('%e %B %Y %k:%M', $item['updated']) ?>"><?= Helper\relative_time($item['updated']) ?></span>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($display_mode === 'full'): ?>
|
<?php if ($display_mode === 'full' || $item_title_link == 'original'): ?>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="?action=show&menu=<?= $menu ?><?= isset($group_id) ? '&group_id='.$group_id : '' ?>&id=<?= $item['id'] ?>"
|
href="?action=show&menu=<?= $menu ?><?= isset($group_id) ? '&group_id='.$group_id : '' ?>&id=<?= $item['id'] ?>"
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
'hide' => true,
|
'hide' => true,
|
||||||
'display_mode' => $display_mode,
|
'display_mode' => $display_mode,
|
||||||
|
'item_title_link' => $item_title_link,
|
||||||
'favicons' => $favicons,
|
'favicons' => $favicons,
|
||||||
'original_marks_read' => $original_marks_read,
|
'original_marks_read' => $original_marks_read,
|
||||||
'group_id' => $group_id,
|
'group_id' => $group_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user