Skip to content

Commit

Permalink
Merge pull request #4206 from effective-webwork/initial-list-sorting
Browse files Browse the repository at this point in the history
Sort lists initialy by first column
  • Loading branch information
Kathrin-Huber authored Feb 25, 2021
2 parents a0df374 + b88a401 commit a288f09
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.DocketDTO"-->
<p:dataTable id="docketTable"
styleClass="default-layout"
var="item"
Expand All @@ -25,6 +26,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title.keyword}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand All @@ -34,7 +36,7 @@
listener="#{DocketForm.onPageChange}"/>

<p:column headerText="#{msgs.title}"
sortBy="#{item.title}"
sortBy="#{item.title.keyword}"
rendered="#{ProjectForm.showColumn('docket.title')}">
<h:outputText value="#{item.title}"
title="#{item.title}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.ProjectDTO"-->
<p:dataTable var="item"
value="#{ProjectForm.lazyDTOModel}"
first="#{ProjectForm.firstRow}"
Expand All @@ -25,6 +26,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title.keyword}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.RulesetDTO"-->
<p:dataTable id="rulesetTable"
styleClass="default-layout"
var="item"
Expand All @@ -25,6 +26,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title.keyword}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand All @@ -34,7 +36,7 @@
listener="#{RulesetForm.onPageChange}"/>

<p:column headerText="#{msgs.title}"
sortBy="#{item.title}"
sortBy="#{item.title.keyword}"
rendered="#{ProjectForm.showColumn('ruleset.title')}">
<h:outputText value="#{item.title}"
title="#{item.title}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:o="http://omnifaces.org/ui"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.TemplateDTO"-->
<p:dataTable id="templateTable"
styleClass="default-layout"
var="item"
Expand All @@ -26,6 +27,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title.keyword}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.WorkflowDTO"-->
<p:dataTable id="workflowTable"
styleClass="default-layout"
var="item"
Expand All @@ -25,6 +26,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title.keyword}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
xmlns:p="http://primefaces.org/ui">
<p:importEnum type="org.kitodo.data.database.enums.TaskStatus" allSuffix="ALL_ENUM_VALUES"/>
<h:form id="tasksForm">
<!--@elvariable id="item" type="org.kitodo.production.dto.TaskDTO"-->
<p:dataTable id="taskTable"
widgetVar="taskTable"
var="item"
Expand All @@ -29,6 +30,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title.keyword}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand All @@ -45,7 +47,7 @@
</p:column>

<p:column id="titleColumn"
headerText="#{msgs.task}"
headerText="#{msgs.title}"
sortBy="#{item.title.keyword}"
rendered="#{CurrentTaskForm.showColumn('task.title')}">
<h:outputText title="#{item.title}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.ClientDTO"-->
<p:dataTable var="item"
id="clientsTable"
styleClass="default-layout"
Expand All @@ -23,6 +24,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.name}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.data.database.beans.LdapGroup"-->
<p:dataTable var="item"
id="ldapGroupsTable"
styleClass="default-layout"
Expand All @@ -25,6 +26,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.data.database.beans.LdapServer"-->
<p:dataTable var="item"
id="ldapServersTable"
styleClass="default-layout"
Expand All @@ -23,6 +24,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title}">
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.RoleDTO"-->
<p:dataTable var="item"
id="rolesTable"
styleClass="default-layout"
Expand All @@ -25,6 +26,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.title}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<!--@elvariable id="item" type="org.kitodo.production.dto.UserDTO"-->
<p:dataTable var="item"
id="usersTable"
widgetVar="usersTable"
Expand All @@ -26,6 +27,7 @@
paginator="true"
resizableColumns="true"
liveResize="true"
sortBy="#{item.surname}"
rows="#{LoginForm.loggedUser.tableSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="#{msgs.currentPageReportTemplate}"
Expand Down
2 changes: 1 addition & 1 deletion Kitodo/src/test/java/org/kitodo/selenium/EditingST.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void editRulesetTest() throws Exception {
@Test
public void editUserTest() throws Exception {
usersPage.editUser();
assertEquals("Header for edit user is incorrect", "Benutzer bearbeiten (Kowalski, Jan)",
assertEquals("Header for edit user is incorrect", "Benutzer bearbeiten (null, Removable user)",
Pages.getUserEditPage().getHeaderText());
}

Expand Down

0 comments on commit a288f09

Please sign in to comment.