diff --git a/docs-parent/TODO b/docs-parent/TODO
index 79fc21bf..e69de29b 100644
--- a/docs-parent/TODO
+++ b/docs-parent/TODO
@@ -1,2 +0,0 @@
-- Advanced search: shared documents (client)
-- Show shared status in documents list (client)
\ No newline at end of file
diff --git a/docs-web/src/main/webapp/app/docs/app.js b/docs-web/src/main/webapp/app/docs/app.js
index 422187be..1521d7ee 100644
--- a/docs-web/src/main/webapp/app/docs/app.js
+++ b/docs-web/src/main/webapp/app/docs/app.js
@@ -5,7 +5,7 @@
*/
var App = angular.module('docs',
// Dependencies
- ['ui.state', 'ui.bootstrap', 'ui.keypress', 'ui.validate',
+ ['ui.state', 'ui.route', 'ui.bootstrap', 'ui.keypress', 'ui.validate',
'ui.sortable', 'restangular', 'ngSanitize', 'ngMobile', 'colorpicker.module']
)
diff --git a/docs-web/src/main/webapp/app/docs/controller/Document.js b/docs-web/src/main/webapp/app/docs/controller/Document.js
index 70c06892..d31c9d08 100644
--- a/docs-web/src/main/webapp/app/docs/controller/Document.js
+++ b/docs-web/src/main/webapp/app/docs/controller/Document.js
@@ -22,7 +22,8 @@ App.controller('Document', function($scope, $state, Restangular) {
query: '',
createDateMin: null,
createDateMax: null,
- tags: []
+ tags: [],
+ shared: false
};
};
$scope.initSearch();
@@ -40,7 +41,8 @@ App.controller('Document', function($scope, $state, Restangular) {
search: $scope.search.query,
create_date_min: $scope.isAdvancedSearchCollapsed || !$scope.search.createDateMin ? null : $scope.search.createDateMin.getTime(),
create_date_max: $scope.isAdvancedSearchCollapsed || !$scope.search.createDateMax ? null : $scope.search.createDateMax.getTime(),
- 'tags': $scope.isAdvancedSearchCollapsed ? null : _.pluck($scope.search.tags, 'id')
+ 'tags': $scope.isAdvancedSearchCollapsed ? null : _.pluck($scope.search.tags, 'id'),
+ 'shared': $scope.isAdvancedSearchCollapsed ? null : $scope.search.shared
})
.then(function(data) {
$scope.documents = data.documents;
@@ -70,7 +72,7 @@ App.controller('Document', function($scope, $state, Restangular) {
});
/**
- * Watch for search change.
+ * Watch for search scope change.
*/
$scope.$watch('search', function(prev, next) {
$scope.loadDocuments();
diff --git a/docs-web/src/main/webapp/partial/docs/document.html b/docs-web/src/main/webapp/partial/docs/document.html
index a68384a4..f32a3c2a 100644
--- a/docs-web/src/main/webapp/partial/docs/document.html
+++ b/docs-web/src/main/webapp/partial/docs/document.html
@@ -29,6 +29,12 @@