diff --git a/css/bookmarks.css b/css/bookmarks.css index 0c7cddeb..3c4b557f 100644 --- a/css/bookmarks.css +++ b/css/bookmarks.css @@ -179,7 +179,7 @@ padding: 0.2em; padding-left:1em; } -#leftcontent .tag_list > li span , #leftcontent .share_list > li span{ +#leftcontent .tag_list > li .tag , #leftcontent .share_list > li .tag{ background: none repeat scroll 0 0 #DEE7F8; border: 1px solid #CAD8F3; border-radius: 6px 6px 6px 6px; @@ -195,4 +195,13 @@ .tag_list em , .share_list em{ float:right; display:block; -} \ No newline at end of file +} +.tags_actions { + display:none; + margin-left: 0.5em; + float:right; +} +li:hover .tags_actions { + display:block; +} +li:hover em { display : none; } \ No newline at end of file diff --git a/index.php b/index.php index 7529b72b..74dbddf7 100644 --- a/index.php +++ b/index.php @@ -33,7 +33,9 @@ OCP\Util::addscript('bookmarks','bookmarks'); OCP\Util::addStyle('bookmarks', 'bookmarks'); $qtags = OC_Bookmarks_Bookmarks::findTags(); +$shared = OC_Bookmarks_Bookmarks::findSharing(); $tmpl = new OCP\Template( 'bookmarks', 'list', 'user' ); $tmpl->assign('tags', $qtags); +$tmpl->assign('shared', $shared); $tmpl->printPage(); diff --git a/lib/bookmarks.php b/lib/bookmarks.php index f8d0ca4d..5da98410 100644 --- a/lib/bookmarks.php +++ b/lib/bookmarks.php @@ -25,6 +25,15 @@ */ class OC_Bookmarks_Bookmarks{ + + /** + * @brief Find People with whome we shared bookmarks and how much + */ + public static function findSharing($offset = 0, $limit = 10){ + $query = OCP\DB::prepare('SELECT \'@public\' as name, count(*) as nbr from *PREFIX*bookmarks where public=1 group by public LIMIT '.$offset.', '.$limit); + $tags = $query->execute()->fetchAll(); + return $tags; + } /** * @brief Finds all tags for bookmarks */ diff --git a/templates/list.php b/templates/list.php index 41f4eadf..a7d8c91d 100644 --- a/templates/list.php +++ b/templates/list.php @@ -18,15 +18,35 @@