From 80cffa6de51771cd80995fb1c4f1e04ee868eb45 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 21 Oct 2014 16:46:36 +0200 Subject: Views are in dedicated actions + improve Context - Seperate normal, global and rss outputs in dedicated actions (NOT WORKING YET!) - Rewrite aside_flux and nav_menu to use Context object - Improve Context object See https://github.com/marienfressinaud/FreshRSS/issues/634 --- app/views/helpers/view/normal_view.phtml | 191 ------------------------------- app/views/helpers/view/rss_view.phtml | 29 ----- 2 files changed, 220 deletions(-) delete mode 100644 app/views/helpers/view/normal_view.phtml delete mode 100755 app/views/helpers/view/rss_view.phtml (limited to 'app/views/helpers') diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml deleted file mode 100644 index afe8ed872..000000000 --- a/app/views/helpers/view/normal_view.phtml +++ /dev/null @@ -1,191 +0,0 @@ -partial('aside_flux'); -$this->partial('nav_menu'); - -if (!empty($this->entries)) { - $display_today = true; - $display_yesterday = true; - $display_others = true; - if (FreshRSS_Auth::hasAccess()) { - $sharing = FreshRSS_Context::$conf->sharing; - } else { - $sharing = array(); - } - $hidePosts = !FreshRSS_Context::$conf->display_posts; - $lazyload = FreshRSS_Context::$conf->lazyload; - $topline_read = FreshRSS_Context::$conf->topline_read; - $topline_favorite = FreshRSS_Context::$conf->topline_favorite; - $topline_date = FreshRSS_Context::$conf->topline_date; - $topline_link = FreshRSS_Context::$conf->topline_link; - $bottomline_read = FreshRSS_Context::$conf->bottomline_read; - $bottomline_favorite = FreshRSS_Context::$conf->bottomline_favorite; - $bottomline_sharing = FreshRSS_Context::$conf->bottomline_sharing && (count($sharing)); - $bottomline_tags = FreshRSS_Context::$conf->bottomline_tags; - $bottomline_date = FreshRSS_Context::$conf->bottomline_date; - $bottomline_link = FreshRSS_Context::$conf->bottomline_link; - - $content_width = FreshRSS_Context::$conf->content_width; -?> - -
- -
entries as $item) { - if ($display_today && $item->isDay(FreshRSS_Days::TODAY, $this->today)) { - ?>
currentName; ?>
isDay(FreshRSS_Days::YESTERDAY, $this->today)) { - ?>
currentName; ?>
isDay(FreshRSS_Days::BEFORE_YESTERDAY, $this->today)) { - ?>
currentName; ?>
-
  • 'entry', 'a' => 'read', 'params' => array('id' => $item->id())); - if ($item->isRead()) { - $arUrl['params']['is_read'] = 0; - } - ?>isRead() ? 'read' : 'unread'); ?>
  • 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id())); - if ($item->isFavorite()) { - $arUrl['params']['is_favorite'] = 0; - } - ?>isFavorite() ? 'starred' : 'non-starred'); ?>
  • cat_aside, $item->feed()); //We most likely already have the feed object in cache - if ($feed == null) { - $feed = $item->feed(true); - if ($feed == null) { - $feed = FreshRSS_Feed::example(); - } - } - ?>
  • ✇ name(); ?>
  • -
  • title(); ?>
  • -
  • date(); ?> 
  • - -
- -
-
-

title(); ?>

- author(); - echo $author != '' ? '
' . _t('by_author', $author) . '
' : '', - $lazyload && $hidePosts ? lazyimg($item->content()) : $item->content(); - ?> -
-
  • 'entry', 'a' => 'read', 'params' => array('id' => $item->id())); - if ($item->isRead()) { - $arUrl['params']['is_read'] = 0; - } - ?>isRead() ? 'read' : 'unread'); ?>
  • 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id())); - if ($item->isFavorite()) { - $arUrl['params']['is_favorite'] = 0; - } - ?>isFavorite() ? 'starred' : 'non-starred'); ?>
  • -
  • link()); - $title = urlencode($item->title() . ' · ' . $feed->name()); - ?> - -
  • tags() : null; - if (!empty($tags)) { - ?>
  • - -
  • date(); ?>
  • -
-
-
- - - renderHelper('pagination'); ?> -
- -partial('nav_entries'); ?> - - -
-

-

-
- diff --git a/app/views/helpers/view/rss_view.phtml b/app/views/helpers/view/rss_view.phtml deleted file mode 100755 index e34b15ab1..000000000 --- a/app/views/helpers/view/rss_view.phtml +++ /dev/null @@ -1,29 +0,0 @@ -'; ?> - - - <?php echo $this->rss_title; ?> - - rss_title); ?> - - GMT - -entries as $item) { -?> - - <?php echo $item->title(); ?> - link(); ?> - author(); ?> - - - - content(); -?>]]> - date(true)); ?> - id(); ?> - - - - - -- cgit v1.2.3