From ea849d7c68cc3de33825c1daafd06b9f8bbf747c Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 7 Dec 2014 15:03:42 +0100 Subject: Prepare better organization of view files for exts View files must be well-splitted to simplify work for extensions. See https://github.com/FreshRSS/FreshRSS/issues/252 --- app/views/helpers/index/normal/entry_bottom.phtml | 84 +++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 app/views/helpers/index/normal/entry_bottom.phtml (limited to 'app/views/helpers/index/normal/entry_bottom.phtml') diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml new file mode 100644 index 000000000..704644f99 --- /dev/null +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -0,0 +1,84 @@ +sharing; + } + + $bottomline_read = FreshRSS_Context::$conf->bottomline_read; + $bottomline_favorite = FreshRSS_Context::$conf->bottomline_favorite; + $bottomline_sharing = FreshRSS_Context::$conf->bottomline_sharing && (count($sharing) > 0); + $bottomline_tags = FreshRSS_Context::$conf->bottomline_tags; + $bottomline_date = FreshRSS_Context::$conf->bottomline_date; + $bottomline_link = FreshRSS_Context::$conf->bottomline_link; +?> -- cgit v1.2.3 From 930026df2159b027bc035f4ed15c39a43eb0e9fe Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 17 Dec 2014 21:24:49 +0100 Subject: Fix bug with new file organisation entry_bottom.phtml didn't find $feed variable. It's fixed now. --- app/views/helpers/index/normal/entry_bottom.phtml | 4 ++-- app/views/helpers/index/normal/entry_header.phtml | 9 +-------- app/views/index/normal.phtml | 9 +++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'app/views/helpers/index/normal/entry_bottom.phtml') diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 704644f99..e1961e2aa 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -36,7 +36,7 @@
  • entry->link()); - $title = urlencode($this->entry->title() . ' · ' . $feed->name()); + $title = urlencode($this->entry->title() . ' · ' . $this->feed->name()); ?>
  • diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index b751b884f..3d8b089b9 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -26,14 +26,7 @@ ?>categories, $this->entry->feed()); //We most likely already have the feed object in cache - if ($feed == null) { - $feed = $this->entry->feed(true); - if ($feed == null) { - $feed = FreshRSS_Feed::example(); - } - } - ?>
  • ✇ name(); ?>
  • + ?>
  • ✇ feed->name(); ?>
  • entry->title(); ?>
  • entry->date(); ?> 
  • diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index fd2289365..f2e1c5012 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -25,6 +25,15 @@ if (!empty($this->entries)) { continue; } + // We most likely already have the feed object in cache + $this->feed = FreshRSS_CategoryDAO::findFeed($this->categories, $this->entry->feed()); + if ($this->feed == null) { + $this->feed = $this->entry->feed(true); + if ($this->feed == null) { + $this->feed = FreshRSS_Feed::example(); + } + } + if ($display_today && $this->entry->isDay(FreshRSS_Days::TODAY, $today)) { ?>
    Date: Thu, 8 Jan 2015 21:37:59 +0100 Subject: Fix a bug related to sharing $item and $feed were not existing, replaced by other names. Introduce by the merging of dev in extension branch. --- app/views/helpers/index/normal/entry_bottom.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/helpers/index/normal/entry_bottom.phtml') diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 32317d027..20b4b332c 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -36,16 +36,16 @@