From 7effbc8de00d9b9af40f3235b51a1ea273771284 Mon Sep 17 00:00:00 2001 From: bgamard Date: Mon, 19 Feb 2024 18:33:56 +0100 Subject: [PATCH] list display mode in the share app --- .../webapp/src/app/share/controller/Share.js | 9 +++ .../partial/docs/document.view.content.html | 7 +- .../main/webapp/src/partial/share/share.html | 78 +++++++++++++++++-- 3 files changed, 83 insertions(+), 11 deletions(-) diff --git a/docs-web/src/main/webapp/src/app/share/controller/Share.js b/docs-web/src/main/webapp/src/app/share/controller/Share.js index 72d7e510..97998868 100644 --- a/docs-web/src/main/webapp/src/app/share/controller/Share.js +++ b/docs-web/src/main/webapp/src/app/share/controller/Share.js @@ -4,6 +4,15 @@ * Share controller. */ angular.module('share').controller('Share', function($scope, $state, $stateParams, Restangular, $uibModal) { + $scope.displayMode = _.isUndefined(localStorage.fileDisplayMode) ? 'grid' : localStorage.fileDisplayMode; + + /** + * Watch for display mode change. + */ + $scope.$watch('displayMode', function (next) { + localStorage.fileDisplayMode = next; + }); + // Load document Restangular.one('document', $stateParams.documentId).get({ share: $stateParams.shareId }) .then(function (data) { diff --git a/docs-web/src/main/webapp/src/partial/docs/document.view.content.html b/docs-web/src/main/webapp/src/partial/docs/document.view.content.html index 623a24c7..ab051692 100644 --- a/docs-web/src/main/webapp/src/partial/docs/document.view.content.html +++ b/docs-web/src/main/webapp/src/partial/docs/document.view.content.html @@ -77,12 +77,13 @@ - - + +
-
+
{{ file.name }}
diff --git a/docs-web/src/main/webapp/src/partial/share/share.html b/docs-web/src/main/webapp/src/partial/share/share.html index 2173cab9..b517230b 100644 --- a/docs-web/src/main/webapp/src/partial/share/share.html +++ b/docs-web/src/main/webapp/src/partial/share/share.html @@ -35,7 +35,7 @@
-

+

{{ 'document.subject' | translate }}
{{ document.subject }}
@@ -63,18 +63,80 @@ +
+
{{ meta.name }}
+
{{ meta.value }}
+
{{ meta.value | date: dateFormat }}
+
{{ meta.value ? 'yes' : 'no' | translate }}
+
+ +
+ + + + + + +
+ +
+ +
-
-
- - - + +
+
+
+ + + + +
+
+
{{ file.name }}
+
+
+
-
+ + + + + + + + + + + + + + + + + + + + + +
FilenameTypeSizeVersion
+
+ +
+
+ {{ file.name }} + {{ file.mimetype }}{{ file.size | filesize }}v{{ file.version + 1 }}.0
+