UI for Sites Management
parent
eff0073437
commit
82974ede3a
|
|
@ -44,6 +44,10 @@ import javax.persistence.Table;
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "SITES", schema = DB_SCHEMA)
|
@Table(name = "SITES", schema = DB_SCHEMA)
|
||||||
@NamedQueries({
|
@NamedQueries({
|
||||||
|
@NamedQuery(
|
||||||
|
name = "Site.findByUuid",
|
||||||
|
query = "SELECT s FROM Site s WHERE s.uuid = :uuid"
|
||||||
|
),
|
||||||
@NamedQuery(
|
@NamedQuery(
|
||||||
name = "Site.findByDomain",
|
name = "Site.findByDomain",
|
||||||
query = "SELECT s FROM Site s "
|
query = "SELECT s FROM Site s "
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class SiteAwareApplication extends CcmApplication {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 3;
|
int hash = super.hashCode();
|
||||||
if (site != null) {
|
if (site != null) {
|
||||||
hash = 59 * hash + Objects.hashCode(site.getDomainOfSite());
|
hash = 59 * hash + Objects.hashCode(site.getDomainOfSite());
|
||||||
hash = 59 * hash + Objects.hashCode(site.isDefaultSite());
|
hash = 59 * hash + Objects.hashCode(site.isDefaultSite());
|
||||||
|
|
@ -84,6 +84,9 @@ public class SiteAwareApplication extends CcmApplication {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!super.equals(obj)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!(obj instanceof SiteAwareApplication)) {
|
if (!(obj instanceof SiteAwareApplication)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,28 @@ public class SiteRepository extends AbstractEntityRepository<Long, Site> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 3120528987720524155L;
|
private static final long serialVersionUID = 3120528987720524155L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a {@link Site} by its UUID.
|
||||||
|
*
|
||||||
|
* @param uuid The UUID of the site.
|
||||||
|
*
|
||||||
|
* @return An {@link Optional} containing the {@link Site} if a site for the
|
||||||
|
* provided UUID exists.
|
||||||
|
*/
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public Optional<Site> findByUuid(final String uuid) {
|
||||||
|
try {
|
||||||
|
return Optional.of(
|
||||||
|
getEntityManager()
|
||||||
|
.createNamedQuery("Site.findByUuid", Site.class)
|
||||||
|
.setParameter("uuid", uuid)
|
||||||
|
.getSingleResult()
|
||||||
|
);
|
||||||
|
} catch (NoResultException ex) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the {@link Site} for a specific domain.
|
* Retrieve the {@link Site} for a specific domain.
|
||||||
*
|
*
|
||||||
|
|
@ -127,7 +149,7 @@ public class SiteRepository extends AbstractEntityRepository<Long, Site> {
|
||||||
public String getIdAttributeName() {
|
public String getIdAttributeName() {
|
||||||
return "objectId";
|
return "objectId";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getIdOfEntity(final Site entity) {
|
public Long getIdOfEntity(final Site entity) {
|
||||||
return entity.getObjectId();
|
return entity.getObjectId();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,121 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.ui.admin.sites;
|
||||||
|
|
||||||
|
import org.libreccm.sites.Site;
|
||||||
|
import org.libreccm.theming.ThemeInfo;
|
||||||
|
import org.libreccm.ui.Message;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Named("SiteDetailsModel")
|
||||||
|
public class SiteDetailsModel {
|
||||||
|
|
||||||
|
private long siteId;
|
||||||
|
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
private String identifier;
|
||||||
|
|
||||||
|
private String domain;
|
||||||
|
|
||||||
|
private boolean defaultSite;
|
||||||
|
|
||||||
|
private String defaultTheme;
|
||||||
|
|
||||||
|
private Map<String, String> availableThemes;
|
||||||
|
|
||||||
|
private List<Message> messages;
|
||||||
|
|
||||||
|
public long getSiteId() {
|
||||||
|
return siteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUuid() {
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdentifier() {
|
||||||
|
return identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNew() {
|
||||||
|
return siteId == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDomain() {
|
||||||
|
return domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDefaultSite() {
|
||||||
|
return defaultSite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefaultTheme() {
|
||||||
|
return defaultTheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getAvailableThemes() {
|
||||||
|
return Collections.unmodifiableMap(availableThemes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Message> getMessages() {
|
||||||
|
return Collections.unmodifiableList(messages);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addMessage(final Message message) {
|
||||||
|
messages.add(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setSite(final Site site) {
|
||||||
|
Objects.requireNonNull(site);
|
||||||
|
|
||||||
|
siteId = site.getObjectId();
|
||||||
|
uuid = site.getUuid();
|
||||||
|
identifier = String.format("ID-%d", siteId);
|
||||||
|
domain = site.getDomainOfSite();
|
||||||
|
defaultSite = site.isDefaultSite();
|
||||||
|
defaultTheme = site.getDefaultTheme();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setAvailableThemes(final List<ThemeInfo> availableThemes) {
|
||||||
|
this.availableThemes = availableThemes
|
||||||
|
.stream()
|
||||||
|
.collect(
|
||||||
|
Collectors.toMap(
|
||||||
|
themeInfo -> themeInfo.getName(),
|
||||||
|
themeInfo -> themeInfo.getName()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,160 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.ui.admin.sites;
|
||||||
|
|
||||||
|
import org.libreccm.api.Identifier;
|
||||||
|
import org.libreccm.api.IdentifierParser;
|
||||||
|
import org.libreccm.core.CoreConstants;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
import org.libreccm.sites.Site;
|
||||||
|
import org.libreccm.sites.SiteRepository;
|
||||||
|
import org.libreccm.ui.Message;
|
||||||
|
import org.libreccm.ui.MessageType;
|
||||||
|
import org.libreccm.ui.admin.AdminMessages;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.mvc.Controller;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.FormParam;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Controller
|
||||||
|
@Path("/sites")
|
||||||
|
public class SiteFormController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AdminMessages adminMessages;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SiteDetailsModel siteDetailsModel;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SiteRepository siteRepository;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private IdentifierParser identifierParser;
|
||||||
|
|
||||||
|
@FormParam("domain")
|
||||||
|
private String domainOfSite;
|
||||||
|
|
||||||
|
@FormParam("defaultSite")
|
||||||
|
private String defaultSite;
|
||||||
|
|
||||||
|
@FormParam("defaultTheme")
|
||||||
|
private String defaultTheme;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/new")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String createSite() {
|
||||||
|
final Site site = new Site();
|
||||||
|
site.setDomainOfSite(domainOfSite);
|
||||||
|
if (defaultSite != null) {
|
||||||
|
resetDefaultSite();
|
||||||
|
site.setDefaultSite(true);
|
||||||
|
}
|
||||||
|
site.setDefaultTheme(defaultTheme);
|
||||||
|
|
||||||
|
siteRepository.save(site);
|
||||||
|
|
||||||
|
return "redirect:sites";
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/{siteIdentifier}/edit")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String updateSite(
|
||||||
|
@PathParam("siteIdentifier") final String siteIdentifierParam
|
||||||
|
) {
|
||||||
|
final Identifier siteIdentifier = identifierParser.parseIdentifier(
|
||||||
|
siteIdentifierParam
|
||||||
|
);
|
||||||
|
|
||||||
|
final Optional<Site> result;
|
||||||
|
switch (siteIdentifier.getType()) {
|
||||||
|
case ID:
|
||||||
|
result = siteRepository.findById(
|
||||||
|
Long.parseLong(siteIdentifier.getIdentifier())
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = siteRepository.findByUuid(
|
||||||
|
siteIdentifier.getIdentifier()
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.isPresent()) {
|
||||||
|
final Site site = result.get();
|
||||||
|
|
||||||
|
site.setDomainOfSite(domainOfSite);
|
||||||
|
site.setDefaultTheme(defaultTheme);
|
||||||
|
|
||||||
|
final boolean isDefaultSite = defaultSite != null;
|
||||||
|
if (isDefaultSite != site.isDefaultSite()) {
|
||||||
|
resetDefaultSite();
|
||||||
|
site.setDefaultSite(isDefaultSite);
|
||||||
|
}
|
||||||
|
siteRepository.save(site);
|
||||||
|
|
||||||
|
return String.format(
|
||||||
|
"redirect:sites/ID-%d/details", site.getObjectId()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
siteDetailsModel.addMessage(
|
||||||
|
new Message(
|
||||||
|
adminMessages.getMessage(
|
||||||
|
"sites.not_found_message",
|
||||||
|
Arrays.asList(siteIdentifierParam)
|
||||||
|
),
|
||||||
|
MessageType.WARNING
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return "org/libreccm/ui/admin/sites/site-not-found.xhtml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resetDefaultSite() {
|
||||||
|
final Optional<Site> result = siteRepository
|
||||||
|
.findDefaultSite();
|
||||||
|
if (result.isPresent()) {
|
||||||
|
final Site site = result.get();
|
||||||
|
site.setDefaultSite(false);
|
||||||
|
siteRepository.save(site);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.ui.admin.sites;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
public class SiteTableRow {
|
||||||
|
|
||||||
|
private long siteId;
|
||||||
|
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
private String domain;
|
||||||
|
|
||||||
|
private boolean defaultSite;
|
||||||
|
|
||||||
|
private String defaultTheme;
|
||||||
|
|
||||||
|
public long getSiteId() {
|
||||||
|
return siteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setSiteId(final long siteId) {
|
||||||
|
this.siteId = siteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUuid() {
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setUuid(final String uuid) {
|
||||||
|
this.uuid = uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdentifier() {
|
||||||
|
return String.format("ID-%d", siteId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDomain() {
|
||||||
|
return domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setDomain(final String domain) {
|
||||||
|
this.domain = domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDefaultSite() {
|
||||||
|
return defaultSite;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setDefaultSite(final boolean defaultSite) {
|
||||||
|
this.defaultSite = defaultSite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefaultTheme() {
|
||||||
|
return defaultTheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setDefaultTheme(final String defaultTheme) {
|
||||||
|
this.defaultTheme = defaultTheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -18,14 +18,33 @@
|
||||||
*/
|
*/
|
||||||
package org.libreccm.ui.admin.sites;
|
package org.libreccm.ui.admin.sites;
|
||||||
|
|
||||||
|
import org.libreccm.api.Identifier;
|
||||||
|
import org.libreccm.api.IdentifierParser;
|
||||||
import org.libreccm.core.CoreConstants;
|
import org.libreccm.core.CoreConstants;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.libreccm.security.RequiresPrivilege;
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
import org.libreccm.sites.Site;
|
||||||
|
import org.libreccm.sites.SiteRepository;
|
||||||
|
import org.libreccm.theming.Themes;
|
||||||
|
import org.libreccm.ui.Message;
|
||||||
|
import org.libreccm.ui.MessageType;
|
||||||
|
import org.libreccm.ui.admin.AdminMessages;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
import javax.mvc.Controller;
|
import javax.mvc.Controller;
|
||||||
|
import javax.mvc.Models;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.FormParam;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -35,12 +54,190 @@ import javax.ws.rs.Path;
|
||||||
@Controller
|
@Controller
|
||||||
@Path("/sites")
|
@Path("/sites")
|
||||||
public class SitesController {
|
public class SitesController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AdminMessages adminMessages;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private IdentifierParser identifierParser;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Models models;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SiteDetailsModel siteDetailsModel;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SiteRepository siteRepository;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Themes themes;
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String getSites() {
|
public String getSites() {
|
||||||
return "org/libreccm/ui/admin/sites.xhtml";
|
final List<Site> sites = siteRepository.findAll();
|
||||||
|
models.put(
|
||||||
|
"sites",
|
||||||
|
sites
|
||||||
|
.stream()
|
||||||
|
.map(this::buildSiteTableRow)
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
);
|
||||||
|
|
||||||
|
return "org/libreccm/ui/admin/sites/sites.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/{siteIdentifier}/details")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String getSite(
|
||||||
|
@PathParam("siteIdentifier") final String siteIdentifierParam
|
||||||
|
) {
|
||||||
|
final Identifier siteIdentifier = identifierParser.parseIdentifier(
|
||||||
|
siteIdentifierParam
|
||||||
|
);
|
||||||
|
|
||||||
|
final Optional<Site> result;
|
||||||
|
switch (siteIdentifier.getType()) {
|
||||||
|
case ID:
|
||||||
|
result = siteRepository.findById(
|
||||||
|
Long.parseLong(siteIdentifier.getIdentifier())
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = siteRepository.findByUuid(
|
||||||
|
siteIdentifier.getIdentifier()
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.isPresent()) {
|
||||||
|
siteDetailsModel.setSite(result.get());
|
||||||
|
siteDetailsModel.setAvailableThemes(themes.getAvailableThemes());
|
||||||
|
|
||||||
|
return "org/libreccm/ui/admin/sites/site-details.xhtml";
|
||||||
|
} else {
|
||||||
|
siteDetailsModel.addMessage(
|
||||||
|
new Message(
|
||||||
|
adminMessages.getMessage(
|
||||||
|
"sites.not_found_message",
|
||||||
|
Arrays.asList(siteIdentifierParam)
|
||||||
|
),
|
||||||
|
MessageType.WARNING
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return "org/libreccm/ui/admin/sites/site-not-found.xhtml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/new")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String createNewSite() {
|
||||||
|
siteDetailsModel.setAvailableThemes(themes.getAvailableThemes());
|
||||||
|
return "org/libreccm/ui/admin/sites/site-form.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/{siteIdentifier}/edit")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String editSite(
|
||||||
|
@PathParam("siteIdentifier") final String siteIdentifierParam
|
||||||
|
) {
|
||||||
|
final Identifier siteIdentifier = identifierParser.parseIdentifier(
|
||||||
|
siteIdentifierParam
|
||||||
|
);
|
||||||
|
|
||||||
|
final Optional<Site> result;
|
||||||
|
switch (siteIdentifier.getType()) {
|
||||||
|
case ID:
|
||||||
|
result = siteRepository.findById(
|
||||||
|
Long.parseLong(siteIdentifier.getIdentifier())
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = siteRepository.findByUuid(
|
||||||
|
siteIdentifier.getIdentifier()
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.isPresent()) {
|
||||||
|
siteDetailsModel.setSite(result.get());
|
||||||
|
siteDetailsModel.setAvailableThemes(themes.getAvailableThemes());
|
||||||
|
|
||||||
|
return "org/libreccm/ui/admin/sites/site-form.xhtml";
|
||||||
|
} else {
|
||||||
|
siteDetailsModel.addMessage(
|
||||||
|
new Message(
|
||||||
|
adminMessages.getMessage(
|
||||||
|
"sites.not_found_message",
|
||||||
|
Arrays.asList(siteIdentifierParam)
|
||||||
|
),
|
||||||
|
MessageType.WARNING
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return "org/libreccm/ui/admin/sites/site-not-found.xhtml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/{identifier}/delete")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String deleteSite(
|
||||||
|
@PathParam("identifier") final String siteIdentifierParam,
|
||||||
|
@FormParam("confirmed") final String confirmed
|
||||||
|
) {
|
||||||
|
if ("true".equals(confirmed)) {
|
||||||
|
final Identifier siteIdentifier = identifierParser.parseIdentifier(
|
||||||
|
siteIdentifierParam
|
||||||
|
);
|
||||||
|
|
||||||
|
final Optional<Site> result;
|
||||||
|
switch (siteIdentifier.getType()) {
|
||||||
|
case ID:
|
||||||
|
result = siteRepository.findById(
|
||||||
|
Long.parseLong(siteIdentifier.getIdentifier())
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = siteRepository.findByUuid(
|
||||||
|
siteIdentifier.getIdentifier()
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.isPresent()) {
|
||||||
|
siteRepository.delete(result.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "redirect:sites";
|
||||||
|
}
|
||||||
|
|
||||||
|
private SiteTableRow buildSiteTableRow(final Site site) {
|
||||||
|
final SiteTableRow row = new SiteTableRow();
|
||||||
|
row.setSiteId(site.getObjectId());
|
||||||
|
row.setUuid(site.getUuid());
|
||||||
|
row.setDomain(site.getDomainOfSite());
|
||||||
|
row.setDefaultSite(site.isDefaultSite());
|
||||||
|
row.setDefaultTheme(site.getDefaultTheme());
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ public class SitesPage implements AdminPage {
|
||||||
public Set<Class<?>> getControllerClasses() {
|
public Set<Class<?>> getControllerClasses() {
|
||||||
final Set<Class<?>> classes = new HashSet<>();
|
final Set<Class<?>> classes = new HashSet<>();
|
||||||
classes.add(SitesController.class);
|
classes.add(SitesController.class);
|
||||||
|
classes.add(SiteFormController.class);
|
||||||
return classes;
|
return classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<input name="confirmed" type="hidden" value="true" />
|
||||||
<p>
|
<p>
|
||||||
#{cc.attrs.message}
|
#{cc.attrs.message}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
|
|
||||||
|
<ui:composition template="/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="sites" />
|
||||||
|
<ui:param name="title" value="#{AdminMessages['sites.label']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="#{mvc.uri('SitesController#getSites')}">
|
||||||
|
#{AdminMessages['sites.label']}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active">
|
||||||
|
#{SiteDetailsModel.domain}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<h1>#{AdminMessages.getMessage('site.details.title', [SiteDetailsModel.domain])}</h1>
|
||||||
|
<libreccm:messages messages="#{CategoryDetailsModel.messages}" />
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<div>
|
||||||
|
<dt>#{AdminMessages['sites.details.domain']}</dt>
|
||||||
|
<dd>#{SiteDetailsModel.domain}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{AdminMessages['sites.details.defaultSite']}</dt>
|
||||||
|
<dd>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{SiteDetailsModel.defaultSite}">
|
||||||
|
#{AdminMessages['sites.details.defaultSite.yes']}
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
#{AdminMessages['sites.details.defaultSite.no']}
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{AdminMessages['sites.details.defaultTheme']}</dt>
|
||||||
|
<dd>#{SiteDetailsModel.defaultTheme}</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="#{mvc.uri('SitesController#editSite', {'siteIdentifier': SiteDetailsModel.identifier } )}">
|
||||||
|
<bootstrap:svgIcon icon="pen" />
|
||||||
|
<span>#{AdminMessages['site.details.edit']}</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
|
<ui:composition template="/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="sites" />
|
||||||
|
<ui:param name="title" value="#{AdminMessages['sites.label']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="#{mvc.uri('SitesController#getSites')}">
|
||||||
|
#{AdminMessages['sites.label']}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{SiteDetailsModel.new}">
|
||||||
|
<li class="breadcrumb-item active">
|
||||||
|
#{AdminMessages['sites.breadcrumbs.create']}
|
||||||
|
</li>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="#{mvc.uri('SitesController#getSite', {'siteIdentifier': SiteDetailsModel.identifier })}">
|
||||||
|
#{SiteDetailsModel.domain}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active">
|
||||||
|
#{AdminMessages['sites.breadcrumbs.edit']}
|
||||||
|
</li>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<h1>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{SiteDetailsModel.new}">
|
||||||
|
#{AdminMessages['sites.create.label']}
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
#{AdminMessages.getMessage('sites.edit.label', [SiteDetailsModel.domain])}
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<form action="#{SiteDetailsModel.new ? mvc.uri('SiteFormController#createSite') : mvc.uri('SiteFormController#updateSite', {'siteIdentifier': SiteDetailsModel.identifier })}"
|
||||||
|
method="post">
|
||||||
|
<bootstrap:formGroupText help="#{AdminMessages['sites.form.domain.help']}"
|
||||||
|
inputId="domain"
|
||||||
|
label="#{AdminMessages['sites.form.domain.label']}"
|
||||||
|
name="domain"
|
||||||
|
required="true"
|
||||||
|
value="#{SiteDetailsModel.domain}" />
|
||||||
|
<bootstrap:formCheck label="#{AdminMessages['sites.form.defaultsite.label']}"
|
||||||
|
inputId="defaultSite"
|
||||||
|
name="defaultSite"
|
||||||
|
required="false"
|
||||||
|
value="#{SiteDetailsModel.defaultSite}" />
|
||||||
|
<bootstrap:formGroupSelect help="#{AdminMessages['sites.form.defaulttheme.help']}"
|
||||||
|
inputId="defaultTheme"
|
||||||
|
label="#{AdminMessages['sites.form.defaulttheme.label']}"
|
||||||
|
name="defaultTheme"
|
||||||
|
options="#{SiteDetailsModel.availableThemes}" />
|
||||||
|
<a class="btn btn-warning"
|
||||||
|
href="#{SiteDetailsModel.new ? mvc.uri('SitesController#getSites') : mvc.uri('SitesController#getSite', { 'siteIdentifier': SiteDetailsModel.identifier })}">
|
||||||
|
#{AdminMessages['sites.form.buttons.cancel']}
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-success" type="submit">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{SiteDetailsModel.new}">
|
||||||
|
#{AdminMessages['sites.form.buttons.create']}
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
#{AdminMessages['sites.form.buttons.save']}
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
|
<ui:composition template="/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="categories" />
|
||||||
|
<ui:param name="title" value="#{AdminMessages['categorymanager.label']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<li class="breadcrumb-item active">
|
||||||
|
#{AdminMessages['categorymanager.label']}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<h1>#{AdminMessages['site.not_found.title']}</h1>
|
||||||
|
<c:forEach items="#{SiteDetailsModel.messages}" var="message">
|
||||||
|
<div class="alert alert-#{message.messageType}" role="alert">
|
||||||
|
#{message}
|
||||||
|
</div>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||||
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
||||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
<ui:composition template="/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml">
|
<ui:composition template="/WEB-INF/views/org/libreccm/ui/admin/ccm-admin.xhtml">
|
||||||
|
|
||||||
|
|
@ -18,7 +20,64 @@
|
||||||
<ui:define name="main">
|
<ui:define name="main">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>#{AdminMessages['sites.label']}</h1>
|
<h1>#{AdminMessages['sites.label']}</h1>
|
||||||
<p>Placeholder</p>
|
|
||||||
|
<div class="mb-2">
|
||||||
|
<div class="text-right">
|
||||||
|
<a class="btn btn-secondary"
|
||||||
|
href="#{mvc.uri('SitesController#createNewSite')}">
|
||||||
|
<bootstrap:svgIcon icon="plus-circle" />
|
||||||
|
<span>#{AdminMessages['sites.add_site']}</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#{AdminMessages['sites.table.heading.domain']}</th>
|
||||||
|
<th>#{AdminMessages['sites.table.heading.defaultSite']}</th>
|
||||||
|
<th>#{AdminMessages['sites.table.heading.defaultTheme']}</th>
|
||||||
|
<th class="text-center" colspan="2">#{AdminMessages['sites.table.heading.actions']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach items="#{sites}" var="site">
|
||||||
|
<tr>
|
||||||
|
<td>#{site.domain}</td>
|
||||||
|
<td>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{site.defaultSite}">
|
||||||
|
#{AdminMessages['sites.table.defaultSite.yes']}
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
#{AdminMessages['sites.table.defaultSite.no']}
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
#{site.defaultTheme}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="btn btn-info"
|
||||||
|
href="#{mvc.uri('SitesController#getSite', {'siteIdentifier': site.identifier })}">
|
||||||
|
<bootstrap:svgIcon icon="pen" />
|
||||||
|
<span>
|
||||||
|
#{AdminMessages['sites.table.edit']}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<libreccm:deleteDialog actionTarget="#{mvc.uri('SitesController#deleteSite', {'identifier': site.identifier })}"
|
||||||
|
buttonText="#{AdminMessages['sites.table.delete']}"
|
||||||
|
cancelLabel="#{AdminMessages['sites.delete_dialog.cancel']}"
|
||||||
|
confirmLabel="#{AdminMessages['sites.delete_dialog.confirm']}"
|
||||||
|
dialogId="delete-site-dialog-#{site.siteId}"
|
||||||
|
dialogTitle="#{AdminMessages['sites.delete_dialog.title']}"
|
||||||
|
message="#{AdminMessages.getMessage('sites.delete_dialog.message', [site.domain])}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</ui:define>
|
</ui:define>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -455,3 +455,38 @@ categories.invalid_direction.message=Invalid direction {0}. Valid direction are:
|
||||||
categories.details.subcategories.table.headings.actions=Actions
|
categories.details.subcategories.table.headings.actions=Actions
|
||||||
categories.details.subcategories.reorder.decrease=Move up
|
categories.details.subcategories.reorder.decrease=Move up
|
||||||
categories.details.subcategories.reorder.increase=Move down
|
categories.details.subcategories.reorder.increase=Move down
|
||||||
|
sites.table.heading.domain=Domain
|
||||||
|
sites.table.heading.defaultSite=Default site?
|
||||||
|
sites.table.heading.defaultTheme=Default Theme
|
||||||
|
sites.table.heading.actions=Actions
|
||||||
|
sites.table.defaultSite.yes=Yes
|
||||||
|
sites.table.defaultSite.no=No
|
||||||
|
sites.table.edit=Edit
|
||||||
|
sites.table.delete=Delete
|
||||||
|
sites.delete_dialog.cancel=Cancel
|
||||||
|
sites.delete_dialog.confirm=Delete site
|
||||||
|
sites.delete_dialog.title=Confirm to delete site
|
||||||
|
sites.delete_dialog.message=Are you sure to delete the site for the domain {0}?
|
||||||
|
sites.add_site=Add Site
|
||||||
|
site.not_found.title=Site not found
|
||||||
|
sites.not_found_message=No site for identifier {0} gefunden.
|
||||||
|
site.details.title=Site {0}
|
||||||
|
sites.details.domain=Domain
|
||||||
|
sites.details.defaultSite=Default Site?
|
||||||
|
sites.details.defaultSite.yes=Yes
|
||||||
|
sites.details.defaultSite.no=No
|
||||||
|
sites.details.defaultTheme=Default Theme
|
||||||
|
site.details.edit=Edit
|
||||||
|
sites.site.edit.label=Edit
|
||||||
|
sites.breadcrumbs.create=Create new site
|
||||||
|
sites.breadcrumbs.edit=Edit
|
||||||
|
sites.create.label=Create new Site
|
||||||
|
sites.edit.label=Edit Site {0}
|
||||||
|
sites.form.domain.help=The domain of the site
|
||||||
|
sites.form.domain.label=Domain
|
||||||
|
sites.form.defaultsite.label=Is default site?
|
||||||
|
sites.form.defaulttheme.help=Default theme of the site
|
||||||
|
sites.form.defaulttheme.label=Default Theme
|
||||||
|
sites.form.buttons.cancel=Cancel
|
||||||
|
sites.form.buttons.create=Create Site
|
||||||
|
sites.form.buttons.save=Save
|
||||||
|
|
|
||||||
|
|
@ -455,3 +455,38 @@ categories.invalid_direction.message=Ung\u00fcltiger Wert {0} f\u00fcr Parameter
|
||||||
categories.details.subcategories.table.headings.actions=Aktionen
|
categories.details.subcategories.table.headings.actions=Aktionen
|
||||||
categories.details.subcategories.reorder.decrease=Hoch
|
categories.details.subcategories.reorder.decrease=Hoch
|
||||||
categories.details.subcategories.reorder.increase=Runter
|
categories.details.subcategories.reorder.increase=Runter
|
||||||
|
sites.table.heading.domain=Domain
|
||||||
|
sites.table.heading.defaultSite=Default site?
|
||||||
|
sites.table.heading.defaultTheme=Standard Theme
|
||||||
|
sites.table.heading.actions=Aktionen
|
||||||
|
sites.table.defaultSite.yes=Ja
|
||||||
|
sites.table.defaultSite.no=Nein
|
||||||
|
sites.table.edit=Bearbeiten
|
||||||
|
sites.table.delete=L\u00f6schen
|
||||||
|
sites.delete_dialog.cancel=Abbrechen
|
||||||
|
sites.delete_dialog.confirm=Site l\u00f6schen
|
||||||
|
sites.delete_dialog.title=L\u00f6schen der Site best\u00e4tigen
|
||||||
|
sites.delete_dialog.message=Sind Sie sicher, dass Sie die Site f\u00fcr die Domain {0} l\u00f6schen wollen?
|
||||||
|
sites.add_site=Site hinzuf\u00fcgen
|
||||||
|
site.not_found.title=Site nicht verf\u00fcgbar
|
||||||
|
sites.not_found_message=Keine Site mit Identifier {0} gefunden.
|
||||||
|
site.details.title=Site {0}
|
||||||
|
sites.details.domain=Domain
|
||||||
|
sites.details.defaultSite=Standard Seite?
|
||||||
|
sites.details.defaultSite.yes=Ja
|
||||||
|
sites.details.defaultSite.no=Nein
|
||||||
|
sites.details.defaultTheme=Standard Theme
|
||||||
|
site.details.edit=Bearbeiten
|
||||||
|
sites.site.edit.label=Bearbeiten
|
||||||
|
sites.breadcrumbs.create=Neue Site anlegen
|
||||||
|
sites.breadcrumbs.edit=Bearbeiten
|
||||||
|
sites.create.label=Neue Site anlegen
|
||||||
|
sites.edit.label=Site {0} bearbeiten
|
||||||
|
sites.form.domain.help=Die Domain der Seite
|
||||||
|
sites.form.domain.label=Domain
|
||||||
|
sites.form.defaultsite.label=Ist Standard-Seite?
|
||||||
|
sites.form.defaulttheme.help=Das Standard-Theme der Seite
|
||||||
|
sites.form.defaulttheme.label=Standard Theme
|
||||||
|
sites.form.buttons.cancel=Abbrechen
|
||||||
|
sites.form.buttons.create=Site anlegen
|
||||||
|
sites.form.buttons.save=Speichern
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue