summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-11 00:12:06 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-11 00:12:06 +0200
commitfb8f2c25502f4ad708cf85f239570f340a64c721 (patch)
tree40e5b3e518e01a6cd81597af30412a1d4e6dbf9f /templates
parent748afb98f2a0cd485df6346c97a179d45d178209 (diff)
added an item header, improved feed design, removed unused javascript function, added proper template translation tags
Diffstat (limited to 'templates')
-rw-r--r--templates/main.php1
-rw-r--r--templates/part.items.header.php22
-rw-r--r--templates/part.items.php3
3 files changed, 24 insertions, 2 deletions
diff --git a/templates/main.php b/templates/main.php
index c014a4a11..db3abe34a 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -26,6 +26,7 @@
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['feedid']; ?>">
<?php
if ($_['feedid']){
+ echo $this->inc("part.items.header");
echo $this->inc("part.items");
}
else {
diff --git a/templates/part.items.header.php b/templates/part.items.header.php
new file mode 100644
index 000000000..04b319533
--- /dev/null
+++ b/templates/part.items.header.php
@@ -0,0 +1,22 @@
+<?php
+
+if(isset($_['feedid'])){
+ $feedmapper = new OC_News_FeedMapper();
+ $feed = $feedmapper->findById($_['feedid']);
+ $feedTitle = $feed->getTitle();
+} else {
+ $feedTitle = '';
+}
+
+?>
+
+<div class="feed_controls">
+ <div class="feed_title">
+ <h1>ยป <?php echo $feedTitle; ?></h1>
+ </div>
+ <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>
+ </select>
+</div> \ No newline at end of file
diff --git a/templates/part.items.php b/templates/part.items.php
index c2b9b2889..8c2ef15d2 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -3,7 +3,6 @@
$feedid = isset($_['feedid']) ? $_['feedid'] : '';
$itemmapper = new OC_News_ItemMapper();
-
$items = $itemmapper->findAll($feedid);
echo '<ul>';
@@ -15,7 +14,7 @@ foreach($items as $item) {
}
echo '<li class="news_item ' . $readClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedid . '">';
- echo '<h1><a href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>';
+ echo '<h1 class="item_title"><a href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>';
echo '<div class="body">' . $item->getBody() . '</div>';
echo '</li>';