diff options
author | Gregor Tätzner <gregor@freenet.de> | 2012-07-08 17:37:35 +0200 |
---|---|---|
committer | Gregor Tätzner <gregor@freenet.de> | 2012-07-08 17:37:35 +0200 |
commit | 70537725190ed54a4c3cc6a1d603cf3d1582a117 (patch) | |
tree | f59f35525ddee0c96b25c7780566a74d9f538d5c /templates | |
parent | e49ddd268532cd78bdb5ef9cf9e402f5e3ba3830 (diff) |
UI and model fixes
- added dropdown menu to choose parent in addfeedfolder setting
- added edit button to folder items
- foldermapper: also load children of children to show folder
hierarchy
Diffstat (limited to 'templates')
-rw-r--r-- | templates/part.addfeedfolder.php | 37 | ||||
-rw-r--r-- | templates/part.feeds.php | 3 |
2 files changed, 37 insertions, 3 deletions
diff --git a/templates/part.addfeedfolder.php b/templates/part.addfeedfolder.php index 7f6a8f6a7..6ace0ddfa 100644 --- a/templates/part.addfeedfolder.php +++ b/templates/part.addfeedfolder.php @@ -1,15 +1,48 @@ + +<?php + function print_folder(OC_News_Folder $folder, $depth){ + echo '<li onclick="News.DropDownMenu.selectItem(this, ' . $folder->getId() . ')">' . strtoupper($folder->getName()) . '</li>'; + $children = $folder->getChildren(); + foreach($children as $child) { + if ($child instanceOf OC_News_Folder){ + print_folder($child, $depth+1); + } + } + } +?> + <div id="addfeedfolder_dialog" title="<?php echo $l->t("Add Feed/Folder"); ?>"> <table width="100%" style="border: 0;"> <tr> <td>Add new feed</td> - <td>...where?...</td> + <td> + <div id="feed_parentfolder"> + <button id="dropdownBtn" onclick="News.DropDownMenu.show(this)"> + <?php echo $l->t('ALL FEEDS'); ?> + </button> + <input type="hidden" name="folderid" value="0" /> + <ul class="dropdown"> + <?php print_folder($_['allfeeds'], 0); ?> + </ul> + </div> + </td> </tr> <tr> <td><input type="text" id="feed_add_url" placeholder="<?php echo $l->t('URL'); ?>" class="news_input" /></td> <td><input type="submit" value="<?php echo $l->t('Add feed'); ?>" onclick="News.Feed.submit(this)" id="feed_add_submit" /></td> </tr> <td>Add new folder</td> - <td>...where?...</td> + <td> + <div id="folder_parentfolder"> + <button id="dropdownBtn" onclick="News.DropDownMenu.show(this)"> + <?php echo $l->t('ALL FEEDS'); ?> + </button> + <input type="hidden" name="folderid" value="0" /> + <ul class="dropdown"> + <?php print_folder($_['allfeeds'], 0); ?> + </ul> + </div> + </td> </tr> <tr> <td><input type="text" id="folder_add_name" placeholder="<?php echo $l->t('Folder name'); ?>" class="news_input" /></td> diff --git a/templates/part.feeds.php b/templates/part.feeds.php index e3266bed6..3fbf4c08d 100644 --- a/templates/part.feeds.php +++ b/templates/part.feeds.php @@ -5,6 +5,7 @@ echo '<ul style="margin-left:' . 10*$depth . 'px;"> <li class="folder_list" >' . '<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('Edit feed') . '"></button>' . '</div>'; echo '<ul>'; $children = $folder->getChildren(); @@ -16,7 +17,7 @@ echo '<li class="feeds_list"><a href="' . OCP\Util::linkTo('news', 'index.php'). '?feedid=' . $child->getId() . '">' . $child->getTitle() .'</a>'; 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 '<button class="svg action" id="feeds_edit" title="' . $l->t('Edit feed') . '"></button>'; echo '</li>'; } else { |