diff options
| author | 2014-10-05 19:11:43 +0200 | |
|---|---|---|
| committer | 2014-10-05 19:11:43 +0200 | |
| commit | 65ab90d3c77085abe9eb259bd7780f648051d49d (patch) | |
| tree | 44fef5098d9997906cc4a635d0d39c232387a3aa /app/views/helpers/view | |
| parent | b5dee73ea0ab3cc24c4857ac102e9e78cf20ab92 (diff) | |
Coding style (views)
See https://github.com/marienfressinaud/FreshRSS/issues/655
Diffstat (limited to 'app/views/helpers/view')
| -rw-r--r-- | app/views/helpers/view/global_view.phtml | 16 | ||||
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 60 | ||||
| -rw-r--r-- | app/views/helpers/view/reader_view.phtml | 14 | ||||
| -rwxr-xr-x | app/views/helpers/view/rss_view.phtml | 14 |
4 files changed, 52 insertions, 52 deletions
diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml index 0e553c957..2bac09d04 100644 --- a/app/views/helpers/view/global_view.phtml +++ b/app/views/helpers/view/global_view.phtml @@ -1,4 +1,4 @@ -<?php $this->partial ('nav_menu'); ?> +<?php $this->partial('nav_menu'); ?> <?php if (!empty($this->entries)) { ?> <div id="stream" class="global categories"> @@ -13,21 +13,21 @@ } foreach ($this->cat_aside as $cat) { - $feeds = $cat->feeds (); - if (!empty ($feeds)) { + $feeds = $cat->feeds(); + if (!empty($feeds)) { ?> <div class="box-category"> <div class="category"> - <a data-unread="<?php echo formatNumber($cat->nbNotRead()); ?>" class="btn" href="<?php $arUrl['params']['get'] = 'c_' . $cat->id (); echo Minz_Url::display($arUrl); ?>"> + <a data-unread="<?php echo formatNumber($cat->nbNotRead()); ?>" class="btn" href="<?php $arUrl['params']['get'] = 'c_' . $cat->id(); echo Minz_Url::display($arUrl); ?>"> <?php echo $cat->name(); ?> </a> </div> <ul class="feeds"> <?php foreach ($feeds as $feed) { ?> - <?php $not_read = $feed->nbNotRead (); ?> - <li id="f_<?php echo $feed->id (); ?>" class="item<?php echo $feed->inError () ? ' error' : ''; ?><?php echo $feed->nbEntries () == 0 ? ' empty' : ''; ?>"> - <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> - <a class="feed" data-unread="<?php echo formatNumber($feed->nbNotRead()); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php $arUrl['params']['get'] = 'f_' . $feed->id(); echo Minz_Url::display($arUrl); ?>"> + <?php $not_read = $feed->nbNotRead(); ?> + <li id="f_<?php echo $feed->id(); ?>" class="item<?php echo $feed->inError() ? ' error' : ''; ?><?php echo $feed->nbEntries() == 0 ? ' empty' : ''; ?>"> + <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> + <a class="feed" data-unread="<?php echo formatNumber($feed->nbNotRead()); ?>" data-priority="<?php echo $feed->priority(); ?>" href="<?php $arUrl['params']['get'] = 'f_' . $feed->id(); echo Minz_Url::display($arUrl); ?>"> <?php echo $feed->name(); ?> </a> </li> diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 66b79cd7f..109fad0eb 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -1,7 +1,7 @@ <?php -$this->partial ('aside_flux'); -$this->partial ('nav_menu'); +$this->partial('aside_flux'); +$this->partial('nav_menu'); if (!empty($this->entries)) { $display_today = true; @@ -30,72 +30,72 @@ if (!empty($this->entries)) { <div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php ?><div id="new-article"> - <a href="<?php echo Minz_Url::display ($this->url); ?>"><?php echo _t('new_article'); ?></a> + <a href="<?php echo Minz_Url::display($this->url); ?>"><?php echo _t('new_article'); ?></a> </div><?php foreach ($this->entries as $item) { - if ($display_today && $item->isDay (FreshRSS_Days::TODAY, $this->today)) { + if ($display_today && $item->isDay(FreshRSS_Days::TODAY, $this->today)) { ?><div class="day" id="day_today"><?php echo _t('today'); - ?><span class="date"> — <?php echo timestamptodate (time (), false); ?></span><?php + ?><span class="date"> — <?php echo timestamptodate(time(), false); ?></span><?php ?><span class="name"><?php echo $this->currentName; ?></span><?php ?></div><?php $display_today = false; } - if ($display_yesterday && $item->isDay (FreshRSS_Days::YESTERDAY, $this->today)) { + if ($display_yesterday && $item->isDay(FreshRSS_Days::YESTERDAY, $this->today)) { ?><div class="day" id="day_yesterday"><?php echo _t('yesterday'); - ?><span class="date"> — <?php echo timestamptodate (time () - 86400, false); ?></span><?php + ?><span class="date"> — <?php echo timestamptodate(time() - 86400, false); ?></span><?php ?><span class="name"><?php echo $this->currentName; ?></span><?php ?></div><?php $display_yesterday = false; } - if ($display_others && $item->isDay (FreshRSS_Days::BEFORE_YESTERDAY, $this->today)) { + if ($display_others && $item->isDay(FreshRSS_Days::BEFORE_YESTERDAY, $this->today)) { ?><div class="day" id="day_before_yesterday"><?php echo _t('before_yesterday'); ?><span class="name"><?php echo $this->currentName; ?></span><?php ?></div><?php $display_others = false; } - ?><div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>"> + ?><div class="flux<?php echo !$item->isRead() ? ' not_read' : ''; ?><?php echo $item->isFavorite() ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id(); ?>"> <ul class="horizontal-list flux_header"><?php if ($this->loginOk) { if ($topline_read) { ?><li class="item manage"><?php - $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id ())); + $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id())); if ($item->isRead()) { $arUrl['params']['is_read'] = 0; } ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php - echo _i($item->isRead () ? 'read' : 'unread'); ?></a><?php + echo _i($item->isRead() ? 'read' : 'unread'); ?></a><?php ?></li><?php } if ($topline_favorite) { ?><li class="item manage"><?php - $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id ())); + $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id())); if ($item->isFavorite()) { $arUrl['params']['is_favorite'] = 0; } ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php - echo _i($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php + echo _i($item->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php ?></li><?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->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(); } } - ?><li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li> - <li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li> - <?php if ($topline_date) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?> - <?php if ($topline_link) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo _i('link'); ?></a></li><?php } ?> + ?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $feed->id()); ?>"><img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li> + <li class="item title"><a target="_blank" href="<?php echo $item->link(); ?>"><?php echo $item->title(); ?></a></li> + <?php if ($topline_date) { ?><li class="item date"><?php echo $item->date(); ?> </li><?php } ?> + <?php if ($topline_link) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?> </ul> <div class="flux_content"> <div class="content <?php echo $content_width; ?>"> - <h1 class="title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></h1> + <h1 class="title"><a target="_blank" href="<?php echo $item->link(); ?>"><?php echo $item->title(); ?></a></h1> <?php $author = $item->author(); echo $author != '' ? '<div class="author">' . _t('by_author', $author) . '</div>' : '', @@ -106,32 +106,32 @@ if (!empty($this->entries)) { if ($this->loginOk) { if ($bottomline_read) { ?><li class="item manage"><?php - $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id ())); + $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id())); if ($item->isRead()) { $arUrl['params']['is_read'] = 0; } ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php - echo _i($item->isRead () ? 'read' : 'unread'); ?></a><?php + echo _i($item->isRead() ? 'read' : 'unread'); ?></a><?php ?></li><?php } if ($bottomline_favorite) { ?><li class="item manage"><?php - $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id ())); + $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id())); if ($item->isFavorite()) { $arUrl['params']['is_favorite'] = 0; } ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php - echo _i($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php + echo _i($item->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php ?></li><?php } } ?> <li class="item"><?php if ($bottomline_sharing) { - $link = urlencode ($item->link ()); - $title = urlencode ($item->title () . ' · ' . $feed->name ()); + $link = urlencode($item->link()); + $title = urlencode($item->title() . ' · ' . $feed->name()); ?><div class="dropdown"> - <div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div> - <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"> + <div id="dropdown-share-<?php echo $item->id();?>" class="dropdown-target"></div> + <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id();?>"> <?php echo _i('share'); ?> <?php echo _t('share'); ?> </a> @@ -168,10 +168,10 @@ if (!empty($this->entries)) { </li><?php } if ($bottomline_date) { - ?><li class="item date"><?php echo $item->date (); ?></li><?php + ?><li class="item date"><?php echo $item->date(); ?></li><?php } if ($bottomline_link) { - ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo _i('link'); ?></a></li><?php + ?><li class="item link"><a target="_blank" href="<?php echo $item->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?> </ul> </div> @@ -181,7 +181,7 @@ if (!empty($this->entries)) { <?php $this->renderHelper('pagination'); ?> </div> -<?php $this->partial ('nav_entries'); ?> +<?php $this->partial('nav_entries'); ?> <?php } else { ?> <div id="stream" class="prompt alert alert-warn normal"> diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml index 368bf7fdc..894c71924 100644 --- a/app/views/helpers/view/reader_view.phtml +++ b/app/views/helpers/view/reader_view.phtml @@ -1,5 +1,5 @@ <?php -$this->partial ('nav_menu'); +$this->partial('nav_menu'); if (!empty($this->entries)) { $lazyload = $this->conf->lazyload; @@ -9,17 +9,17 @@ if (!empty($this->entries)) { <div id="stream" class="reader"> <?php foreach ($this->entries as $item) { ?> - <div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>"> + <div class="flux<?php echo !$item->isRead() ? ' not_read' : ''; ?><?php echo $item->isFavorite() ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id(); ?>"> <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 - if (empty($feed)) $feed = $item->feed (true); + $feed = FreshRSS_CategoryDAO::findFeed($this->cat_aside, $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 (); ?>"> - <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span> + <a href="<?php echo $item->link(); ?>"> + <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span> </a> - <h1 class="title"><?php echo $item->title (); ?></h1> + <h1 class="title"><?php echo $item->title(); ?></h1> <div class="author"><?php $author = $item->author(); diff --git a/app/views/helpers/view/rss_view.phtml b/app/views/helpers/view/rss_view.phtml index fd8a8af63..e34b15ab1 100755 --- a/app/views/helpers/view/rss_view.phtml +++ b/app/views/helpers/view/rss_view.phtml @@ -6,22 +6,22 @@ <description><?php echo _t('rss_feeds_of', $this->rss_title); ?></description> <pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate> <lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate> - <atom:link href="<?php echo Minz_Url::display ($this->url, 'html', true); ?>" rel="self" type="application/rss+xml" /> + <atom:link href="<?php echo Minz_Url::display($this->url, 'html', true); ?>" rel="self" type="application/rss+xml" /> <?php foreach ($this->entries as $item) { ?> <item> - <title><?php echo $item->title (); ?></title> - <link><?php echo $item->link (); ?></link> - <?php $author = $item->author (); ?> + <title><?php echo $item->title(); ?></title> + <link><?php echo $item->link(); ?></link> + <?php $author = $item->author(); ?> <?php if ($author != '') { ?> <dc:creator><?php echo $author; ?></dc:creator> <?php } ?> <description><![CDATA[<?php - echo $item->content (); + echo $item->content(); ?>]]></description> - <pubDate><?php echo date('D, d M Y H:i:s O', $item->date (true)); ?></pubDate> - <guid isPermaLink="false"><?php echo $item->id (); ?></guid> + <pubDate><?php echo date('D, d M Y H:i:s O', $item->date(true)); ?></pubDate> + <guid isPermaLink="false"><?php echo $item->id(); ?></guid> </item> <?php } ?> |
