summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/main.php12
-rw-r--r--templates/part.feeds.php47
-rw-r--r--templates/part.listfeed.php17
-rw-r--r--templates/part.listfolder.php23
4 files changed, 35 insertions, 64 deletions
diff --git a/templates/main.php b/templates/main.php
index 68b3c9113..c0747066e 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -19,11 +19,13 @@ if($showAll){
?>
-<div id="leftcontent" class="leftcontent">
- <div id="feeds">
- <ul data-id="0">
- <?php echo $this->inc("part.feeds"); ?>
- </ul>
+<div id="leftcontent_news" class="leftcontent_news">
+ <div id="feed_wrapper">
+ <div id="feeds">
+ <ul data-id="0">
+ <?php echo $this->inc("part.feeds"); ?>
+ </ul>
+ </div>
</div>
</div>
diff --git a/templates/part.feeds.php b/templates/part.feeds.php
index 927ec406a..b3dc598fa 100644
--- a/templates/part.feeds.php
+++ b/templates/part.feeds.php
@@ -38,44 +38,21 @@ $itemMapper = new OCA\News\ItemMapper();
$unreadItemCountAll = $itemMapper->countEveryItemByStatus(OCA\News\StatusFlag::UNREAD);
$starredCount = $itemMapper->countEveryItemByStatus(OCA\News\StatusFlag::IMPORTANT);
-switch ($feedId) {
- case -2:
- $subscriptionsClass = "selected_feed";
- $starredClass = "";
- break;
-
- case -1:
- $subscriptionsClass = "";
- $starredClass = "selected_feed";
- break;
-
- default:
- $subscriptionsClass = "";
- $starredClass = "";
- break;
-}
-
-if($unreadItemCountAll > 0){
- $allUnreadItemClass = "";
-} else {
- $allUnreadItemClass = "all_read";
-}
-
-if($starredCount > 0){
- $starredCountClass = "";
-} else {
- $starredCountClass = "all_read";
-}
-
?>
-<li data-id="-2" class="subscriptions folder <?php echo $allUnreadItemClass ?>" id="<?php echo $subscriptionsClass ?>">
- <a href="#" ><?php echo $l->t('New articles'); ?></a>
- <span class="unreaditemcounter"><?php echo $unreadItemCountAll ?></span>
+<li class="subscriptions <?php if($feedId === -2){ echo "selected_feed"; }; ?>">
+ <a class="title" href="#" ><?php echo $l->t('New articles'); ?></a>
+ <span class="unread_items_counter"><?php echo $unreadItemCountAll ?></span>
+ <span class="buttons">
+ <button class="svg action feeds_markread" title="<?php echo $l->t('Mark all read'); ?>"></button>
+ </span>
</li>
-<li data-id="-1" class="starred folder <?php echo $starredCountClass ?>" id="<?php echo $starredClass ?>">
- <a href="#" ><?php echo $l->t('Starred'); ?></a>
- <span class="unreaditemcounter"><?php echo $starredCount ?></span>
+<li class="starred <?php if($feedId === -1){ echo "selected_feed"; }; ?>">
+ <a class="title" href="#" ><?php echo $l->t('Starred'); ?></a>
+ <span class="unread_items_counter"><?php echo $starredCount ?></span>
+ <span class="buttons">
+ <button class="svg action feeds_markread" title="<?php echo $l->t('Mark all read'); ?>"></button>
+ </span>
</li>
<?php
diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php
index 0d343d3a9..c8d468675 100644
--- a/templates/part.listfeed.php
+++ b/templates/part.listfeed.php
@@ -10,14 +10,11 @@ if ($favicon == null) {
$favicon = OCP\Util::imagePath('core', 'actions/public.svg');
}
-if($unreadItemsCount == 0){
- $allReadClass = 'all_read';
-} else {
- $allReadClass = '';
-}
-
-echo '<li class="feed" data-id="' . $feed->getId() . '" style="background-image: url(' . $favicon . ');">';
-echo '<a href="#" " class="' . $allReadClass . '">' . htmlspecialchars_decode($feed->getTitle()) .'</a>';
- echo '<span class="unreaditemcounter ' . $allReadClass . '">' . $unreadItemsCount . '</span>';
-echo '<button class="svg action feeds_delete" onClick="(News.Feed.delete(' . $feed->getId(). '))" title="' . $l->t('Delete feed') . '"></button>';
+echo '<li class="feed" data-id="' . $feed->getId() . '">';
+ echo '<a style="background-image: url(' . $favicon . ');" href="#" class="title">' . htmlspecialchars_decode($feed->getTitle()) .'</a>';
+ echo '<span class="unread_items_counter">' . $unreadItemsCount . '</span>';
+ echo '<span class="buttons">';
+ echo '<button class="svg action feeds_delete" title="' . $l->t('Delete feed') . '"></button>';
+ echo '<button class="svg action feeds_markread" title="' . $l->t('Mark all read') . '"></button>';
+ echo '</span>';
echo '</li>';
diff --git a/templates/part.listfolder.php b/templates/part.listfolder.php
index c24d9ae72..0f02198f1 100644
--- a/templates/part.listfolder.php
+++ b/templates/part.listfolder.php
@@ -1,20 +1,15 @@
<?php
$folder = isset($_['folder']) ? $_['folder'] : null;
-$is_root = ($folder->getId() == 0);
$l = new OC_l10n('news');
-echo '<li class="collapsable_container" data-id="' . $folder->getId() . '"' . (($is_root) ? 'style="margin-left: 0px !important;"' : '') . '>' .
- '<div class="collapsable" >' .
- '<button class="collapsable_trigger action" title="' . $folder->getName() . '"></button>' .
- '<a href="#" class="collapsable_title">' .
- $folder->getName() .
- '</a>' .
- ( ($is_root) ?
- ''
- :
- '<button class="svg action feeds_edit" title="' . $l->t('Rename folder') . '"></button>' .
- '<button class="svg action feeds_delete" onClick="(News.Folder.delete(' . $folder->getId(). '))" title="' . $l->t('Delete folder') . '"></button>' ) .
- '</div>' .
- '<ul>'; \ No newline at end of file
+echo '<li class="folder open" data-id="' . $folder->getId() . '">';
+ echo '<button class="collapsable_trigger" title="' . $l->t('Collapse') . '"></button>';
+ echo '<a href="#" class="title">' . $folder->getName() . '</a>';
+ echo '<span class="buttons">';
+ echo '<button class="svg action feeds_delete" title="' . $l->t('Delete folder') . '"></button>';
+ echo '<button class="svg action feeds_edit" title="' . $l->t('Rename folder') . '"></button>';
+ echo '<button class="svg action feeds_markread" title="' . $l->t('Mark all read') . '"></button>';
+ echo '</span>';
+ echo '<ul data-id="' . $folder->getId() . '">'; \ No newline at end of file