parent
d44ad3c5d0
commit
cb9a1f049d
|
|
@ -38,6 +38,7 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.mvc.Controller;
|
import javax.mvc.Controller;
|
||||||
import javax.mvc.Models;
|
import javax.mvc.Models;
|
||||||
|
import javax.mvc.MvcContext;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
import javax.ws.rs.FormParam;
|
import javax.ws.rs.FormParam;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
<!DOCTYPE html [<!ENTITY times '×'>]>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||||
|
xmlns:cc="http://xmlns.jcp.org/jsf/composite"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
|
||||||
|
<cc:interface shortDescription="Component for showing messages (org.libreccm.ui.Message).">
|
||||||
|
<cc:attribute name="actionTarget"
|
||||||
|
required="true"
|
||||||
|
shortDescription="URL to which the form is send." />
|
||||||
|
<cc:attribute name="buttonClass"
|
||||||
|
default="btn-secondary"
|
||||||
|
required="false"
|
||||||
|
shortDescription="Bootstrap button context class to use for the button toggleing the modal form, eg. button-info."
|
||||||
|
type="String" />
|
||||||
|
<cc:attribute name="buttonIcon"
|
||||||
|
default=""
|
||||||
|
required="false"
|
||||||
|
shortDescription="Name of the icon to use in the button. If empty no icon will be used."
|
||||||
|
type="String" />
|
||||||
|
<cc:attribute name="buttonText"
|
||||||
|
required="true"
|
||||||
|
shortDescription="Text for the button toggleing the modal form."
|
||||||
|
type="String" />
|
||||||
|
<cc:attribute name="buttonTextClass"
|
||||||
|
default=""
|
||||||
|
required="false"
|
||||||
|
shortDescription="Class used for aligning the button. Either text-left, text-center or text-right."
|
||||||
|
type="String" />
|
||||||
|
<cc:attribute name="dialogId"
|
||||||
|
required="true"
|
||||||
|
shortDescription="ID for the dialog."
|
||||||
|
type="String" />
|
||||||
|
<cc:attribute name="method"
|
||||||
|
default="post"
|
||||||
|
required="false"
|
||||||
|
shortDescription="Method used to send to form. Defaults to POST."
|
||||||
|
type="String" />
|
||||||
|
<cc:facet name="body" required="true" />
|
||||||
|
<cc:facet name="footer" required="true"/>
|
||||||
|
<cc:facet name="title" required="true" />
|
||||||
|
</cc:interface>
|
||||||
|
<cc:implementation>
|
||||||
|
<div class="#{cc.attrs.buttonTextClass}">
|
||||||
|
<button aria-labelledby="#{cc.attrs.dialogId}-title"
|
||||||
|
class="btn #{cc.attrs.buttonClass}"
|
||||||
|
data-target="##{cc.attrs.dialogId}"
|
||||||
|
data-toggle="modal"
|
||||||
|
type="button">
|
||||||
|
<c:if test="#{!cc.attrs.buttonIcon.isEmpty()}">
|
||||||
|
<bootstrap:svgIcon icon="#{cc.attrs.buttonIcon}" />
|
||||||
|
</c:if>
|
||||||
|
<span>#{cc.attrs.buttonText}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade"
|
||||||
|
data-backdrop="static"
|
||||||
|
id="#{cc.attrs.dialogId}"
|
||||||
|
tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<form action="#{cc.attrs.actionTarget}"
|
||||||
|
class="modal-content"
|
||||||
|
method="#{cc.attrs.method}">
|
||||||
|
<div class="modal-header">
|
||||||
|
<div class="modal-title"
|
||||||
|
id="#{cc.attrs.dialogId}-title">
|
||||||
|
<cc:renderFacet name="title" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<cc:renderFacet name="body" />
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<cc:renderFacet name="footer" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</cc:implementation>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html [<!ENTITY times '×'>]>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:cc="http://xmlns.jcp.org/jsf/composite"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
|
||||||
|
<cc:interface shortDescription="Component for showing messages (org.libreccm.ui.Message).">
|
||||||
|
<cc:attribute name="messages"
|
||||||
|
required="true"
|
||||||
|
shortDescription="The messages to show"
|
||||||
|
type="java.util.Collection" />
|
||||||
|
</cc:interface>
|
||||||
|
<cc:implementation>
|
||||||
|
<div>
|
||||||
|
<c:forEach items="#{cc.attrs.message}" var="message">
|
||||||
|
<div class="alert alert-#{message.messageTypeClass}"
|
||||||
|
role="alert">
|
||||||
|
#{message.message}
|
||||||
|
</div>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</cc:implementation>
|
||||||
|
</html>
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
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: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"
|
||||||
|
xmlns:f="http://xmlns.jcp.org/jsf/core">
|
||||||
<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">
|
||||||
|
|
||||||
<ui:param name="activePage" value="categories" />
|
<ui:param name="activePage" value="categories" />
|
||||||
|
|
@ -25,6 +26,8 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>#{AdminMessages.getMessage('categorysystems.details.title', [CategorySystemDetailsModel.domainKey])}</h1>
|
<h1>#{AdminMessages.getMessage('categorysystems.details.title', [CategorySystemDetailsModel.domainKey])}</h1>
|
||||||
|
|
||||||
|
<libreccm:messages messages="#{CategorySystemDetailsModel.messages}" />
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<div>
|
<div>
|
||||||
<dt>
|
<dt>
|
||||||
|
|
@ -154,35 +157,15 @@
|
||||||
#{AdminMessages['categorysystems.details.owners.heading']}
|
#{AdminMessages['categorysystems.details.owners.heading']}
|
||||||
</h2>
|
</h2>
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<div class="text-right">
|
<bootstrap:modalForm actionTarget="#{mvc.uri('CategorySystemsController#addOwner', {'categorySystemIdentifier': CategorySystemDetailsModel.identifier })}"
|
||||||
<button class="btn btn-secondary"
|
buttonIcon="plus-circle"
|
||||||
data-target="#categorysystem-owner-add"
|
buttonText="#{AdminMessages['categorysystems.details.owners.add']}"
|
||||||
data-toggle="modal"
|
buttonTextClass="text-right"
|
||||||
type="button">
|
dialogId="categorysystem-owner-add">
|
||||||
<bootstrap:svgIcon icon="plus-circle" />
|
<f:facet name="title">
|
||||||
<span>#{AdminMessages['categorysystems.details.owners.add']}</span>
|
<h3>#{AdminMessages['categorysstems.details.owner.add.dialog.title']}</h3>
|
||||||
</button>
|
</f:facet>
|
||||||
</div>
|
<f:facet name="body">
|
||||||
<div class="modal fade"
|
|
||||||
data-backdrop="static"
|
|
||||||
id="categorysystem-owner-add"
|
|
||||||
tabindex="-1">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<form action="#{mvc.uri('CategorySystemsController#addOwner', {'categorySystemIdentifier': CategorySystemDetailsModel.identifier })}"
|
|
||||||
class="modal-content"
|
|
||||||
method="post">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h3 class="modal-title">
|
|
||||||
#{AdminMessages['categorysstems.details.owner.add.dialog.title']}
|
|
||||||
</h3>
|
|
||||||
<button aria-label="#{AdminMessages['categorysystems.details.owner.add.dialog.close']}"
|
|
||||||
class="close"
|
|
||||||
data-dismiss="modal"
|
|
||||||
type="button">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="categorysystem-owner-add-application">
|
<label for="categorysystem-owner-add-application">
|
||||||
#{AdminMessages['categorysystems.details.owner.add.dialog.application.label']}
|
#{AdminMessages['categorysystems.details.owner.add.dialog.application.label']}
|
||||||
|
|
@ -216,7 +199,8 @@
|
||||||
#{AdminMessages['categorysystems.details.owner.add.dialog.context.help']}
|
#{AdminMessages['categorysystems.details.owner.add.dialog.context.help']}
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
</f:facet>
|
||||||
|
<f:facet name="footer">
|
||||||
<button class="btn btn-secondary"
|
<button class="btn btn-secondary"
|
||||||
data-dismiss="modal"
|
data-dismiss="modal"
|
||||||
type="button" >
|
type="button" >
|
||||||
|
|
@ -225,11 +209,8 @@
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-primary">
|
||||||
#{AdminMessages['categorysystems.details.owner.add.dialog.submit']}
|
#{AdminMessages['categorysystems.details.owner.add.dialog.submit']}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</f:facet>
|
||||||
</div>
|
</bootstrap:modalForm>
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="#{CategorySystemDetailsModel.getOwners().isEmpty()}">
|
<c:when test="#{CategorySystemDetailsModel.getOwners().isEmpty()}">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue