summaryrefslogtreecommitdiffstats
path: root/templates/part.feeds.php
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-06-30 20:02:00 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-06-30 20:02:00 -0400
commitf8f6fd3d778fe95bac15e52747ff5b1f6461c136 (patch)
treea6a895d6f356641d6c5263d64cd3853ad9a0f794 /templates/part.feeds.php
parent6f3404ee971a130b90cf1773b9e67f4feef0be74 (diff)
shows folder list
Diffstat (limited to 'templates/part.feeds.php')
-rw-r--r--templates/part.feeds.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/templates/part.feeds.php b/templates/part.feeds.php
index a10848e8f..a2fc0bb24 100644
--- a/templates/part.feeds.php
+++ b/templates/part.feeds.php
@@ -1,9 +1,21 @@
-<?php
- $allfeeds = $_['allfeeds']->getChildren();
-
- foreach($allfeeds as $collection) {
- if ($collection instanceOf OC_News_Folder){
- echo $collection->getName() . '<br>';
+<?php
+
+ function print_folder(OC_News_Folder $folder, $depth){
+ echo '<ul style="margin-left:' . 10*$depth . 'px;"> <li style="background-image:url(' .
+ OC_Helper::imagePath('core', 'filetypes/folder.png') . '); background-repeat:no-repeat; background-position:0px 8px; padding-left: 20px; ">' .
+ '<span class="collapsable">' . $folder->getName() .'</span><ul>';
+ $children = $folder->getChildren();
+ foreach($children as $child) {
+ if ($child instanceOf OC_News_Folder){
+ print_folder($child, $depth+1);
+ }
+ else { //print all feeds contained in the folder
+ echo '<li>' . $child->getTitle(). '</li>';
+ }
}
+ echo '</ul></li></ul>';
}
+
+ print_folder($_['allfeeds'], 0);
+
?>