diff options
Diffstat (limited to 'templates/part.feeds.php')
-rw-r--r-- | templates/part.feeds.php | 47 |
1 files changed, 12 insertions, 35 deletions
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 |