summaryrefslogtreecommitdiffstats
path: root/templates/part.feeds.php
blob: fbf702387c46380f11fc4ccbb837ed5e90c9530c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
	function print_folder(OC_News_Folder $folder, $depth){
		$l = new OC_l10n('news');
		include("part.listfolder.php");

		$children = $folder->getChildren();
		foreach($children as $child) {
			if ($child instanceOf OC_News_Folder){
				print_folder($child, $depth+1);
			}
			elseif ($child instanceOf OC_News_Feed) { //onhover $(element).attr('id', 'newID');
				$tmpl = new OCP\Template("news", "part.listfeed");
				$tmpl->assign('child', $child);
				$tmpl->printpage();
			}
			else {
			//TODO:handle error in this case
			}
		}
		echo '</ul></div></li></ul>';
	}
	print_folder($_['allfeeds'], 0);
?>