diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main.php | 13 | ||||
-rw-r--r-- | templates/part.items.header.php | 2 | ||||
-rw-r--r-- | templates/part.items.php | 22 |
3 files changed, 25 insertions, 12 deletions
diff --git a/templates/main.php b/templates/main.php index db3abe34a..8f6bba595 100644 --- a/templates/main.php +++ b/templates/main.php @@ -4,12 +4,7 @@ </ul> </div> -<ul class="menu" id="feedfoldermenu"> - <li class="menuItem" id="addfeed"><?php echo $l->t('Feed'); ?></li> - <li class="menuItem" id="addfolder"><?php echo $l->t('Folder'); ?></li> -</ul> - -<div id="bottomcontrols"> +<div id="feedcontrols"> <ul class="controls"> <li> <button class="svg" id="addfeedfolder" title="<?php echo $l->t('Add Feed/Folder'); ?>" onclick="News.DropDownMenu.fade('ul#feedfoldermenu')"><img class="svg" src="<?php echo OCP\Util::linkTo('news', 'img/add.svg'); ?>" alt="<?php echo $l->t('Add Feed/Folder'); ?>" /></button> @@ -23,6 +18,12 @@ </ul> </div> +<ul class="menu" id="feedfoldermenu"> + <li class="menuItem" id="addfeed"><?php echo $l->t('Feed'); ?></li> + <li class="menuItem" id="addfolder"><?php echo $l->t('Folder'); ?></li> +</ul> + + <div id="rightcontent" class="rightcontent" data-id="<?php echo $_['feedid']; ?>"> <?php if ($_['feedid']){ diff --git a/templates/part.items.header.php b/templates/part.items.header.php index c4c9666bb..ac2add0d4 100644 --- a/templates/part.items.header.php +++ b/templates/part.items.header.php @@ -17,6 +17,6 @@ if(isset($_['feedid'])){ <input type="button" value="<?php echo $l->t('Mark all as read'); ?>" id="mark_all_as_read" /> <select id="feed_filter"> <option value="all"><?php echo $l->t('Show all articles'); ?></option> - <option value="newest"><?php echo $l->t('Show newest articles'); ?></option> + <option value="newest"><?php echo $l->t('Show only unread articles'); ?></option> </select> </div>
\ No newline at end of file diff --git a/templates/part.items.php b/templates/part.items.php index ff372fafb..7334fa35a 100644 --- a/templates/part.items.php +++ b/templates/part.items.php @@ -8,15 +8,27 @@ $items = $itemmapper->findAll($feedid); echo '<div id="feed_items">'; echo '<ul>'; foreach($items as $item) { + if($item->isRead()){ - $readClass = "title_read"; + $newsItemClass = "title_read"; } else { - $readClass = "title_unread"; + $newsItemClass = "title_unread"; + } + + if($item->isImportant()){ + $starClass = 'important'; + $startTitle = $l->t('Mark as unimportant'); + } else { + $starClass = ''; + $startTitle = $l->t('Mark as important'); } - echo '<li class="news_item ' . $readClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedid . '">'; - echo '<h1 class="item_title"><a href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>'; - echo '<div class="body">' . $item->getBody() . '</div>'; + echo '<li class="news_item ' . $newsItemClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedid . '">'; + echo '<div class="item_utils"><ul>'; + echo '<li class="star ' . $starClass . '" title="' . $startTitle . '"></li>'; + echo '</ul></div>'; + echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>'; + echo '<div class="body">' . $item->getBody() . '</div>'; echo '</li>'; } |