Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.btu.openinfra.backend.rest;

import java.util.List;
import java.util.Locale;
import java.util.UUID;

import javax.ws.rs.GET;
Expand Down Expand Up @@ -90,7 +89,7 @@ public List<AttributeTypeToAttributeTypeGroupPojo> get(
return new AttributeTypeToAttributeTypeGroupDao(
projectId,
OpenInfraSchemas.valueOf(schema.toUpperCase())).read(
Locale.forLanguageTag(language),
PtLocaleDao.forLanguageTag(language),
sortOrder,
orderBy,
offset,
Expand Down
1 change: 1 addition & 0 deletions openinfra_core/src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<!-- Register entity classes -->
<class>de.btu.openinfra.backend.db.jpa.model.AttributeType</class>
<class>de.btu.openinfra.backend.db.jpa.model.AttributeTypeXAttributeType</class>
<class>de.btu.openinfra.backend.db.jpa.model.AttributeTypeGroup</class>
<class>de.btu.openinfra.backend.db.jpa.model.AttributeTypeGroupToTopicCharacteristic</class>
<class>de.btu.openinfra.backend.db.jpa.model.AttributeTypeToAttributeTypeGroup</class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ datatype.label = Datentyp
unit.label = Einheit
domain.label = Wertebereich

orderby.label = Sortieren&nbsp;nach
sortingorder.label = Sortierreihenfolge
ascending.label = Aufsteigend
descending.label = Absteigend

setup.geometry.label = Einstellungen&nbsp;f&uuml;r&nbsp;Geometrie

project.details.label = Details&nbsp;zum&nbsp;Projekt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ description.label = Description
visibility.label = Visibility
datatype.label = Data type
unit.label = Unit
domain.label = Domain
domain.label = Domain

orderby.label = Order&nbsp;by
sortingorder.label = Sorting&nbsp;order
ascending.label = Ascending
descending.label = Descending

setup.geometry.label = Geometry&nbsp;setup

Expand Down
84 changes: 84 additions & 0 deletions openinfra_core/src/main/webapp/jsp/snippets/FilterAndOrderBy.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!--
Snippet for providing sort order of columns.
-->

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<div class="row">
<div class="col-lg-2">
<div class="input-group">
<form>
<select id="orderBy" name="orderBy" onchange="submit()" class="form-control">
<option disabled selected><fmt:message key="orderby.label"/></option>
<option ${param.orderBy == 'NAME' ? 'selected' : ''} value="NAME">
<fmt:message key="name.label"/>
</option>
<option ${param.orderBy == 'DESCRIPTION' ? 'selected' : ''} value="DESCRIPTION">
<fmt:message key="description.label"/>
</option>
</select>
<!-- Additionally, the form control must also include all existing
parameters as hidden fields -->
<c:forEach items="${param}" var="pageParameter">
<!-- Don't add the orderBy parameter again! -->
<c:if test="${pageParameter.key != ''}">
<input type="hidden" name="${pageParameter.key}" value="${pageParameter.value}"/>
</c:if>
</c:forEach>
<if test="${empty param.sortOrder}">
<input type="hidden" name="sortOrder" value="ASC"/>
</if>
</form>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-2">
<div class="input-group">
<form>
<select id="sortOrder" name="sortOrder" onchange="submit()" class="form-control">
<option disabled selected><fmt:message key="sortingorder.label"/></option>
<option value="ASC" ${param.sortOrder == 'ASC' ? 'selected' : ''}
${(not empty param.orderBy && empty param.sortOrder) ? 'selected' : ''}>
<fmt:message key="ascending.label"/>
</option>
<option value="DESC" ${param.sortOrder == 'DESC' ? 'selected' : ''}>
<fmt:message key="descending.label"/>
</option>
</select>
<!-- Additionally, the form control must also include all existing
parameters as hidden fields -->
<c:forEach items="${param}" var="pageParameter">
<!-- Don't add the sortOrder parameter again! -->
<c:if test="${pageParameter.key != 'sortOrder'}">
<input type="hidden" name="${pageParameter.key}" value="${pageParameter.value}"/>
</c:if>
</c:forEach>
</form>
</div><!-- /input-group -->
</div><!-- /.col-lg -->
<div class="col-lg-2">
<div class="input-group">
<form>
<input type="text" name="filter" value="<c:out value="${param.filter}"/>" class="form-control" placeholder="Name filtern (%und%)">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<fmt:message key="searchbutton.label"/>
</button>
</span>
<!-- Additionally, the form control must also include all existing
parameters as hidden fields -->
<c:forEach items="${param}" var="pageParameter">
<!-- Don't add the language parameter again! -->
<c:if test="${pageParameter.key != 'filter'}">
<input type="hidden" name="${pageParameter.key}" value="${pageParameter.value}"/>
</c:if>
</c:forEach>
</form>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
</div><!-- /.row -->

<br/>
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,7 @@
<body>
<%@ include file="../../snippets/Menu.jsp" %>

<div class="row">
<div class="col-lg-6">
<div class="input-group">
<form>
<input type="text" name="filter" value="<c:out value="${param.filter}"/>" class="form-control" placeholder="Name filtern (%und%)">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<fmt:message key="searchbutton.label"/>
</button>
</span>
<!-- Additionally, the form control must also include all existing
parameters as hidden fields -->
<c:forEach items="${param}" var="pageParameter">
<!-- Don't add the language parameter again! -->
<c:if test="${pageParameter.key != 'filter'}">
<input type="hidden" name="${pageParameter.key}" value="${pageParameter.value}"/>
</c:if>
</c:forEach>
</form>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
</div><!-- /.row -->

<br/>
<%@ include file="../../snippets/FilterAndOrderBy.jsp" %>

<div class="panel panel-default">
<div class="panel-heading">
Expand Down
2 changes: 2 additions & 0 deletions openinfra_core/src/main/webapp/jsp/views/list/ValueLists.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<!-- include the menu -->
<%@ include file="../../snippets/Menu.jsp" %>

<%@ include file="../../snippets/FilterAndOrderBy.jsp" %>

<div class="panel panel-default">
<div class="panel-heading">
<fmt:message key="valuelists.label"/>
Expand Down