summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-21 18:19:23 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-21 18:19:23 +0200
commit66c73a96ac2dda076bcfe0dc0a1ca2a7e169149d (patch)
treedc0318fa459e4f313217ee38e4bc63524513d721 /templates
parentf5e64d35c05b14016eb4fffff7199386a97a9b43 (diff)
first try to set indention limit at 80 characters in php
Diffstat (limited to 'templates')
-rw-r--r--templates/admin.php13
-rw-r--r--templates/index.php28
-rw-r--r--templates/part.content.firstrun.php12
-rw-r--r--templates/part.content.php91
-rw-r--r--templates/part.content.shortcuts.php12
-rw-r--r--templates/part.navigation.addfeed.php33
-rw-r--r--templates/part.navigation.addfolder.php14
-rw-r--r--templates/part.navigation.feed.php38
-rw-r--r--templates/part.navigation.folder.php72
-rw-r--r--templates/part.navigation.unreadfeed.php6
-rw-r--r--templates/part.settings.php31
11 files changed, 264 insertions, 86 deletions
diff --git a/templates/admin.php b/templates/admin.php
index c1aa99b6f..8786e892c 100644
--- a/templates/admin.php
+++ b/templates/admin.php
@@ -27,8 +27,9 @@ style('news', 'admin');
<p>
<em>
<?php p($l->t(
- 'Minimum amount of seconds after deleted feeds and folders are ' .
- 'removed from the database; values below 60 seconds are ignored'
+ 'Minimum amount of seconds after deleted feeds and folders ' .
+ 'are removed from the database; values below 60 seconds are ' .
+ 'ignored'
)); ?></em>
</p>
<p><input type="text" name="news-auto-purge-minimum-interval"
@@ -59,7 +60,9 @@ style('news', 'admin');
</label>
</p>
<p>
- <em><?php p($l->t('How many seconds a feed should be cached')); ?></em>
+ <em>
+ <?php p($l->t('How many seconds a feed should be cached')); ?>
+ </em>
</p>
<p><input type="text" name="news-cache-duration"
value="<?php p($_['cacheDuration']); ?>"></p>
@@ -73,8 +76,8 @@ style('news', 'admin');
<p>
<em>
<?php p($l->t(
- 'Maximum number of seconds to wait for an RSS or Atom feed to ' .
- 'load; if it takes longer the update will be aborted.'
+ 'Maximum number of seconds to wait for an RSS or Atom feed ' .
+ 'to load; if it takes longer the update will be aborted.'
)); ?></em>
</p>
<p><input type="text" name="news-feed-fetcher-timeout"
diff --git a/templates/index.php b/templates/index.php
index f4dd97b7f..7fe58a4c2 100644
--- a/templates/index.php
+++ b/templates/index.php
@@ -18,18 +18,27 @@ script('news', [
<div id="app" ng-app="News" ng-cloak ng-strict-di ng-controller="AppController as App">
- <div id="global-loading" class="icon-loading" ng-show="App.loading.isLoading('global')"></div>
+ <div id="global-loading"
+ class="icon-loading"
+ ng-show="App.loading.isLoading('global')"></div>
<!-- navigation -->
- <div id="app-navigation" ng-controller="NavigationController as Navigation" ng-hide="App.loading.isLoading('global')">
- <news-title-unread-count unread-count="{{ Navigation.getUnreadCount() }}"></news-title-unread-count>
+ <div id="app-navigation"
+ ng-controller="NavigationController as Navigation"
+ ng-hide="App.loading.isLoading('global')">
+
+ <news-title-unread-count
+ unread-count="{{ Navigation.getUnreadCount() }}">
+ </news-title-unread-count>
<ul class="with-icon" data-id="0" news-droppable>
<?php print_unescaped($this->inc('part.navigation.addfeed')) ?>
<?php print_unescaped($this->inc('part.navigation.addfolder')) ?>
<?php print_unescaped($this->inc('part.navigation.unreadfeed')) ?>
<?php print_unescaped($this->inc('part.navigation.starredfeed')) ?>
- <?php print_unescaped($this->inc('part.navigation.feed', ['folderId' => '0'])) ?>
+ <?php print_unescaped($this->inc(
+ 'part.navigation.feed', ['folderId' => '0']
+ )) ?>
<?php print_unescaped($this->inc('part.navigation.folder')) ?>
</ul>
@@ -40,12 +49,17 @@ script('news', [
</div>
<!-- content -->
- <script type="text/ng-template" id="content.html"><?php print_unescaped($this->inc('part.content')) ?></script>
- <script type="text/ng-template" id="shortcuts.html"><?php print_unescaped($this->inc('part.content.shortcuts')) ?></script>
+ <script type="text/ng-template" id="content.html">
+ <?php print_unescaped($this->inc('part.content')) ?>
+ </script>
+ <script type="text/ng-template" id="shortcuts.html">
+ <?php print_unescaped($this->inc('part.content.shortcuts')) ?>
+ </script>
<div id="app-content"
ng-class="{
- 'loading-content': App.loading.isLoading('content') && !App.loading.isLoading('global'),
+ 'loading-content': App.loading.isLoading('content') &&
+ !App.loading.isLoading('global'),
'first-run': App.isFirstRun()
}"
tabindex="-1"
diff --git a/templates/part.content.firstrun.php b/templates/part.content.firstrun.php
index 17d0b22ff..a089ba729 100644
--- a/templates/part.content.firstrun.php
+++ b/templates/part.content.firstrun.php
@@ -1,7 +1,15 @@
<div id="first-run">
<div>
<div class="helper"><h1><?php p($l->t('Add a feed')) ?></h1></div>
- <div class="title"><h1><?php p($l->t('There are no feeds yet. Go ahead and add some')) ?> :)</h1></div>
- <div class="helper"><h1><?php p($l->t('Import feeds and articles')) ?></h1></div>
+ <div class="title">
+ <h1>
+ <?php
+ p($l->t('There are no feeds yet. Go ahead and add some'))
+ ?> :)
+ </h1>
+ </div>
+ <div class="helper">
+ <h1><?php p($l->t('Import feeds and articles')) ?></h1>
+ </div>
</div>
</div> \ No newline at end of file
diff --git a/templates/part.content.php b/templates/part.content.php
index 10f8d860e..beb8bd24d 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -2,13 +2,21 @@
<div news-auto-focus="#app-content"
id="articles"
- ng-class="{compact: Content.isCompactView(), 'feed-view': Content.isFeed()}">
- <div class="pull-to-refresh" ng-class="{'show-pull-to-refresh': showPullToRefresh}">
- <button ng-click="Content.refresh()"><?php p($l->t('Refresh')) ?> (r)</button>
+ ng-class="{
+ compact: Content.isCompactView(),
+ 'feed-view': Content.isFeed()
+ }">
+ <div class="pull-to-refresh" ng-class="{
+ 'show-pull-to-refresh': showPullToRefresh
+ }">
+ <button ng-click="Content.refresh()">
+ <?php p($l->t('Refresh')) ?> (r)
+ </button>
</div>
<ul>
<li class="item {{ Content.getFeed(item.feedId).cssClass }}"
- ng-repeat="item in Content.getItems() | orderBy:[Content.orderBy()] track by item.id"
+ ng-repeat="item in Content.getItems() |
+ orderBy:[Content.orderBy()] track by item.id"
ng-click="Content.markRead(item.id)"
ng-class="{read: !item.unread, open: item.show}"
data-id="{{ item.id }}">
@@ -26,22 +34,53 @@
</li>
<li class="title only-in-compact"
title="{{ item.title }}"
- ng-class="{'icon-rss': !Content.getFeed(item.feedId).faviconLink }"
- ng-style="{ backgroundImage: 'url(' + Content.getFeed(item.feedId).faviconLink + ')'}">
+ ng-class="{
+ 'icon-rss':
+ !Content.getFeed(item.feedId).faviconLink
+ }"
+ ng-style="{
+ backgroundImage:
+ 'url('
+ + Content.getFeed(item.feedId).faviconLink +
+ ')'
+ }">
<h1><a>{{ item.title }}</a></h1>
</li>
<li class="only-in-compact">
- <time class="date" title="{{ item.pubDate*1000|date:'yyyy-MM-dd HH:mm:ss' }}"
- datetime="{{ item.pubDate*1000|date:'yyyy-MM-ddTHH:mm:ssZ' }}">{{ Content.getRelativeDate(item.pubDate) }}
+ <time class="date"
+ title="{{ item.pubDate*1000 |
+ date:'yyyy-MM-dd HH:mm:ss' }}"
+ datetime="{{ item.pubDate*1000 |
+ date:'yyyy-MM-ddTHH:mm:ssZ' }}">
+ {{ Content.getRelativeDate(item.pubDate) }}
</time>
</li>
- <li ng-click="Content.toggleStar(item.id)" class="util" news-stop-propagation>
- <button class="star svg" ng-hide="item.starred" title="<?php p($l->t('Star article')); ?>"></button>
- <button class="starred svg" ng-show="item.starred" title="<?php p($l->t('Unstar article')); ?>"></button>
+ <li ng-click="Content.toggleStar(item.id)"
+ class="util"
+ news-stop-propagation>
+ <button class="star svg"
+ ng-hide="item.starred"
+ title="<?php p($l->t('Star article')); ?>">
+ </button>
+ <button class="starred svg"
+ ng-show="item.starred"
+ title="<?php p($l->t('Unstar article')); ?>">
+ </button>
</li>
- <li ng-click="Content.toggleKeepUnread(item.id)" class="util" news-stop-propagation>
- <button class="icon-toggle toggle-keep-unread" ng-hide="item.keepUnread" title="<?php p($l->t('Keep article unread')); ?>"></button>
- <button class="icon-toggle toggle-keep-unread keep-unread" ng-show="item.keepUnread" title="<?php p($l->t('Remove keep article unread')); ?>"></button>
+ <li ng-click="Content.toggleKeepUnread(item.id)"
+ class="util"
+ news-stop-propagation>
+ <button class="icon-toggle toggle-keep-unread"
+ ng-hide="item.keepUnread"
+ title="<?php p($l->t('Keep article unread')); ?>">
+ </button>
+ <button
+ class="icon-toggle toggle-keep-unread keep-unread"
+ ng-show="item.keepUnread"
+ title="<?php
+ p($l->t('Remove keep article unread'));
+ ?>">
+ </button>
</li>
</ul>
</div>
@@ -49,8 +88,13 @@
<div class="article">
<div class="heading only-in-expanded">
- <time class="date" title="{{ item.pubDate*1000|date:'yyyy-MM-dd HH:mm:ss' }}"
- datetime="{{ item.pubDate*1000|date:'yyyy-MM-ddTHH:mm:ssZ' }}">{{ Content.getRelativeDate(item.pubDate) }}</time>
+ <time class="date"
+ title="{{ item.pubDate*1000 |
+ date:'yyyy-MM-dd HH:mm:ss' }}"
+ datetime="{{ item.pubDate*1000 |
+ date:'yyyy-MM-ddTHH:mm:ssZ' }}">
+ {{ Content.getRelativeDate(item.pubDate) }}
+ </time>
<h1>
<a class="external"
target="_blank"
@@ -62,8 +106,14 @@
</div>
<div class="subtitle">
- <span class="author" ng-show="item.author"> <?php p($l->t('by')) ?> {{ item.author }}</span>
- <span class="source"><?php p($l->t('from')) ?> <a ng-href="#/items/feeds/{{ item.feedId }}/">{{ Content.getFeed(item.feedId).title }}</a></span>
+ <span class="author" ng-show="item.author">
+ <?php p($l->t('by')) ?> {{ item.author }}
+ </span>
+ <span class="source"><?php p($l->t('from')) ?>
+ <a ng-href="#/items/feeds/{{ item.feedId }}/">
+ {{ Content.getFeed(item.feedId).title }}
+ </a>
+ </span>
</div>
@@ -72,8 +122,9 @@
<news-enclosure type="{{ item.enclosureMime }}"
link="{{ item.enclosureLink }}">
<p class="enclosure-error">
- <?php p($l->t('Browser can not play media type')) ?>:
- {{ item.enclosureMime }}
+ <?php
+ p($l->t('Browser can not play media type'))
+ ?>: {{ item.enclosureMime }}
</p>
<a class="button"
ng-href="{{ item.enclosureLink | trustUrl }}"
diff --git a/templates/part.content.shortcuts.php b/templates/part.content.shortcuts.php
index e557e360b..705b380f5 100644
--- a/templates/part.content.shortcuts.php
+++ b/templates/part.content.shortcuts.php
@@ -19,11 +19,15 @@
</tr>
<tr>
<td>h</td>
- <td><?php p($l->t('Star article and jump to next one')); ?></td>
+ <td>
+ <?php p($l->t('Star article and jump to next one')); ?>
+ </td>
</tr>
<tr>
<td>u</td>
- <td><?php p($l->t('Toggle keep current article unread')); ?></td>
+ <td>
+ <?php p($l->t('Toggle keep current article unread')); ?>
+ </td>
</tr>
<tr>
<td>o</td>
@@ -31,7 +35,9 @@
</tr>
<tr>
<td>e</td>
- <td><?php p($l->t('Toggle expand article in compact view')); ?></td>
+ <td>
+ <?php p($l->t('Toggle expand article in compact view')); ?>
+ </td>
</tr>
<tr>
<td>r</td>
diff --git a/templates/part.navigation.addfeed.php b/templates/part.navigation.addfeed.php
index 5ef8e858a..386e8800e 100644
--- a/templates/part.navigation.addfeed.php
+++ b/templates/part.navigation.addfeed.php
@@ -7,7 +7,8 @@
<div class="add-new-popup" id="new-feed">
- <form ng-submit="Navigation.createFeed(Navigation.feed)" name="feedform">
+ <form ng-submit="Navigation.createFeed(Navigation.feed)"
+ name="feedform">
<fieldset ng-disabled="Navigation.addingFeed">
<input type="text"
ng-model="Navigation.feed.url"
@@ -21,7 +22,8 @@
required>
<p class="error"
- ng-show="!Navigation.addingFeed && Navigation.feedUrlExists(Navigation.feed.url)">
+ ng-show="!Navigation.addingFeed &&
+ Navigation.feedUrlExists(Navigation.feed.url)">
<?php p($l->t('Feed exists already!')); ?>
</p>
@@ -30,8 +32,10 @@
title="<?php p($l->t('Folder')); ?>"
ng-if="!Navigation.showNewFolder"
ng-model="Navigation.feed.existingFolder"
- ng-options="folder.name for folder in Navigation.getFolders() track by folder.name">
- <option value="">-- <?php p($l->t('No folder')); ?> --</option>
+ ng-options="folder.name for folder in
+ Navigation.getFolders() track by folder.name">
+ <option value=""
+ >-- <?php p($l->t('No folder')); ?> --</option>
</select>
<button type="button"
class="icon-add add-new-folder-primary"
@@ -47,7 +51,9 @@
!Navigation.addingFeed &&
!Navigation.addingFeed &&
Navigation.showNewFolder &&
- Navigation.folderNameExists(Navigation.feed.newFolder)
+ Navigation.folderNameExists(
+ Navigation.feed.newFolder
+ )
}"
placeholder="<?php p($l->t('Folder name')); ?>"
name="folderName"
@@ -57,16 +63,25 @@
ng-show="Navigation.showNewFolder"
class="icon-close add-new-folder-primary"
title="<?php p($l->t('Go back')); ?>"
- ng-click="Navigation.showNewFolder=false; Navigation.feed.newFolder=''"></button>
+ ng-click="Navigation.showNewFolder=false;
+ Navigation.feed.newFolder=''">
+ </button>
- <p class="error" ng-show="!Navigation.addingFeed && Navigation.folderNameExists(Navigation.feed.newFolder)"><?php p($l->t('Folder exists already!')); ?></p>
+ <p class="error" ng-show="!Navigation.addingFeed &&
+ Navigation.folderNameExists(Navigation.feed.newFolder)">
+ <?php p($l->t('Folder exists already!')); ?>
+ </p>
<input type="submit"
value="<?php p($l->t('Subscribe')); ?>"
class="primary"
- ng-disabled="Navigation.feedUrlExists(Navigation.feed.url) ||
- (Navigation.showNewFolder && Navigation.folderNameExists(folder.name))">
+ ng-disabled="
+ Navigation.feedUrlExists(Navigation.feed.url) ||
+ (
+ Navigation.showNewFolder &&
+ Navigation.folderNameExists(folder.name)
+ )">
</fieldset>
</form>
</div>
diff --git a/templates/part.navigation.addfolder.php b/templates/part.navigation.addfolder.php
index 2f65e9d2b..965d92159 100644
--- a/templates/part.navigation.addfolder.php
+++ b/templates/part.navigation.addfolder.php
@@ -2,7 +2,9 @@
<div class="heading icon-add">
<button
data-apps-slide-toggle="#new-folder"
- news-focus="#new-folder [name='folderName']"><?php p($l->t('New Folder'))?></button>
+ news-focus="#new-folder [name='folderName']">
+ <?php p($l->t('New Folder'))?>
+ </button>
</div>
<div class="add-new-popup" id="new-folder">
@@ -11,14 +13,20 @@
<fieldset ng-disabled="Navigation.addingFolder">
<!-- add a folder -->
<input type="text"
- ng-class="{'ng-invalid': !Navigation.addingFolder && Navigation.folderNameExists(folder.name)}"
+ ng-class="{
+ 'ng-invalid': !Navigation.addingFolder &&
+ Navigation.folderNameExists(folder.name)
+ }"
ng-model="folder.name"
placeholder="<?php p($l->t('Folder name')); ?>"
title="<?php p($l->t('Folder name')); ?>"
name="folderName"
required>
- <p class="error" ng-show="!Navigation.addingFolder && Navigation.folderNameExists(folder.name)"><?php p($l->t('Folder exists already!')); ?></p>
+ <p class="error" ng-show="!Navigation.addingFolder &&
+ Navigation.folderNameExists(folder.name)">
+ <?php p($l->t('Folder exists already!')); ?>
+ </p>
<input type="submit"
value="<?php p($l->t('Create')); ?>"
diff --git a/templates/part.navigation.feed.php b/templates/part.navigation.feed.php
index 27f54fd48..fd83576db 100644
--- a/templates/part.navigation.feed.php
+++ b/templates/part.navigation.feed.php
@@ -2,14 +2,20 @@
active: Navigation.isFeedActive(feed.id),
unread: Navigation.getFeedUnreadCount(feed.id) > 0
}"
- ng-repeat="feed in Navigation.getFeedsOfFolder(<?php p($_['folderId']); ?>) | orderBy:'id':true track by feed.url"
+ ng-repeat="feed in Navigation.getFeedsOfFolder(<?php p($_['folderId']); ?>)
+ | orderBy:'id':true track by feed.url"
ng-show="Navigation.getFeedUnreadCount(feed.id) > 0
|| Navigation.isShowAll()
|| Navigation.isFeedActive(feed.id)
|| !feed.id"
data-id="{{ feed.id }}"
class="feed with-counter with-menu"
- news-draggable-disable="{{ feed.error.length > 0 || !feed.id || feed.deleted || feed.editing}}"
+ news-draggable-disable="{{
+ feed.error.length > 0 ||
+ !feed.id ||
+ feed.deleted ||
+ feed.editing
+ }}"
news-draggable="{
stack: '> li',
zIndex: 1000,
@@ -38,7 +44,9 @@
<div ng-if="feed.deleted"
class="app-navigation-entry-deleted"
news-timeout="Navigation.deleteFeed(feed)">
- <div class="app-navigation-entry-deleted-description"><?php p($l->t('Deleted feed')); ?>: {{ feed.title }}</div>
+ <div class="app-navigation-entry-deleted-description">
+ <?php p($l->t('Deleted feed')); ?>: {{ feed.title }}
+ </div>
<button class="icon-history app-navigation-entry-deleted-button"
title="<?php p($l->t('Undo delete feed')); ?>"
ng-click="Navigation.undoDeleteFeed(feed)"></button>
@@ -64,7 +72,8 @@
<li class="app-navigation-entry-utils-counter"
ng-show="feed.id && Navigation.getFeedUnreadCount(feed.id) > 0"
title="{{ Navigation.getFeedUnreadCount(feed.id) }}">
- {{ Navigation.getFeedUnreadCount(feed.id) | unreadCountFormatter }}
+ {{ Navigation.getFeedUnreadCount(feed.id) |
+ unreadCountFormatter }}
</li>
<li class="app-navigation-entry-utils-menu-button">
<button title="<?php p($l->t('Menu')); ?>"></button>
@@ -74,15 +83,24 @@
<div class="app-navigation-entry-menu">
<ul>
- <li><button ng-click="feed.editing=true"
+ <li>
+ <button ng-click="feed.editing=true"
class="icon-rename"
- title="<?php p($l->t('Rename feed')); ?>"></button></li>
- <li><button ng-click="Navigation.reversiblyDeleteFeed(feed)"
+ title="<?php p($l->t('Rename feed')); ?>">
+ </button>
+ </li>
+ <li>
+ <button ng-click="Navigation.reversiblyDeleteFeed(feed)"
class="icon-delete"
- title="<?php p($l->t('Delete feed')); ?>"></button></li>
- <li ng-show="Navigation.getFeedUnreadCount(feed.id) > 0"><button class="icon-checkmark"
+ title="<?php p($l->t('Delete feed')); ?>">
+ </button>
+ </li>
+ <li ng-show="Navigation.getFeedUnreadCount(feed.id) > 0">
+ <button class="icon-checkmark"
ng-click="Navigation.markFeedRead(feed.id)"
- title="<?php p($l->t('Read all')); ?>"></button></li>
+ title="<?php p($l->t('Read all')); ?>">
+ </button>
+ </li>
</ul>
</div>
diff --git a/templates/part.navigation.folder.php b/templates/part.navigation.folder.php
index 4c0874f9f..20b1978ac 100644
--- a/templates/part.navigation.folder.php
+++ b/templates/part.navigation.folder.php
@@ -23,20 +23,33 @@
<div ng-if="folder.deleted"
class="app-navigation-entry-deleted"
news-timeout="Navigation.deleteFolder(folder)">
- <div class="app-navigation-entry-deleted-description"><?php p($l->t('Deleted folder')); ?>: {{ folder.name }}</div>
+ <div class="app-navigation-entry-deleted-description">
+ <?php p($l->t('Deleted folder')); ?>: {{ folder.name }}
+ </div>
<button class="icon-history app-navigation-entry-deleted-button"
title="<?php p($l->t('Undo delete folder')); ?>"
ng-click="Navigation.undoDeleteFolder(folder)"></button>
</div>
<div ng-if="folder.editing" class="app-navigation-entry-edit"
- ng-class="{'folder-rename-error': folder.renameError || (folderName != folder.name && !Navigation.renamingFol