Skip to content

Commit a4366d1

Browse files
committed
sortable, deferred load
1 parent bac0015 commit a4366d1

File tree

2 files changed

+72
-61
lines changed

2 files changed

+72
-61
lines changed

src/main/webapp/permissions-manage-files.xhtml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -219,49 +219,55 @@
219219
</div>
220220
</div>
221221
<!-- Role Assignment History Panel -->
222+
<!-- Role Assignment History Panel -->
222223
<o:importConstants type="edu.harvard.iq.dataverse.settings.FeatureFlags" />
223224
<div class="panel panel-default" rendered="#{FeatureFlags.ROLE_ASSIGNMENT_AUDITING.enabled()}">
224225
<div data-toggle="collapse" data-target="#panelCollapseHistory" class="panel-heading text-info">
225226
#{bundle['dataverse.permissions.history']} <span class="glyphicon glyphicon-chevron-down"/>
226227
<span class="text-muted small pull-right">#{bundle['dataverse.permissions.history.description']}</span>
227228
</div>
228229
<div id="panelCollapseHistory" class="collapse">
229-
<p:ajax event="toggle" update="historyTableContainer" />
230-
<div class="panel-body">
231-
<h:panelGroup id="historyTableContainer">
232-
<p:dataTable id="roleAssignmentHistory" var="historyEntry" value="#{manageFilePermissionsPage.roleAssignmentHistory}">
233-
<p:column headerText="#{bundle['dataverse.permissions.history.assignee']}">
234-
<h:outputText value="#{historyEntry.assigneeIdentifier}" />
235-
</p:column>
236-
<p:column headerText="#{bundle['dataverse.permissions.history.role']}">
237-
<h:outputText value="#{historyEntry.roleName}" />
238-
</p:column>
239-
<p:column headerText="#{bundle['dataverse.permissions.history.definedOn']}">
240-
<h:outputFormat value="#{bundle['dataverse.permissions.history.files']}"
241-
title="#{historyEntry.definitionPointIdsAsString}">
242-
<f:param value="#{historyEntry.definitionPointIds.size()}" />
243-
<p:tooltip/>
244-
</h:outputFormat>
245-
</p:column>
246-
<p:column headerText="#{bundle['dataverse.permissions.history.assignedBy']}">
247-
<h:outputText value="#{historyEntry.assignedBy}" />
248-
</p:column>
249-
<p:column headerText="#{bundle['dataverse.permissions.history.assignedAt']}">
250-
<h:outputText value="#{historyEntry.assignedAt}">
251-
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
252-
</h:outputText>
253-
</p:column>
254-
<p:column headerText="#{bundle['dataverse.permissions.history.revokedBy']}">
255-
<h:outputText value="#{historyEntry.revokedBy}" />
256-
</p:column>
257-
<p:column headerText="#{bundle['dataverse.permissions.history.revokedAt']}">
258-
<h:outputText value="#{historyEntry.revokedAt}">
259-
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
260-
</h:outputText>
261-
</p:column>
262-
</p:dataTable>
263-
</h:panelGroup>
264-
</div>
230+
<p:panel id="historyPanel" deferred="true" deferredMode="visible">
231+
<div class="panel-body">
232+
<h:panelGroup id="historyTableContainer">
233+
<p:dataTable id="roleAssignmentHistory" var="historyEntry" value="#{manageFilePermissionsPage.roleAssignmentHistory}"
234+
sortMode="multiple"
235+
paginator="true" rows="10"
236+
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
237+
rowsPerPageTemplate="5,10,15">
238+
<p:column headerText="#{bundle['dataverse.permissions.history.assignee']}" sortBy="#{historyEntry.assigneeIdentifier}">
239+
<h:outputText value="#{historyEntry.assigneeIdentifier}" />
240+
</p:column>
241+
<p:column headerText="#{bundle['dataverse.permissions.history.role']}" sortBy="#{historyEntry.roleName}">
242+
<h:outputText value="#{historyEntry.roleName}" />
243+
</p:column>
244+
<p:column headerText="#{bundle['dataverse.permissions.history.definedOn']}" sortBy="#{historyEntry.definitionPointIds.size()}">
245+
<h:outputFormat value="#{bundle['dataverse.permissions.history.files']}"
246+
title="#{historyEntry.definitionPointIdsAsString}">
247+
<f:param value="#{historyEntry.definitionPointIds.size()}" />
248+
<p:tooltip/>
249+
</h:outputFormat>
250+
</p:column>
251+
<p:column headerText="#{bundle['dataverse.permissions.history.assignedBy']}" sortBy="#{historyEntry.assignedBy}">
252+
<h:outputText value="#{historyEntry.assignedBy}" />
253+
</p:column>
254+
<p:column headerText="#{bundle['dataverse.permissions.history.assignedAt']}" sortBy="#{historyEntry.assignedAt}">
255+
<h:outputText value="#{historyEntry.assignedAt}">
256+
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
257+
</h:outputText>
258+
</p:column>
259+
<p:column headerText="#{bundle['dataverse.permissions.history.revokedBy']}" sortBy="#{historyEntry.revokedBy}">
260+
<h:outputText value="#{historyEntry.revokedBy}" />
261+
</p:column>
262+
<p:column headerText="#{bundle['dataverse.permissions.history.revokedAt']}" sortBy="#{historyEntry.revokedAt}">
263+
<h:outputText value="#{historyEntry.revokedAt}">
264+
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
265+
</h:outputText>
266+
</p:column>
267+
</p:dataTable>
268+
</h:panelGroup>
269+
</div>
270+
</p:panel>
265271
</div>
266272
</div>
267273
<!-- View / Remove Users/Groups Popup -->

