diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/index.php (renamed from templates/main.php) | 37 | ||||
-rw-r--r-- | templates/part.content.compact.php | 0 | ||||
-rw-r--r-- | templates/part.content.expand.php | 58 | ||||
-rw-r--r-- | templates/part.content.php | 66 | ||||
-rw-r--r-- | templates/part.items.php | 84 | ||||
-rw-r--r-- | templates/part.navigation.addfeed.php (renamed from templates/part.addfeed.php) | 0 | ||||
-rw-r--r-- | templates/part.navigation.addfolder.php (renamed from templates/part.addfolder.php) | 0 | ||||
-rw-r--r-- | templates/part.navigation.feed.php (renamed from templates/part.listfeed.php) | 0 | ||||
-rw-r--r-- | templates/part.navigation.folder.php (renamed from templates/part.listfolder.php) | 2 | ||||
-rw-r--r-- | templates/part.navigation.starredfeed.php (renamed from templates/part.feed.starred.php) | 0 | ||||
-rw-r--r-- | templates/part.navigation.unreadfeed.php (renamed from templates/part.feed.unread.php) | 0 | ||||
-rw-r--r-- | templates/part.undo.php | 7 |
12 files changed, 82 insertions, 172 deletions
diff --git a/templates/main.php b/templates/index.php index f1ee191a4..0413227b0 100644 --- a/templates/main.php +++ b/templates/index.php @@ -1,16 +1,16 @@ <?php -\OCP\Util::addScript('news', 'vendor/traceur-runtime/traceur-runtime.min'); -\OCP\Util::addScript('news', 'vendor/angular/angular.min'); -\OCP\Util::addScript('news', 'vendor/angular-route/angular-route.min'); -\OCP\Util::addScript('news', 'vendor/angular-sanitize/angular-sanitize.min'); -\OCP\Util::addScript('news', 'vendor/angular-animate/angular-animate.min'); -\OCP\Util::addScript('news', 'vendor/momentjs/min/moment-with-locales.min'); -\OCP\Util::addScript('news', 'build/app.min'); - -\OCP\Util::addStyle('news', 'app'); -\OCP\Util::addStyle('news', 'navigation'); -\OCP\Util::addStyle('news', 'content'); -\OCP\Util::addStyle('news', 'settings'); +script('news', 'vendor/traceur-runtime/traceur-runtime.min'); +script('news', 'vendor/angular/angular.min'); +script('news', 'vendor/angular-route/angular-route.min'); +script('news', 'vendor/angular-sanitize/angular-sanitize.min'); +script('news', 'vendor/angular-animate/angular-animate.min'); +script('news', 'vendor/momentjs/min/moment-with-locales.min'); +script('news', 'build/app.min'); + +style('news', 'app'); +style('news', 'navigation'); +style('news', 'content'); +style('news', 'settings'); ?> @@ -23,12 +23,12 @@ <news-title-unread-count unread-count="{{ Navigation.getUnreadCount() }}"></news-title-unread-count> <ul class="with-icon" data-folder-id="0" news-droppable> - <?php print_unescaped($this->inc('part.addfeed')) ?> - <?php print_unescaped($this->inc('part.addfolder')) ?> - <?php print_unescaped($this->inc('part.feed.unread')) ?> - <?php print_unescaped($this->inc('part.feed.starred')) ?> - <?php print_unescaped($this->inc('part.listfeed', ['folderId' => '0'])) ?> - <?php print_unescaped($this->inc('part.listfolder')) ?> + <?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.folder')) ?> </ul> <!-- settings --> @@ -50,6 +50,7 @@ ng-hide="App.loading.isLoading('global')" ng-view tabindex="-1" + news-auto-focus news-scroll news-scroll-enabled-auto-page="Content.autoPagingEnabled()" news-scroll-enabled-mark-read="Content.markReadEnabled()" diff --git a/templates/part.content.compact.php b/templates/part.content.compact.php new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/part.content.compact.php diff --git a/templates/part.content.expand.php b/templates/part.content.expand.php new file mode 100644 index 000000000..15209dca7 --- /dev/null +++ b/templates/part.content.expand.php @@ -0,0 +1,58 @@ +<li class="item" + ng-repeat="item in Content.getItems() | orderBy:[Content.orderBy()] track by item.id" + ng-click="Content.markRead(item.id)" + ng-class="{read: !item.unread}" + data-id="{{ item.id }}"> + + <h2 class="date"> + <span class="timeago" title="{{ item.pubDate*1000|date:'dd-MM-yyyy' }}"> + {{ Content.getRelativeDate(item.pubDate) }} + </span> + </h2> + + <button class="star svg" + ng-click="Content.toggleStar(item.id)" + ng-class="{ + 'starred': item.starred + }"></button> + + <h1 class="title"> + <a target="_blank" ng-href="{{ item.url }}"> + {{ item.title }} + </a> + </h1> + + <h2 class="author"> + <span> + <?php p($l->t('from')) ?> + <a ng-href="#/items/feeds/{{ item.feedId }}" + class="from_feed">{{ Content.getFeed(item.feedId).title }}</a> + </span> + <span ng-show="item.author"> + <?php p($l->t('by')) ?> + {{ item.author }} + </span> + </h2> + + <div class="enclosure" ng-if="item.enclosureLink"> + <news-audio type="{{ item.enclosureType }}" + ng-src="{{ item.enclosureLink|trustUrl }}"> + <?php p($l->t('Download')) ?> + </news-audio> + </div> + + + <div class="body" news-bind-html-unsafe="item.body"></div> + + <div class="bottom-utils"> + <ul> + <li ng-click="Content.toggleKeepUnread(item.id)"> + <label for="keep-unread"> + <input type="checkbox" name="keep-unread" ng-checked="item.keepUnread"/> + <?php p($l->t('Keep unread')); ?> + </label> + </li> + </ul> + </div> +</li> + diff --git a/templates/part.content.php b/templates/part.content.php index 5b1bcd246..251a01772 100644 --- a/templates/part.content.php +++ b/templates/part.content.php @@ -2,70 +2,12 @@ <h1><?php p($l->t('Welcome to the ownCloud News app!')) ?></h1> </div> -<div news-auto-focus="#app-content" ng-if="!App.isFirstRun()"> - <!-- compact view --> - <ul ng-if="Content.isCompactView()" class="compact"> - +<div ng-if="!App.isFirstRun()"> + <ul ng-if="Content.isCompactView()"> + <?php print_unescaped($this->inc('part.content.compact')); ?> </ul> - <!-- full view --> <ul ng-if="!Content.isCompactView()"> - <li class="item" - ng-repeat="item in Content.getItems() | orderBy:[Content.orderBy()] track by item.id" - ng-click="Content.markRead(item.id)" - ng-class="{read: !item.unread}" - data-id="{{ item.id }}"> - - <h2 class="date"> - <span class="timeago" title="{{ item.pubDate*1000|date:'dd-MM-yyyy' }}"> - {{ Content.getRelativeDate(item.pubDate) }} - </span> - </h2> - - <button class="star svg" - ng-click="Content.toggleStar(item.id)" - ng-class="{ - 'starred': item.starred - }"></button> - - <h1 class="title"> - <a target="_blank" ng-href="{{ item.url }}"> - {{ item.title }} - </a> - </h1> - - <h2 class="author"> - <span> - <?php p($l->t('from')) ?> - <a ng-href="#/items/feeds/{{ item.feedId }}" - class="from_feed">{{ Content.getFeed(item.feedId).title }}</a> - </span> - <span ng-show="item.author"> - <?php p($l->t('by')) ?> - {{ item.author }} - </span> - </h2> - - <div class="enclosure" ng-if="item.enclosureLink"> - <news-audio type="{{ item.enclosureType }}" - ng-src="{{ item.enclosureLink|trustUrl }}"> - <?php p($l->t('Download')) ?> - </news-audio> - </div> - - - <div class="body" news-bind-html-unsafe="item.body"></div> - - <div class="bottom-utils"> - <ul> - <li ng-click="Content.toggleKeepUnread(item.id)"> - <label for="keep-unread"> - <input type="checkbox" name="keep-unread" ng-checked="item.keepUnread"/> - <?php p($l->t('Keep unread')); ?> - </label> - </li> - </ul> - </div> - </li> + <?php print_unescaped($this->inc('part.content.expand')); ?> </ul> </div> diff --git a/templates/part.items.php b/templates/part.items.php deleted file mode 100644 index dfb2a71a2..000000000 --- a/templates/part.items.php +++ /dev/null @@ -1,84 +0,0 @@ -<ul> - <li class="feed_item" - - ng-repeat="item in itemBusinessLayer.getAll() | orderBy:['-id'] " - ng-class="{ read: item.isRead(), compact: isCompactView(), open: item.active}" - data-id="{{ item.id }}" - ng-click="itemBusinessLayer.setRead(item.id)"> - - <div class="item_heading"> - <button ng-class="{ important: item.isStarred() }" - ng-click="itemBusinessLayer.toggleStarred(item.id)" - class="star" - > - </button> - <a class="external" - target="_blank" - ng-href="{{ item.url }}" - title="<?php p($l->t('read on website')) ?>"> - </a> - <span class="timeago" title="{{item.pubDate*1000|date:'dd-MM-yyyy'}}"> - {{ getRelativeDate(item.pubDate) }} - </span> - <h1> - <a ng-click="item.active = !item.active" href="#">{{ item.title }}</a> - </h1> - </div> - - <h2 class="item_date"> - <span class="timeago" title="{{item.pubDate*1000|date:'dd-MM-yyyy'}}"> - {{ getRelativeDate(item.pubDate) }} - </span> - </h2> - - <div class="item_utils"> - <ul class="primary_item_utils"> - <li> - <button - title="<?php p($l->t('star')) ?>" - ng-class="{ important: item.isStarred() }" - ng-click="itemBusinessLayer.toggleStarred(item.id)" - class="star"></button> - </li> - </ul> - </div> - - <h1 class="item_title"> - <a target="_blank" ng-href="{{ item.url }}"> - {{ item.title }} - </a> - </h1> - - <h2 class="item_author"> - <span ng-show="itemBusinessLayer.noFeedActive() && feedBusinessLayer.getFeedLink(item.feedId)"> - <?php p($l->t('from')) ?> - <a target="_blank" ng-href="{{ feedBusinessLayer.getFeedLink(item.feedId) }}" - class="from_feed">{{ itemBusinessLayer.getFeedTitle(item.id) }}</a> - </span> - <span ng-if="item.author"> - <?php p($l->t('by')) ?> - {{ item.author }} - </span> - </h2> - - <div class="enclosure" ng-if="item.enclosureLink"> - <news-audio type="{{ item.enclosureType }}" ng-src="{{ item.enclosureLink|trustUrl }}"><?php - p($l->t('Download')) - ?></news-audio> - </div> - - <div class="body" news-bind-html-unsafe="item.body"> - </div> - - <div class="bottom-utils"> - <ul ng-show="item.keepUnread"> - <li ng-click="Content.toggleKeepUnread(item.id)"> - <label for="keep-unread"> - <input type="checkbox" name="keep-unread" ng-checked="item.keepUnread"/> - <?php p($l->t('Keep unread')); ?> - </label> - </li> - </ul> - </div> - </li> -</ul> diff --git a/templates/part.addfeed.php b/templates/part.navigation.addfeed.php index 0dfe32cc0..0dfe32cc0 100644 --- a/templates/part.addfeed.php +++ b/templates/part.navigation.addfeed.php diff --git a/templates/part.addfolder.php b/templates/part.navigation.addfolder.php index aa7e4a229..aa7e4a229 100644 --- a/templates/part.addfolder.php +++ b/templates/part.navigation.addfolder.php diff --git a/templates/part.listfeed.php b/templates/part.navigation.feed.php index ae4442fe5..ae4442fe5 100644 --- a/templates/part.listfeed.php +++ b/templates/part.navigation.feed.php diff --git a/templates/part.listfolder.php b/templates/part.navigation.folder.php index 8f97dfa9d..2895ed94a 100644 --- a/templates/part.listfolder.php +++ b/templates/part.navigation.folder.php @@ -74,7 +74,7 @@ --> </span> <ul> - <?php print_unescaped($this->inc('part.listfeed', ['folderId' => 'folder.id'])); ?> + <?php print_unescaped($this->inc('part.navigation.feed', ['folderId' => 'folder.id'])); ?> </ul> <div class="message" ng-show="folder.error">{{ folder.error }}</div> diff --git a/templates/part.feed.starred.php b/templates/part.navigation.starredfeed.php index fb185ee67..fb185ee67 100644 --- a/templates/part.feed.starred.php +++ b/templates/part.navigation.starredfeed.php diff --git a/templates/part.feed.unread.php b/templates/part.navigation.unreadfeed.php index 979824d1c..979824d1c 100644 --- a/templates/part.feed.unread.php +++ b/templates/part.navigation.unreadfeed.php diff --git a/templates/part.undo.php b/templates/part.undo.php deleted file mode 100644 index 15f4b0cea..000000000 --- a/templates/part.undo.php +++ /dev/null @@ -1,7 +0,0 @@ -<div id="undo-container"> - <div undo-notification id="undo"> - <a href="#"><?php p($l->t('Undo deletion of %s', '{{ getCaption() }}')); ?></a> - </div> -</div> -<news-translate key="appName"><?php p($l->t('News')); ?></news-translate> - |