Jelajahi Sumber

Reader view comes back!

See https://github.com/marienfressinaud/FreshRSS/issues/634
Marien Fressinaud 11 tahun lalu
induk
melakukan
0d6993fe08

+ 9 - 0
app/Controllers/indexController.php

@@ -69,6 +69,15 @@ class FreshRSS_index_Controller extends Minz_ActionController {
 		Minz_View::prependTitle($title . ' · ');
 	}
 
+	/**
+	 * This action displays the reader view of FreshRSS.
+	 *
+	 * @todo: change this view into specific CSS rules?
+	 */
+	public function readerAction() {
+		$this->normalAction();
+	}
+
 	/**
 	 * This action displays the global view of FreshRSS.
 	 */

+ 5 - 0
app/layout/nav_menu.phtml

@@ -133,6 +133,11 @@
 			<?php echo _i("view-normal"); ?>
 		</a>
 
+		<?php $url_output['a'] = 'reader'; ?>
+		<a class="view_reader btn <?php echo $actual_view == 'reader'? 'active' : ''; ?>" title="<?php echo _t('global_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
+			<?php echo _i("view-reader"); ?>
+		</a>
+
 		<?php $url_output['a'] = 'global'; ?>
 		<a class="view_global btn <?php echo $actual_view == 'global'? 'active' : ''; ?>" title="<?php echo _t('global_view'); ?>" href="<?php echo Minz_Url::display($url_output); ?>">
 			<?php echo _i("view-global"); ?>

+ 1 - 1
app/views/helpers/view/reader_view.phtml → app/views/index/reader.phtml

@@ -13,7 +13,7 @@ if (!empty($this->entries)) {
 		<div class="flux_content">
 			<div class="content <?php echo $content_width; ?>">
 				<?php
-					$feed = FreshRSS_CategoryDAO::findFeed($this->cat_aside, $item->feed());	//We most likely already have the feed object in cache
+					$feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feed());	//We most likely already have the feed object in cache
 					if (empty($feed)) $feed = $item->feed(true);
 				?>
 				<a href="<?php echo $item->link(); ?>">