Edit page tree properties.
parent
6820077da3
commit
6f2f0684b5
|
|
@ -152,7 +152,7 @@ public class PagesController {
|
|||
final Site site = siteResult.get();
|
||||
final Domain domain = domainResult.get();
|
||||
final String primaryUrl = primaryUrlParam;
|
||||
|
||||
|
||||
if (pagesRepo.findPagesForSite(primaryUrl).isPresent()) {
|
||||
models.put("pagesInstanceAlreadyExisting", true);
|
||||
return PAGES_LIST_TEMPLATE;
|
||||
|
|
@ -192,7 +192,6 @@ public class PagesController {
|
|||
return "org/librecms/ui/cms/pages-details.xhtml";
|
||||
}
|
||||
|
||||
//ToDo: Show details for Pages instance
|
||||
@POST
|
||||
@Path("/{pagesInstance}/@edit")
|
||||
@AuthorizationRequired
|
||||
|
|
@ -216,9 +215,7 @@ public class PagesController {
|
|||
pages.setPrimaryUrl(primaryUrlParam);
|
||||
pagesRepo.save(pages);
|
||||
|
||||
return String.format(
|
||||
"/pages/%s", pagesInstance
|
||||
);
|
||||
return String.format("redirect:/pages/%s", pagesInstance);
|
||||
}
|
||||
|
||||
@POST
|
||||
|
|
|
|||
|
|
@ -11,12 +11,75 @@
|
|||
<li class="breadcrumb-item">
|
||||
#{CmsAdminMessages['contentsections.pages.label']}
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
Details Page Tree for Site #{CmsPagesDetailsModel.site}
|
||||
</li>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="main">
|
||||
<div class="container">
|
||||
<h1>#{CmsAdminMessages['pages.details.heading']}</h1>
|
||||
|
||||
<button class="btn btn-secondary btn-sm"
|
||||
data-target="#edit-pages-dialog"
|
||||
data-toggle="modal">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{pages.details.edit}</span>
|
||||
</button>
|
||||
<div aria-hidden="true"
|
||||
aria-labbelledby="edit-pages-dialog-title"
|
||||
class="modal fade"
|
||||
id="edit-pages-dialog"
|
||||
tab-index="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/pages/ID-#{CmsPagesDetailsModel.pagesId}/@edit"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title"
|
||||
id="edit-pages-dialog-title">
|
||||
#{CmsAdminMessages.getMessage('pages.details.edit.dialog.title', [CmsPagesDetailsModel.site])}
|
||||
<button aria-label="#{CmsAdminMessages['pages.details.edit.dialog.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="primary-url">
|
||||
#{CmsAdminMessages['pages.new_instance_dialog.primary_url.label']}
|
||||
</label>
|
||||
<input aria-describedby="primary-url-help"
|
||||
class="form-control"
|
||||
id="primary-url"
|
||||
name="primaryUrl"
|
||||
pattern="^([a-z0-9-_]*)$"
|
||||
required="true"
|
||||
type="text"
|
||||
value="#{CmsPagesDetailsModel.primaryUrl}"/>
|
||||
<small class="form-text muted"
|
||||
id="primary-url-help">
|
||||
#{CmsAdminMessages['pages.new_instance_dialog.primary_url.help']}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-danger"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsAdminMessages['pages.details.edit.dialog.close']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsAdminMessages['pages.details.edit.dialog.submit']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt>#{CmsAdminMessages['pages.details.site']}</dt>
|
||||
<dd>#{CmsPagesDetailsModel.site}</dd>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||
<ui:composition>
|
||||
<li>
|
||||
<li class="pt-3">
|
||||
<c:choose>
|
||||
<c:when test="#{root}">
|
||||
<span>/ (Root)</span>
|
||||
|
|
|
|||
|
|
@ -958,3 +958,6 @@ pages.page.details=Details
|
|||
pages.page.edit=Edit
|
||||
pages.page.remove=Remove
|
||||
pages.page.add=Add
|
||||
pages.details.edit.dialog.title=Edit details of Page Tree for Site {0}
|
||||
pages.details.edit.dialog.close=Cancel
|
||||
pages.details.edit.dialog.submit=Save
|
||||
|
|
|
|||
|
|
@ -959,3 +959,6 @@ pages.page.details=Details
|
|||
pages.page.edit=Bearbeiten
|
||||
pages.page.remove=Entfernen
|
||||
pages.page.add=Hinzuf\u00fcgen
|
||||
pages.details.edit.dialog.title=Details des Seitenbaumes f\u00fcr Site {0} bearbeiten
|
||||
pages.details.edit.dialog.close=Abbrechen
|
||||
pages.details.edit.dialog.submit=Speichern
|
||||
|
|
|
|||
Loading…
Reference in New Issue