src/main/webapp/permissions-manage.xhtml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -208,31 +208,36 @@
208208
<div id="panelCollapseHistory" class="collapse">
209209
<p:ajax event="toggle" update="historyTableContainer" />
210210
<div class="panel-body">
211-
<h:panelGroup id="historyTableContainer">
212-
<p:dataTable id="roleAssignmentHistory" widgetVar="roleAssignmentHistory" var="historyEntry" value="#{managePermissionsPage.roleAssignmentHistory}">
213-
<p:column headerText="#{bundle['dataverse.permissions.history.assignee']}">
214-
<h:outputText value="#{historyEntry.assigneeIdentifier}" />
215-
</p:column>
216-
<p:column headerText="#{bundle['dataverse.permissions.history.role']}">
217-
<h:outputText value="#{historyEntry.roleName}" />
218-
</p:column>
219-
<p:column headerText="#{bundle['dataverse.permissions.history.assignedBy']}">
220-
<h:outputText value="#{historyEntry.assignedBy}" />
221-
</p:column>
222-
<p:column headerText="#{bundle['dataverse.permissions.history.assignedAt']}">
223-
<h:outputText value="#{historyEntry.assignedAt}">
224-
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
225-
</h:outputText>
226-
</p:column>
227-
<p:column headerText="#{bundle['dataverse.permissions.history.revokedBy']}">
228-
<h:outputText value="#{historyEntry.revokedBy}" />
229-
</p:column>
230-
<p:column headerText="#{bundle['dataverse.permissions.history.revokedAt']}">
231-
<h:outputText value="#{historyEntry.revokedAt}">
232-
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
233-
</h:outputText>
234-
</p:column>
235-
</p:dataTable>
211+
<h:panelGroup id="historyTableContainer" deferred="true" deferredMode="visible">
212+
<p:dataTable id="roleAssignmentHistory" widgetVar="roleAssignmentHistory"
213+
var="historyEntry" value="#{managePermissionsPage.roleAssignmentHistory}"
214+
sortMode="multiple"
215+
paginator="true" rows="10"
216+
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
217+
rowsPerPageTemplate="5,10,15">
218+
<p:column headerText="#{bundle['dataverse.permissions.history.assignee']}" sortBy="#{historyEntry.assigneeIdentifier}">
219+
<h:outputText value="#{historyEntry.assigneeIdentifier}" />
220+
</p:column>
221+
<p:column headerText="#{bundle['dataverse.permissions.history.role']}" sortBy="#{historyEntry.roleName}">
222+
<h:outputText value="#{historyEntry.roleName}" />
223+
</p:column>
224+
<p:column headerText="#{bundle['dataverse.permissions.history.assignedBy']}" sortBy="#{historyEntry.assignedBy}">
225+
<h:outputText value="#{historyEntry.assignedBy}" />
226+
</p:column>
227+
<p:column headerText="#{bundle['dataverse.permissions.history.assignedAt']}" sortBy="#{historyEntry.assignedAt}">
228+
<h:outputText value="#{historyEntry.assignedAt}">
229+
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
230+
</h:outputText>
231+
</p:column>
232+
<p:column headerText="#{bundle['dataverse.permissions.history.revokedBy']}" sortBy="#{historyEntry.revokedBy}">
233+
<h:outputText value="#{historyEntry.revokedBy}" />
234+
</p:column>
235+
<p:column headerText="#{bundle['dataverse.permissions.history.revokedAt']}" sortBy="#{historyEntry.revokedAt}">
236+
<h:outputText value="#{historyEntry.revokedAt}">
237+
<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
238+
</h:outputText>
239+
</p:column>
240+
</p:dataTable>
236241
</h:panelGroup>
237242
</div>
238243
</div>

0 commit comments

Comments
 (0)