diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-08-30 23:00:17 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-09-01 00:31:38 +0200 |
commit | 1430a4eddb4d4f14ad63ac142637dbd597a49530 (patch) | |
tree | c57ad40cec181201a78da9acc466761ccede8f44 /templates/part.listfolder.php | |
parent | ead4172b7eb7a74af48df707efc88c8b208a5986 (diff) |
clone new items in menu from mock objects
Diffstat (limited to 'templates/part.listfolder.php')
-rw-r--r-- | templates/part.listfolder.php | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/templates/part.listfolder.php b/templates/part.listfolder.php index 0f02198f1..cf6a1c5e1 100644 --- a/templates/part.listfolder.php +++ b/templates/part.listfolder.php @@ -1,15 +1,28 @@ <?php -$folder = isset($_['folder']) ? $_['folder'] : null; - $l = new OC_l10n('news'); -echo '<li class="folder open" data-id="' . $folder->getId() . '">'; +if(isset($_['mock'])){ + $folderId = -1; + $folderName = ''; +} else { + $folder = isset($_['folder']) ? $_['folder'] : null; + $folderId = $folder->getId(); + $folderName = $folder->getName(); +} + +$mockClass = isset($_['mock']) ? 'mock' : ''; + +echo '<li class="folder open ' . $mockClass . '" data-id="' . $folderId . '">'; echo '<button class="collapsable_trigger" title="' . $l->t('Collapse') . '"></button>'; - echo '<a href="#" class="title">' . $folder->getName() . '</a>'; + echo '<a href="#" class="title">' . $folderName . '</a>'; echo '<span class="buttons">'; echo '<button class="svg action feeds_delete" title="' . $l->t('Delete folder') . '"></button>'; echo '<button class="svg action feeds_edit" title="' . $l->t('Rename folder') . '"></button>'; echo '<button class="svg action feeds_markread" title="' . $l->t('Mark all read') . '"></button>'; echo '</span>'; - echo '<ul data-id="' . $folder->getId() . '">';
\ No newline at end of file + echo '<ul data-id="' . $folderId . '">'; + +if(isset($_['mock'])){ + echo '</ul>'; +}
\ No newline at end of file |