diff options
Diffstat (limited to 'templates/part.feeds.php')
-rw-r--r-- | templates/part.feeds.php | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/templates/part.feeds.php b/templates/part.feeds.php index dd6a93c5f..fbf702387 100644 --- a/templates/part.feeds.php +++ b/templates/part.feeds.php @@ -1,38 +1,23 @@ <?php function print_folder(OC_News_Folder $folder, $depth){ $l = new OC_l10n('news'); + include("part.listfolder.php"); - echo '<ul class="folders"' . (($depth == 0) ? 'style="margin-left: 0px !important;"' : '') .'> <li class="folder_list" >' . - '<div class="collapsable_container">' . - '<div class="collapsable" >' . strtoupper($folder->getName()) . - ( ($depth != 0) ? '<button class="svg action" id="feeds_delete" onClick="(News.Folder.delete(' . $folder->getId(). '))" title="' . $l->t('Delete folder') . '"></button>' . - '<button class="svg action" id="feeds_edit" title="' . $l->t('Rename folder') . '"></button>': '' ) . - '</div>' . - '</div>'; - echo '<ul>'; $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'); - $favicon = $child->getFavicon(); - if ($favicon == null) { - $favicon = OCP\Util::imagePath('news', 'rss.svg'); - } - echo '<li class="feeds_list" data-id="' . $child->getId() . '"><a href="' . OCP\Util::linkTo('news', 'index.php'). '?feedid=' . $child->getId() . '" style="background: url(' . $favicon . ') left center no-repeat; background-size:16px 16px;">' . $child->getTitle() .'</a>'; - countUnreadItems($child->getId()); - echo '<button class="svg action" id="feeds_delete" onClick="(News.Feed.delete(' . $child->getId(). '))" title="' . $l->t('Delete feed') . '"></button>'; - echo '<button class="svg action" id="feeds_edit" title="' . $l->t('Edit feed') . '"></button>'; - echo '</li>'; + $tmpl = new OCP\Template("news", "part.listfeed"); + $tmpl->assign('child', $child); + $tmpl->printpage(); } else { //TODO:handle error in this case } } - echo '</ul></li></ul>'; + echo '</ul></div></li></ul>'; } - - include("part.itemcounter.php"); print_folder($_['allfeeds'], 0); ?>
\ No newline at end of file |