diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-14 21:15:16 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-14 21:15:47 +0200 |
commit | 1e37bc139bb28e6fe9b0dd0d477e2dbef5a2cab9 (patch) | |
tree | fa56b07316b914f39e2dd02b70a61b05b016b967 /templates | |
parent | 365cecd2ec1bf2552ae0d8e064680ed36b0bf04e (diff) |
Whitespace cleanup
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main.php | 1 | ||||
-rw-r--r-- | templates/part.feeds.php | 4 | ||||
-rw-r--r-- | templates/part.items.php | 12 | ||||
-rw-r--r-- | templates/part.listfolder.php | 2 | ||||
-rw-r--r-- | templates/subscribelet.php | 2 | ||||
-rw-r--r-- | templates/test.php | 2 |
6 files changed, 11 insertions, 12 deletions
diff --git a/templates/main.php b/templates/main.php index e2a27c324..3c4eff3f4 100644 --- a/templates/main.php +++ b/templates/main.php @@ -59,4 +59,3 @@ echo $this->inc("part.dialogues"); <div id="appsettings" class="popup bottomleft hidden"></div> </div> - diff --git a/templates/part.feeds.php b/templates/part.feeds.php index 77afb8d5e..14a7b0dd4 100644 --- a/templates/part.feeds.php +++ b/templates/part.feeds.php @@ -1,7 +1,7 @@ <?php function print_collection_list($list, $lastViewedFeedId, $lastViewedFeedType) { - + foreach($list as $collection) { if ($collection instanceOf OCA\News\Folder) { $tmpl_folder = new OCP\Template("news", "part.listfolder"); @@ -9,7 +9,7 @@ function print_collection_list($list, $lastViewedFeedId, $lastViewedFeedType) { $tmpl_folder->assign('lastViewedFeedId', $lastViewedFeedId); $tmpl_folder->assign('lastViewedFeedType', $lastViewedFeedType); $tmpl_folder->printpage(); - print_collection_list($collection->getChildren(), $lastViewedFeedId, + print_collection_list($collection->getChildren(), $lastViewedFeedId, $lastViewedFeedType); echo '</ul></li>'; } diff --git a/templates/part.items.php b/templates/part.items.php index e318a8466..174a96e5e 100644 --- a/templates/part.items.php +++ b/templates/part.items.php @@ -4,13 +4,13 @@ $items = isset($_['items']) ? $_['items'] : ''; echo '<ul>'; foreach($items as $item) { - + if($item->isRead()) { $newsItemClass = "read"; } else { $newsItemClass = ""; } - + if($item->isImportant()) { $starClass = 'important'; $startTitle = $l->t('Mark as unimportant'); @@ -21,7 +21,7 @@ foreach($items as $item) { echo '<li class="feed_item ' . $newsItemClass .'" data-id="' . $item->getId() . '" data-feedid="' . $item->getFeedId() . '">'; echo '<span class="timestamp">' . $item->getDate() . '</span>'; - echo '<h2 class="item_date"><time class="timeago" datetime="' . + echo '<h2 class="item_date"><time class="timeago" datetime="' . date('c', $item->getDate()) . '">' . date('F j, Y, g:i a', $item->getDate()) . '</time>' . '</h2>'; echo '<div class="utils">'; @@ -30,12 +30,12 @@ foreach($items as $item) { echo '</ul>'; echo '</div>'; - echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . htmlspecialchars($item->getTitle(), ENT_QUOTES, 'UTF-8') . '</a></h1>'; - + echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . htmlspecialchars($item->getTitle(), ENT_QUOTES, 'UTF-8') . '</a></h1>'; + if(($item->getAuthor() !== null) && (trim($item->getAuthor()) != '')) { echo '<h2 class="item_author">'. $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8') . '</h2>'; } - + echo '<div class="body">' . $item->getBody() . '</div>'; echo '<div class="bottom_utils">'; diff --git a/templates/part.listfolder.php b/templates/part.listfolder.php index 847c05cad..4f3b6fdef 100644 --- a/templates/part.listfolder.php +++ b/templates/part.listfolder.php @@ -6,7 +6,7 @@ require_once(\OC_App::getAppPath('news') . '/lib/feedtypes.php'); $l = new OC_l10n('news'); -$folder = isset($_['folder']) ? $_['folder'] : null; +$folder = isset($_['folder']) ? $_['folder'] : null; $folderId = $folder->getId(); $folderName = $folder->getName(); diff --git a/templates/subscribelet.php b/templates/subscribelet.php index d4a8994fc..d0c5f371d 100644 --- a/templates/subscribelet.php +++ b/templates/subscribelet.php @@ -5,4 +5,4 @@ function createSubscribelet() { echo '<small>' . $l->t('Drag this to your browser bookmarks and click on it whenever you want to subscribe to a webpage quickly:') . '</small>' . '<a class="button bookmarklet" href="javascript:(function() {var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('news', 'subscribe.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=150px,width=360px,resizable=1,alwaysRaised=1\');a.setTimeout(function() {d.focus()},300);})();">' . $l->t('Subscribe') . '</a>'; -} +} diff --git a/templates/test.php b/templates/test.php index 3ef18c954..348f495ce 100644 --- a/templates/test.php +++ b/templates/test.php @@ -1,4 +1,4 @@ -<?php +<?php $itemmapper = new OCA\News\ItemMapper(); |