From 84c78098d27de624319df37ffb1a522318ec6778 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Sun, 10 Dec 2017 11:31:19 +0100 Subject: added new extension hook using hook for reading modes in navigation --- app/layout/nav_menu.phtml | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'app/layout') diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index f6d824d55..c0141e8a4 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -131,20 +131,38 @@
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index f35732c8f..2f25b6dc2 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -37,7 +37,7 @@ $empty = $feed->nbEntries() === 0 ? ' empty' : ''; $url_base['params']['get'] = 'f_' . $feed->id(); ?> -
  • +
  • ✇ name(); ?>
  • diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index 48f760d3e..26af0bd7c 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -125,7 +125,7 @@ $error = $feed->inError() ? ' error' : ''; $empty = $feed->nbEntries() == 0 ? ' empty' : ''; ?> -
  • diff --git a/p/api/greader.php b/p/api/greader.php index 99304f4ec..72f886190 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -261,8 +261,8 @@ function subscriptionList() { $pdo = new MyPDO(); $stm = $pdo->prepare('SELECT f.id, f.name, f.url, f.website, c.id as c_id, c.name as c_name FROM `%_feed` f - INNER JOIN `%_category` c ON c.id = f.category'); - $stm->execute(); + INNER JOIN `%_category` c ON c.id = f.category AND f.priority >= :priority_normal'); + $stm->execute(array(':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL)); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $salt = FreshRSS_Context::$system_conf->salt; diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index e5e1bca05..72487ca17 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -71,6 +71,9 @@ img.favicon { width: 16px; vertical-align: middle; } +.feed.mute::before { + content: '🔇'; +} /*=== Videos */ iframe, embed, object, video { -- cgit v1.2.3 From 97d4250bd308175b72785f784d5b15e41ed7b04f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 1 Jan 2018 20:48:33 +0100 Subject: Minor syntax --- app/Models/ReadingMode.php | 2 +- app/layout/nav_menu.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/layout') diff --git a/app/Models/ReadingMode.php b/app/Models/ReadingMode.php index 06170a468..1e97e228a 100644 --- a/app/Models/ReadingMode.php +++ b/app/Models/ReadingMode.php @@ -107,7 +107,7 @@ class FreshRSS_ReadingMode { public static function getReadingModes() { $actualView = Minz_Request::actionName(); $defaultCtrl = Minz_Request::defaultControllerName(); - $isDefaultCtrl = Minz_Request::controllerName() == $defaultCtrl; + $isDefaultCtrl = Minz_Request::controllerName() === $defaultCtrl; $urlOutput = Minz_Request::currentRequest(); $readingModes = array( diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 403ac5cd6..a018a7185 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -136,7 +136,7 @@ $readingModes = Minz_ExtensionManager::callHook('nav_reading_modes', $readingModes); /** @var FreshRSS_ReadingMode $mode */ - foreach($readingModes as $mode) { + foreach ($readingModes as $mode) { ?> getName(); ?> -- cgit v1.2.3 From 047fa17aeb65dfb6b551bf73e610057e8d78142c Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Wed, 24 Jan 2018 19:37:24 +0100 Subject: fixed css classes for reading mode buttons #1714 --- app/Models/ReadingMode.php | 24 ++++++++++++++++++------ app/layout/nav_menu.phtml | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) (limited to 'app/layout') diff --git a/app/Models/ReadingMode.php b/app/Models/ReadingMode.php index 1e97e228a..06af1704c 100644 --- a/app/Models/ReadingMode.php +++ b/app/Models/ReadingMode.php @@ -5,6 +5,10 @@ */ class FreshRSS_ReadingMode { + /** + * @var string + */ + protected $id; /** * @var string */ @@ -24,18 +28,26 @@ class FreshRSS_ReadingMode { /** * ReadingMode constructor. - * @param string $name + * @param string $id * @param string $title * @param string[] $urlParams * @param bool $active */ - public function __construct($name, $title, $urlParams, $active) { - $this->name = $name; + public function __construct($id, $title, $urlParams, $active) { + $this->id = $id; + $this->name = _i($id); $this->title = $title; $this->urlParams = $urlParams; $this->isActive = $active; } + /** + * @return string + */ + public function getId() { + return $this->id; + } + /** * @return string */ @@ -112,19 +124,19 @@ class FreshRSS_ReadingMode { $readingModes = array( new FreshRSS_ReadingMode( - _i("view-normal"), + "view-normal", _t('index.menu.normal_view'), array_merge($urlOutput, array('c' => $defaultCtrl, 'a' => 'normal')), ($isDefaultCtrl && $actualView === 'normal') ), new FreshRSS_ReadingMode( - _i("view-global"), + "view-global", _t('index.menu.global_view'), array_merge($urlOutput, array('c' => $defaultCtrl, 'a' => 'global')), ($isDefaultCtrl && $actualView === 'global') ), new FreshRSS_ReadingMode( - _i("view-reader"), + "view-reader", _t('index.menu.reader_view'), array_merge($urlOutput, array('c' => $defaultCtrl, 'a' => 'reader')), ($isDefaultCtrl && $actualView === 'reader') diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 7632b944c..e9128d44a 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -138,7 +138,7 @@ /** @var FreshRSS_ReadingMode $mode */ foreach ($readingModes as $mode) { ?> - + getName(); ?> Date: Fri, 26 Jan 2018 08:17:32 +0100 Subject: Fix shortcuts for view switching I've introduced shortcuts to switch between view in #1755. They have been broken by #1714. Then I've made an ugly fix in #1758. This change revert all changes to have something better. See #1757 --- app/layout/nav_menu.phtml | 2 +- p/scripts/main.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/layout') diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index e9128d44a..ab82c723f 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -155,7 +155,7 @@ $url_output['params']['hours'] = FreshRSS_Context::$user_conf->since_hours_posts_per_rss; } ?> - +
  • diff --git a/p/scripts/main.js b/p/scripts/main.js index fb01461c6..f8d20767a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -705,25 +705,25 @@ function init_shortcuts() { }); shortcut.add(shortcuts.normal_view, function () { - $('#nav_menu_views a').get(0).click(); + $('#nav_menu_views .view-normal').get(0).click(); }, { 'disable_in_input': true }); shortcut.add(shortcuts.global_view, function () { - $('#nav_menu_views a').get(1).click(); + $('#nav_menu_views .view-global').get(0).click(); }, { 'disable_in_input': true }); shortcut.add(shortcuts.reading_view, function () { - $('#nav_menu_views a').get(2).click(); + $('#nav_menu_views .view-reader').get(0).click(); }, { 'disable_in_input': true }); shortcut.add(shortcuts.rss_view, function () { - $('#nav_menu_views a').get(-1).click(); + $('#nav_menu_views .view-rss').get(0).click(); }, { 'disable_in_input': true }); -- cgit v1.2.3