From 625e980db68317ea715714f24a71a0309f558f00 Mon Sep 17 00:00:00 2001 From: Michael Heppler Date: Mon, 8 Feb 2016 22:54:30 -0500 Subject: [PATCH] Added counter to dataTables in the File Permissions pg, plus prototype for dynamic "selected" counter in the access action popups. [ref #2716] --- .../dataverse/ManageFilePermissionsPage.java | 6 +- .../webapp/permissions-manage-files.xhtml | 55 ++++++++++++++++++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/ManageFilePermissionsPage.java b/src/main/java/edu/harvard/iq/dataverse/ManageFilePermissionsPage.java index 7d5c15a0867..4984ca55668 100644 --- a/src/main/java/edu/harvard/iq/dataverse/ManageFilePermissionsPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/ManageFilePermissionsPage.java @@ -37,6 +37,7 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.apache.commons.lang.StringUtils; +import org.primefaces.event.SelectEvent; /** * @@ -226,6 +227,10 @@ public void setSelectedRoleAssignmentRows(List selectedRoleAs this.selectedRoleAssignmentRows = selectedRoleAssignmentRows; } + public void rowSelected(SelectEvent event) { + // System.out.println("rowSelected"); + } + public void initViewRemoveDialogByFile(DataFile file, List raRows) { this.selectedFile = file; this.selectedRoleAssignee = null; @@ -466,7 +471,6 @@ public void setRenderFileMessages(boolean renderFileMessages) { - // inner class used fordisplay of role assignments public static class RoleAssignmentRow { diff --git a/src/main/webapp/permissions-manage-files.xhtml b/src/main/webapp/permissions-manage-files.xhtml index 44b5fdc333d..cbaeac07aef 100644 --- a/src/main/webapp/permissions-manage-files.xhtml +++ b/src/main/webapp/permissions-manage-files.xhtml @@ -49,6 +49,10 @@
+

+ #{manageFilePermissionsPage.fileAccessRequestMap.size()} Requests +

+ @@ -84,6 +88,11 @@
+ +

+ #{manageFilePermissionsPage.roleAssigneeMap.size()} Users/Groups +

+ @@ -130,6 +139,11 @@ + +

+ #{manageFilePermissionsPage.fileMap.size()} Restricted Files +

+ @@ -175,9 +189,26 @@
+ +

+ Selecting #{manageFilePermissionsPage.selectedFiles.size()} of + + #{manageFilePermissionsPage.roleAssignments.size()} + + #{!empty manageFilePermissionsPage.selectedFile ? 'Users/Groups' : 'Restricted Files'} + + +

+
+ + + + + + @@ -231,13 +262,35 @@
-
+
+ +

+ Selecting #{manageFilePermissionsPage.selectedFiles.size()} of + + #{!empty manageFilePermissionsPage.fileRequester ? + manageFilePermissionsPage.fileAccessRequestMap.get(manageFilePermissionsPage.fileRequester).size() + : + manageFilePermissionsPage.fileMap.size()} + + #{!empty manageFilePermissionsPage.fileRequester ? + 'Requested Files' + : + 'Restricted Files'} + +

+
+ + + + + +