From ee805bebfca89f39fcd6f2f7bcb9948c95a151cf Mon Sep 17 00:00:00 2001 From: denfil Date: Sat, 27 Feb 2016 22:21:18 +0300 Subject: [PATCH] Add to preferences Item title links to --- controllers/bookmark.php | 1 + controllers/config.php | 2 ++ controllers/history.php | 1 + controllers/item.php | 1 + locales/fr_FR/translations.php | 2 ++ locales/ru_RU/translations.php | 2 ++ models/config.php | 9 +++++++++ templates/bookmarks.php | 3 ++- templates/config.php | 3 +++ templates/history.php | 1 + templates/item.php | 4 ++-- templates/unread_items.php | 1 + 12 files changed, 27 insertions(+), 3 deletions(-) diff --git a/controllers/bookmark.php b/controllers/bookmark.php index 47f4607..f63d7cc 100644 --- a/controllers/bookmark.php +++ b/controllers/bookmark.php @@ -46,6 +46,7 @@ Router\get_action('bookmarks', function() { 'order' => '', 'direction' => '', 'display_mode' => Model\Config\get('items_display_mode'), + 'item_title_link' => Model\Config\get('item_title_link'), 'items' => $items, 'nb_items' => $nb_items, 'offset' => $offset, diff --git a/controllers/config.php b/controllers/config.php index cf3ccd2..f976cfe 100644 --- a/controllers/config.php +++ b/controllers/config.php @@ -123,6 +123,7 @@ Router\get_action('config', function() { 'theme_options' => Model\Config\get_themes(), 'sorting_options' => Model\Config\get_sorting_directions(), '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(), 'nb_unread_items' => Model\Item\count_by_status('unread'), 'menu' => 'config', @@ -161,6 +162,7 @@ Router\post_action('config', function() { 'sorting_options' => Model\Config\get_sorting_directions(), 'redirect_nothing_to_read_options' => Model\Config\get_nothing_to_read_redirections(), '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'), 'menu' => 'config', 'title' => t('Preferences') diff --git a/controllers/history.php b/controllers/history.php index 98e1957..0d91d96 100644 --- a/controllers/history.php +++ b/controllers/history.php @@ -21,6 +21,7 @@ Router\get_action('history', function() { 'order' => '', 'direction' => '', 'display_mode' => Model\Config\get('items_display_mode'), + 'item_title_link' => Model\Config\get('item_title_link'), 'nb_items' => $nb_items, 'nb_unread_items' => Model\Item\count_by_status('unread'), 'offset' => $offset, diff --git a/controllers/item.php b/controllers/item.php index e69e2c3..df9e930 100644 --- a/controllers/item.php +++ b/controllers/item.php @@ -39,6 +39,7 @@ Router\get_action('unread', function() { 'order' => $order, 'direction' => $direction, 'display_mode' => Model\Config\get('items_display_mode'), + 'item_title_link' => Model\Config\get('item_title_link'), 'group_id' => $group_id, 'items' => $items, 'nb_items' => $nb_items, diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php index 65c1736..335b2f2 100644 --- a/locales/fr_FR/translations.php +++ b/locales/fr_FR/translations.php @@ -242,4 +242,6 @@ return array( 'Groups' => 'Libellés', 'Back to the group' => 'Revenir sur le groupe', 'view' => 'voir', + // 'Item title links to' => '', + // 'Original' => '' ); diff --git a/locales/ru_RU/translations.php b/locales/ru_RU/translations.php index 4513746..284e85b 100644 --- a/locales/ru_RU/translations.php +++ b/locales/ru_RU/translations.php @@ -242,4 +242,6 @@ return array( 'Groups' => 'Группы', 'Back to the group' => 'Назад в группу', 'view' => 'смотреть', + 'Item title links to' => 'Заголовок статьи ведет на', + 'Original' => 'Оригинал' ); diff --git a/models/config.php b/models/config.php index e4aff49..9a84385 100644 --- a/models/config.php +++ b/models/config.php @@ -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 function get_autoflush_read_options() { diff --git a/templates/bookmarks.php b/templates/bookmarks.php index 41406f3..66c1fed 100644 --- a/templates/bookmarks.php +++ b/templates/bookmarks.php @@ -18,6 +18,7 @@ 'offset' => $offset, 'hide' => false, 'display_mode' => $display_mode, + 'item_title_link' => $item_title_link, 'favicons' => $favicons, 'original_marks_read' => $original_marks_read, )) ?> @@ -26,4 +27,4 @@ $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction)) ?> - \ No newline at end of file + diff --git a/templates/config.php b/templates/config.php index 6fe4eaf..346ce51 100644 --- a/templates/config.php +++ b/templates/config.php @@ -66,6 +66,9 @@
+ +
+
diff --git a/templates/history.php b/templates/history.php index b8cbebe..f71dd53 100644 --- a/templates/history.php +++ b/templates/history.php @@ -21,6 +21,7 @@ 'offset' => $offset, 'hide' => true, 'display_mode' => $display_mode, + 'item_title_link' => $item_title_link, 'favicons' => $favicons, 'original_marks_read' => $original_marks_read, )) ?> diff --git a/templates/item.php b/templates/item.php index 40cf7db..d20ca49 100644 --- a/templates/item.php +++ b/templates/item.php @@ -10,7 +10,7 @@ - + @@ -42,7 +42,7 @@
  • - +
  • $offset, 'hide' => true, 'display_mode' => $display_mode, + 'item_title_link' => $item_title_link, 'favicons' => $favicons, 'original_marks_read' => $original_marks_read, 'group_id' => $group_id,