From d44855bd57b27dafd8dfa4f2ae37a9edb0e73942 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Sat, 12 Jul 2014 16:28:07 +0200 Subject: [PATCH] Wire up 'ACTIVITY' --- core/src/plugins/access.fs/fsTemplatePart.xml | 2 +- .../class.AJXP_NotificationCenter.php | 21 +++++++--- .../class.NotificationLoader.js | 42 ++++++++++++++++++- .../interface.AJXP_FeedStore.php | 5 ++- .../plugins/core.notifications/manifest.xml | 13 ++++++ .../feed.sql/class.AJXP_SqlFeedStore.php | 41 +++++++++++++----- .../res/themes/orbit/css/ajaxplorer.css | 20 +++++++++ .../gui.ajax/res/themes/orbit/html/gui.html | 1 + .../res/themes/orbit/html/gui_debug.html | 1 + 9 files changed, 127 insertions(+), 19 deletions(-) diff --git a/core/src/plugins/access.fs/fsTemplatePart.xml b/core/src/plugins/access.fs/fsTemplatePart.xml index b27dabcd20..7e14cfd26a 100644 --- a/core/src/plugins/access.fs/fsTemplatePart.xml +++ b/core/src/plugins/access.fs/fsTemplatePart.xml @@ -15,7 +15,7 @@
+ ]]> + + + diff --git a/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php b/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php index 6ab24c2a7e..831d426c24 100644 --- a/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php +++ b/core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php @@ -84,13 +84,15 @@ public function persistEvent($hookName, $data, $repositoryId, $repositoryScope, /** * @param array $filterByRepositories - * @param string $userId + * @param $filterByPath * @param string $userGroup * @param integer $offset * @param integer $limit + * @param bool $enlargeToOwned + * @param string $userId * @return An array of stdClass objects with keys hookname, arguments, author, date, repository */ - public function loadEvents($filterByRepositories, $userId, $userGroup, $offset = 0, $limit = 10, $enlargeToOwned = true) + public function loadEvents($filterByRepositories, $filterByPath, $userGroup, $offset = 0, $limit = 10, $enlargeToOwned = true, $userId) { if($this->sqlDriver["password"] == "XXXX") return array(); require_once(AJXP_BIN_FOLDER."/dibi.compact.php"); @@ -105,14 +107,33 @@ public function loadEvents($filterByRepositories, $userId, $userGroup, $offset = ) ORDER BY [edate] DESC %lmt %ofs", "event", $filterByRepositories, $userId, $userId, $userGroup, $limit, $offset); } else { - $res = dibi::query("SELECT * FROM [ajxp_feed] WHERE [etype] = %s AND - ( [repository_id] IN (%s)) - AND ( - [repository_scope] = 'ALL' - OR ([repository_scope] = 'USER' AND [user_id] = %s ) - OR ([repository_scope] = 'GROUP' AND [user_group] = %s ) - ) - ORDER BY [edate] DESC %lmt %ofs", "event", $filterByRepositories, $userId, $userGroup, $limit, $offset); + if(!empty($filterByPath)){ + $groupByClause = ""; + if($filterByPath[strlen($filterByPath)-1]=='/'){ + $groupByClause = " GROUP BY [index_path] "; + } + $index_path = "ajxp.fs://".$filterByRepositories[0].$filterByPath."%"; + $res = dibi::query("SELECT * FROM [ajxp_feed] WHERE [etype] = %s + AND + ( [repository_id] IN (%s)) + AND + ([index_path] LIKE %s) + AND ( + [repository_scope] = 'ALL' + OR ([repository_scope] = 'USER' AND [user_id] = %s ) + OR ([repository_scope] = 'GROUP' AND [user_group] = %s ) + ) + $groupByClause ORDER BY [edate] DESC %lmt %ofs", "event", $filterByRepositories, $index_path, $userId, $userGroup, $limit, $offset); + }else{ + $res = dibi::query("SELECT * FROM [ajxp_feed] WHERE [etype] = %s AND + ( [repository_id] IN (%s)) + AND ( + [repository_scope] = 'ALL' + OR ([repository_scope] = 'USER' AND [user_id] = %s ) + OR ([repository_scope] = 'GROUP' AND [user_group] = %s ) + ) + ORDER BY [edate] DESC %lmt %ofs", "event", $filterByRepositories, $userId, $userGroup, $limit, $offset); + } } $data = array(); foreach ($res as $n => $row) { diff --git a/core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css b/core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css index 5cf35ea800..3fb90f32a5 100644 --- a/core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css +++ b/core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css @@ -3210,6 +3210,26 @@ div.class-FetchedResultPane div.thumbnail_selectable_cell.detailed span.text_lab cursor: pointer; } +#info_panel div.class-FetchedResultPane div.thumbnail_selectable_cell.detailed{ + padding: 7px 1px; + cursor: default; +} + +#info_panel div.class-FetchedResultPane div.thumbnail_selectable_cell.detailed div.thumbnail_selectable_cell{ + display: none; +} + +#info_panel div.class-FetchedResultPane div.thumbnail_selectable_cell.detailed div.thumbLabel{ + font-weight: lighter; + font-size: 1.4em; + color: #555; +} + +#info_panel div.class-FetchedResultPane div.ajxpNodeProvider:hover{ + background-color: transparent !important; +} + + div.foldedPanel_tooltip{ width: 210px !important; background-color: #399997; diff --git a/core/src/plugins/gui.ajax/res/themes/orbit/html/gui.html b/core/src/plugins/gui.ajax/res/themes/orbit/html/gui.html index 1753d4650a..3fda6b1efc 100644 --- a/core/src/plugins/gui.ajax/res/themes/orbit/html/gui.html +++ b/core/src/plugins/gui.ajax/res/themes/orbit/html/gui.html @@ -12,6 +12,7 @@