diff options
| author | 2013-09-14 15:29:09 +0200 | |
|---|---|---|
| committer | 2013-09-14 15:29:09 +0200 | |
| commit | d47137cddd6a02bf609728c76b8adc7cdea1adf3 (patch) | |
| tree | e3ce9e6bbdfe7d32649130eea9df6e89ab3eaad7 /app/controllers/indexController.php | |
| parent | 2e0441195b65316cbef40574d55c7f1b305b3615 (diff) | |
Affiche le titre en cours sur la ligne du jours
En particulier en affichage mobile, il n'était pas facile de voir quelle
catégorie ou flux on était en train de lire. Ce patch l'affiche sur la
ligne du jours, avec une suggestion de style.
Diffstat (limited to 'app/controllers/indexController.php')
| -rwxr-xr-x | app/controllers/indexController.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php index 493384c5b..d1c615d6d 100755 --- a/app/controllers/indexController.php +++ b/app/controllers/indexController.php @@ -3,7 +3,7 @@ class indexController extends ActionController { private $get = false; private $nb_not_read = 0; - private $mode = 'all'; + private $mode = 'all'; //TODO: Is this used? public function indexAction () { $output = Request::param ('output'); @@ -40,6 +40,7 @@ class indexController extends ActionController { $this->view->cat_aside = $catDAO->listCategories (); $this->view->nb_favorites = $entryDAO->countFavorites (); $this->view->nb_total = $entryDAO->count (); + $this->view->currentName = ''; $this->view->get_c = ''; $this->view->get_f = ''; @@ -116,23 +117,27 @@ class indexController extends ActionController { */ private function checkAndProcessType ($type) { if ($type['type'] == 'all') { - View::prependTitle (Translate::t ('your_rss_feeds')); + $this->view->currentName = Translate::t ('your_rss_feeds'); + View::prependTitle ($this->view->currentName); $this->view->get_c = $type['type']; return false; } elseif ($type['type'] == 'favoris') { - View::prependTitle (Translate::t ('your_favorites')); + $this->view->currentName = Translate::t ('your_favorites'); + View::prependTitle ($this->view->currentName); $this->view->get_c = $type['type']; return false; } elseif ($type['type'] == 'public') { - View::prependTitle (Translate::t ('public')); + $this->view->currentName = Translate::t ('public'); + View::prependTitle ($this->view->currentName); $this->view->get_c = $type['type']; return false; } elseif ($type['type'] == 'c') { $catDAO = new CategoryDAO (); $cat = $catDAO->searchById ($type['id']); if ($cat) { + $this->view->currentName = $cat->name (); $nbnr = $cat->nbNotRead (); - View::prependTitle ($cat->name () . ($nbnr > 0 ? ' (' . $nbnr . ')' : '')); + View::prependTitle ($this->view->currentName . ($nbnr > 0 ? ' (' . $nbnr . ')' : '')); $this->view->get_c = $type['id']; return false; } else { @@ -142,8 +147,9 @@ class indexController extends ActionController { $feedDAO = new FeedDAO (); $feed = $feedDAO->searchById ($type['id']); if ($feed) { + $this->view->currentName = $feed->name (); $nbnr = $feed->nbNotRead (); - View::prependTitle ($feed->name () . ($nbnr > 0 ? ' (' . $nbnr . ')' : '')); + View::prependTitle ($this->view->currentName . ($nbnr > 0 ? ' (' . $nbnr . ')' : '')); $this->view->get_f = $type['id']; $this->view->get_c = $feed->category (); return false; |
