Some layout improvments

Jens Pelzetter 2021-02-01 21:29:16 +01:00
parent 8dc28751bc
commit 48dc471342
7 changed files with 148 additions and 76 deletions

View File

@ -114,7 +114,22 @@ public class DocumentFolderController {
private PermissionChecker permissionChecker; private PermissionChecker permissionChecker;
@GET @GET
@Path("/{folderPath:(/.+)?}") @Path("/")
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String listItems(
@PathParam("sectionIdentifier") final String sectionIdentifier,
@QueryParam("filterTerm") @DefaultValue("") final String filterTerm,
@QueryParam("firstResult") @DefaultValue("0") final int firstResult,
@QueryParam("maxResults") @DefaultValue("20") final int maxResults
) {
return listItems(
sectionIdentifier, "", filterTerm, firstResult, maxResults
);
}
@GET
@Path("/{folderPath:(.+)?}")
@AuthorizationRequired @AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
public String listItems( public String listItems(

View File

@ -96,7 +96,7 @@
var="section"> var="section">
<tr> <tr>
<td> <td>
<a href="#{request.contextPath}/@contentsections/#{section.label}/folderbrowser"> <a href="#{request.contextPath}/@contentsections/#{section.label}/documentfolders">
#{section.label} #{section.label}
</a> </a>
</td> </td>

View File

@ -27,9 +27,30 @@
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link #{activePage == 'documentFolders' ? 'active' : ''}" <a class="nav-link #{activePage == 'documentFolders' ? 'active' : ''}"
href='#{mvc.basePath}/#{ContentSectionModel.sectionName}/document-folders'> href='#{mvc.basePath}/#{ContentSectionModel.sectionName}/documentfolders'>
<bootstrap:svgIcon icon="folder2-open" /> <bootstrap:svgIcon icon="folder2-open" />
<span>#{CmsAdminMessages['contentsection.documentfolder.title']}</span> <span>#{CmsAdminMessages['contentsection.documentfolders.title']}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link #{activePage == 'assetFolders' ? 'active' : ''}"
href='#{mvc.basePath}/#{ContentSectionModel.sectionName}/assetfolders'>
<bootstrap:svgIcon icon="collection" />
<span>#{CmsAdminMessages['contentsection.assetfolders.title']}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link #{activePage == 'categories' ? 'active' : ''}"
href='#{mvc.basePath}/#{ContentSectionModel.sectionName}/categories'>
<bootstrap:svgIcon icon="diagram-3-fill" />
<span>#{CmsAdminMessages['contentsection.categories.title']}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link #{activePage == 'configuration' ? 'active' : ''}"
href='#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration'>
<bootstrap:svgIcon icon="gear-fill" />
<span>#{CmsAdminMessages['contentsection.configuration.title']}</span>
</a> </a>
</li> </li>
</ul> </ul>

View File

@ -7,17 +7,17 @@
<ui:composition template="/WEB-INF/views/org/librecms/ui/content-section/contentsection.xhtml"> <ui:composition template="/WEB-INF/views/org/librecms/ui/content-section/contentsection.xhtml">
<ui:param name="activePage" value="documentFolders" /> <ui:param name="activePage" value="documentFolders" />
<ui:param name="title" value="#{CmsAdminMessages['contentsection.documentfolder.title']}" /> <ui:param name="title" value="#{CmsAdminMessages['contentsection.documentfolders.title']}" />
<ui:define name="breadcrumb"> <ui:define name="breadcrumb">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
#{CmsAdminMessages['contentsection.documentfolder.title']} #{CmsAdminMessages['contentsection.documentfolders.title']}
</li> </li>
</ui:define> </ui:define>
<ui:define name="main"> <ui:define name="main">
<div class="container"> <div class="container">
<div class="alert alert-warning"> <div class="alert alert-warning">
#{CmsAdminMessages.getMessage("contentsections.documentfolder.not_found", [contentSection, folderPath])} #{CmsAdminMessages.getMessage("contentsections.documentfolders.not_found", [contentSection, folderPath])}
</div> </div>
</div> </div>
</ui:define> </ui:define>

View File

@ -8,18 +8,18 @@
<ui:composition template="/WEB-INF/views/org/librecms/ui/content-section/contentsection.xhtml"> <ui:composition template="/WEB-INF/views/org/librecms/ui/content-section/contentsection.xhtml">
<ui:param name="activePage" value="documentFolders" /> <ui:param name="activePage" value="documentFolders" />
<ui:param name="title" value="#{CmsAdminMessages['contentsection.documentfolder.title']}" /> <ui:param name="title" value="#{CmsAdminMessages['contentsection.documentfolders.title']}" />
<ui:define name="breadcrumb"> <ui:define name="breadcrumb">
<c:choose> <c:choose>
<c:when test="#{DocumentFolderModel.breadcrumbs.isEmpty()}"> <c:when test="#{DocumentFolderModel.breadcrumbs.isEmpty()}">
<li aria-current="page" class="breadcrumb-item"> <li aria-current="page" class="breadcrumb-item">
#{CmsAdminMessages['contentsection.documentfolder.title']} #{CmsAdminMessages['contentsection.documentfolders.title']}
</li> </li>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/document-folders"> <a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documentfolders">
#{CmsAdminMessages['contentsection.documentfolder.title']} #{CmsAdminMessages['contentsection.documentfolders.title']}
</a> </a>
</li> </li>
</c:otherwise> </c:otherwise>
@ -34,7 +34,7 @@
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/document-folders/#{breadcrumb.path}">#{breadcrumb.pathToken}</a> <a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documentfolders/#{breadcrumb.path}">#{breadcrumb.pathToken}</a>
</li> </li>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
@ -47,67 +47,93 @@
<h1>#{CmsAdminMessages.getMessage("contentsection.documentfolder.heading", [ContentSectionModel.sectionName])}</h1> <h1>#{CmsAdminMessages.getMessage("contentsection.documentfolder.heading", [ContentSectionModel.sectionName])}</h1>
<div class="row"> <div class="row">
<nav class="col-sm-3 documentfolder foldertree"> <div class="col-sm-3">
<ul class="list-group"> <form action="#"
<c:forEach items="#{ContentSectionModel.folders}" class="form-inline mb-3"
var="folder"> method="get">
<ui:include src="document-folder-tree-node.xhtml"> <div class="form-group">
<ui:param name="basePath" <label class="sr-only"
value="#{mvc.basePath}/#{ContentSectionModel.sectionName}/document-folders" /> for="documentfolders-searchbox">
<ui:param name="folder" value="#{folder}" /> #{CmsAdminMessages['contentsection.documentfolders.searchbox.label']}
</ui:include> </label>
<div class="input-group">
<input class="form-control"
id="documentfolders-searchbox"
name="term"
type="text" />
<div class="input-group-append">
<button class="btn btn-primary"
type="submit">
<bootstrap:svgIcon icon="search" />
<span class="sr-only">#{CmsAdminMessages['contentsection.documentfolders.searchbox.submit']}</span>
</div>
</button>
</div>
</div>
<!-- <cms:folderTreeNode basePath="#{mvc.basePath}/#{ContentSectionModel.sectionName}/document-folders" </form>
collapsed="#{!folder.open}" <nav class="documentfolder foldertree">
name="#{folder.name}" <ul class="list-group">
path="#{folder.path}" <c:forEach items="#{ContentSectionModel.folders}"
selected="#{folder.selected}" var="folder">
subFolders="#{folder.subFolders[index]}" />--> <ui:include src="document-folder-tree-node.xhtml">
<!-- <cms:folderTreeNode basePath="#{mvc.basePath}/#{ContentSectionModel.sectionName}/document-folders" <ui:param name="basePath"
folder="#{folder}" />--> value="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documentfolders" />
</c:forEach> <ui:param name="folder" value="#{folder}" />
<!-- <li class="list-group-item"> </ui:include>
<a class="" href="#">Folder 1</a>
</li> <!-- <cms:folderTreeNode basePath="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documentfolders"
<li class="list-group-item"> collapsed="#{!folder.open}"
<div class="d-flex"> name="#{folder.name}"
<button class="btn btn-light p-0 subfolders-toggler" path="#{folder.path}"
data-toggle="collapse" selected="#{folder.selected}"
data-target="#folder-2-subfolders" subFolders="#{folder.subFolders[index]}" />-->
aria-expanded="false" <!-- <cms:folderTreeNode basePath="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documentfolders"
aria-controls="folder-2-subfolders" folder="#{folder}" />-->
type="button"> </c:forEach>
<bootstrap:svgIcon icon="caret-right-fill" /> <!-- <li class="list-group-item">
<span class="sr-only"> <a class="" href="#">Folder 1</a>
#{CmsAdminMessages['contentsection.documentfolder.foldersnav.subfolders.expand']} </li>
</span> <li class="list-group-item">
</button> <div class="d-flex">
<a class="pl-0" href="#">Folder 2</a> <button class="btn btn-light p-0 subfolders-toggler"
</div> data-toggle="collapse"
<ul class="border-0 collapse list-group " data-target="#folder-2-subfolders"
id="folder-2-subfolders"> aria-expanded="false"
<li class="border-0 list-group-item"> aria-controls="folder-2-subfolders"
<a class="" href="#">Folder 2-1</a> type="button">
</li> <bootstrap:svgIcon icon="caret-right-fill" />
<li class="border-0 list-group-item"> <span class="sr-only">
<a class="" href="#">Folder 2-2</a> #{CmsAdminMessages['contentsection.documentfolder.foldersnav.subfolders.expand']}
</li> </span>
<li class="border-0 list-group-item"> </button>
<a class="" href="#">Folder 2-3</a> <a class="pl-0" href="#">Folder 2</a>
</li> </div>
</ul> <ul class="border-0 collapse list-group "
</li> id="folder-2-subfolders">
<li class="list-group-item"> <li class="border-0 list-group-item">
<a class="" href="#">Folder 3</a> <a class="" href="#">Folder 2-1</a>
</li> </li>
<li class="list-group-item"> <li class="border-0 list-group-item">
<a class="" href="#">Folder 4</a> <a class="" href="#">Folder 2-2</a>
</li> </li>
<li class="list-group-item"> <li class="border-0 list-group-item">
<a class="" href="#">Folder 5</a> <a class="" href="#">Folder 2-3</a>
</li>--> </li>
</ul> </ul>
</nav> </li>
<li class="list-group-item">
<a class="" href="#">Folder 3</a>
</li>
<li class="list-group-item">
<a class="" href="#">Folder 4</a>
</li>
<li class="list-group-item">
<a class="" href="#">Folder 5</a>
</li>-->
</ul>
</nav>
</div>
<div class="col-sm-9"> <div class="col-sm-9">
<div class="d-flex justify-content-between mb-2"> <div class="d-flex justify-content-between mb-2">
<form action="#" class="form-inline mr-2" method="GET"> <form action="#" class="form-inline mr-2" method="GET">
@ -176,7 +202,7 @@
<td> <td>
<c:choose> <c:choose>
<c:when test="#{row.folder}"> <c:when test="#{row.folder}">
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/document-folders/#{row.folderPath}">#{row.name}</a> <a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documentfolders/#{row.folderPath}">#{row.name}</a>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<a href="#">#{row.name}</a> <a href="#">#{row.name}</a>

View File

@ -24,7 +24,7 @@ contentsections.edit_dialog.close=Cancel
contentsections.edit_dialog.name.label=Name contentsections.edit_dialog.name.label=Name
contentsections.edit_dialog.save=Rename content section contentsections.edit_dialog.save=Rename content section
contentsections.edit_dialog.name.help=The name of the content section. Can only contain the letters a to z, the numbers 0-9, the hyphen and the underscore. contentsections.edit_dialog.name.help=The name of the content section. Can only contain the letters a to z, the numbers 0-9, the hyphen and the underscore.
contentsection.documentfolder.title=Documents contentsection.documentfolders.title=Documents
contentsection.documentfolder.heading=Content Section {0} Documents Folder contentsection.documentfolder.heading=Content Section {0} Documents Folder
contentsection.documentfolder.headers.name.label=Name contentsection.documentfolder.headers.name.label=Name
contentsection.documentfolder.headers.languages.label=Languages contentsection.documentfolder.headers.languages.label=Languages
@ -51,3 +51,8 @@ contentsection.documentfolder.filter.label=Filter documents
contentsection.documentfolder.filter.submit=Apply filter contentsection.documentfolder.filter.submit=Apply filter
contentsections.documentfolder.not_found=Not folder with path {1} found in content section {0}. contentsections.documentfolder.not_found=Not folder with path {1} found in content section {0}.
contentsection.not_found.title=Content Section not found contentsection.not_found.title=Content Section not found
contentsection.documentfolders.searchbox.label=Search in document folders
contentsection.documentfolders.searchbox.submit=Search
contentsection.assetsfolders.title=Media & Data
contentsection.categories.title=Categories & Page Trees
contentsection.categories.configuration=Configuration

View File

@ -24,7 +24,7 @@ contentsections.edit_dialog.close=Abbrechen
contentsections.edit_dialog.name.label=Name contentsections.edit_dialog.name.label=Name
contentsections.edit_dialog.save=Content Section umbenennen contentsections.edit_dialog.save=Content Section umbenennen
contentsections.edit_dialog.name.help=Der Name der Content Section. Darf nur die Zeichen a bis z, 0-9, the Bindestrich und den Unterstrich enthalten. contentsections.edit_dialog.name.help=Der Name der Content Section. Darf nur die Zeichen a bis z, 0-9, the Bindestrich und den Unterstrich enthalten.
contentsection.documentfolder.title=Dokumente contentsection.documentfolders.title=Dokumente
contentsection.documentfolder.heading=Content Section {0} Dokumenten-Ordner contentsection.documentfolder.heading=Content Section {0} Dokumenten-Ordner
contentsection.documentfolder.headers.name.label=Name contentsection.documentfolder.headers.name.label=Name
contentsection.documentfolder.headers.languages.label=Sprachen contentsection.documentfolder.headers.languages.label=Sprachen
@ -51,3 +51,8 @@ contentsection.documentfolder.filter.label=Dokumente filtern
contentsection.documentfolder.filter.submit=Filter anwenden contentsection.documentfolder.filter.submit=Filter anwenden
contentsections.documentfolder.not_found=Es wurde kein Ordner mit dem Pfad {1} in der Content Section {0} gefunden. contentsections.documentfolder.not_found=Es wurde kein Ordner mit dem Pfad {1} in der Content Section {0} gefunden.
contentsection.not_found.title=Content Section nicht gefunden contentsection.not_found.title=Content Section nicht gefunden
contentsection.documentfolders.searchbox.label=In Dokument-Ordnern suchen
contentsection.documentfolders.searchbox.submit=Suchen
contentsection.assetsfolders.title=Media & Data
contentsection.categories.title=Kategorien & Seitenb\u00e4ume
contentsection.categories.configuration=Konfiguration