Commit 12a9b3f9 authored by Matija Obreza's avatar Matija Obreza

Introduced <gui:alert type="info,warning,success,danger" /> tag

parent 5aed497e
......@@ -30,41 +30,41 @@
</div>
<c:if test="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="accession.this-is-a-historic-entry" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.inTrust eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.inTrust.true" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.inSvalbard eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.inSvalbard.true" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.mlsStatus eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.mlsStatus.true" />
</div>
</gui:alert>
</c:if>
<%--
<c:if test="${accession.availability eq false}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="accession.not-available-for-distribution" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.availability eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.available-for-distribution" />
</div>
</gui:alert>
</c:if>
--%>
<%--
......
......@@ -8,7 +8,7 @@
</head>
<body>
<c:if test="${not empty emailError}">
<div class="alert alert-danger">${emailError}</div>
<gui:alert type="danger">${emailError}</gui:alert>
</c:if>
<form role="form" class="form-horizontal validate" action="<c:url value="/admin/users/${user.uuid}/update" />" method="post">
<div class="form-group">
......
......@@ -23,9 +23,9 @@
</security:authorize>
<c:if test="${crop eq null}">
<div class="alert alert-error">
<gui:alert type="error">
<spring:message code="data.error.404"/>
</div>
</gui:alert>
</c:if>
<c:if test="${blurp ne null}">
......
......@@ -25,41 +25,41 @@
</div>
<c:if test="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="accession.this-is-a-historic-entry" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.inTrust eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.inTrust.true" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.inSvalbard eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.inSvalbard.true" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.mlsStatus eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.mlsStatus.true" />
</div>
</gui:alert>
</c:if>
<%--
<c:if test="${accession.availability eq false}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="accession.not-available-for-distribution" />
</div>
</gui:alert>
</c:if>
<c:if test="${accession.availability eq true}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="accession.available-for-distribution" />
</div>
</gui:alert>
</c:if>
--%>
<%--
......
......@@ -8,10 +8,10 @@
</head>
<body>
<c:if test="${not empty errorMessage}">
<div class="alert alert-warning">${errorMessage}</div>
<gui:alert type="warning">${errorMessage}</gui:alert>
</c:if>
<c:if test="${not empty successMessage}">
<div class="alert alert-success">${successMessage}</div>
<gui:alert type="success">${successMessage}</gui:alert>
</c:if>
<table class="table table-striped">
......
......@@ -8,7 +8,7 @@
</head>
<body>
<c:if test="${not empty errorMessage}">
<div class="alert alert-warning">${errorMessage}</div>
<gui:alert type="warning">${errorMessage}</gui:alert>
</c:if>
<div class="row">
......
<%@include file="/WEB-INF/jsp/init.jsp" %>
<c:if test="${responseFromTransifex ne null}">
<div class="alert alert-warning">
<gui:alert type="warning">
<c:forEach items="${responseFromTransifex}" var="rpt">
<div>
<spring:message code="${rpt}" />
</div>
</c:forEach>
</div>
</gui:alert>
</c:if>
\ No newline at end of file
......@@ -15,13 +15,13 @@
</h1>
<c:if test="${not country.current}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="country.page.not-current" />
<c:if test="${country.replacedBy != null}">
<spring:message code="country.replaced-by" arguments="${country.replacedBy.code3}" />
<a href="${country.replacedBy.code3}"><c:out value="${country.replacedBy.getName(pageContext.response.locale)}" /></a>
</c:if>
</div>
</gui:alert>
</c:if>
<div class="jumbotron">
......@@ -40,9 +40,9 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${itpgrfa != null and itpgrfa.contractingParty=='Yes'}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="country.is-itpgrfa-contractingParty" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" />
</div>
</gui:alert>
</c:if>
<div>
......
......@@ -9,9 +9,9 @@
</head>
<body>
<c:if test="${crop eq null}">
<div class="alert alert-error">
<gui:alert type="error">
<spring:message code="data.error.404"/>
</div>
</gui:alert>
</c:if>
<div class="informative-h1 row">
......
......@@ -6,3 +6,4 @@
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="local" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="cms" tagdir="/WEB-INF/tags/cms"%>
<%@ taglib prefix="gui" tagdir="/WEB-INF/tags/gui"%>
......@@ -9,10 +9,10 @@
<body>
<h1><spring:message code="page.login" /></h1>
<c:if test="${param['error'] ne null}">
<div class="alert alert-danger"><spring:message code="login.invalid-credentials"/></div>
<gui:alert type="danger"><spring:message code="login.invalid-credentials"/></gui:alert>
</c:if>
<c:if test="${error ne null}">
<div class="alert alert-danger"><spring:message code="login.invalid-token"/></div>
<gui:alert type="danger"><spring:message code="login.invalid-token"/></gui:alert>
</c:if>
<form role="form" method="POST" action="<c:url value="/login-attempt" />" class="form-horizontal">
......
<%@include file="/WEB-INF/jsp/init.jsp"%>
<!-- Alerts -->
<div class="alert alert-info">
This accession is in the Multilateral System of the ITPGRFA.
</div>
<div class="mcboatface">Different types of alerts are used: <code>alert-info</code>, <code>alert-warning</code>,
<code>alert-error</code> (Coming from Bootstrap).
<pre>&lt;div class="alert alert-info"&gt;Contents here&lt;/div&gt;</pre>
<gui:alert type="info">
<b>Info:</b> This accession is in the Multilateral System of the ITPGRFA.
</gui:alert>
<div class="mcboatface">Different types of alerts are used: <code>success</code>, <code>info</code>, <code>warning</code>,
<code>danger</code> (Coming from Bootstrap).
<pre>&lt;gui:alert type="info"&gt;Contents here&lt;/gui:alert&gt;</pre>
</div>
<div class="alert alert-warning">
This accession is in the Multilateral System of the ITPGRFA.
</div>
<gui:alert type="success">
<b>Success!</b> This accession is in the Multilateral System of the ITPGRFA.
</gui:alert>
<div class="alert alert-error">
This is an error.
</div>
<gui:alert type="warning">
<b>Warning!</b> This accession is in the Multilateral System of the ITPGRFA.
</gui:alert>
<gui:alert type="danger">
<b>Danger!</b> Do not panic.
</gui:alert>
......@@ -19,13 +19,13 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${not empty error}">
<div class="alert alert-danger"><spring:message code="${error}" /></div>
<gui:alert type="danger"><spring:message code="${error}" /></gui:alert>
</c:if>
<c:if test="${param['exist'] ne null}">
<div class="alert alert-error">
<gui:alert type="error">
<spring:message code="registration.user-exists" />
</div>
</gui:alert>
</c:if>
<form role="form" method="POST" action="new-user.html" class="form-horizontal validate">
<div class="form-group">
......
......@@ -15,9 +15,9 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
<c:if test="${error ne null}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="validate.no-such-key"/>
</div>
</gui:alert>
</c:if>
<form role="form" class="form-vertical validate" action="<c:url value="/request/${tokenUuid}/confirm" />" method="post">
......
......@@ -12,9 +12,9 @@
</h1>
<c:if test="${pagedData == null}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="selection.empty-list-warning" />
</div>
</gui:alert>
</c:if>
<c:if test="${pagedData != null}">
......@@ -31,9 +31,9 @@
</div>
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="request.total-vs-available" arguments="${totalCount},${availableCount}" />
</div>
</gui:alert>
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
......
......@@ -14,15 +14,15 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${error ne null}">
<div class="alert alert-danger">
<gui:alert type="danger">
<c:out value="${error.message}" />
</div>
</gui:alert>
</c:if>
<c:if test="${smta ne null and smta ne true}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="request.smta-not-accepted"/>
</div>
</gui:alert>
</c:if>
<form method="post" action="<c:url value="/request/submit" />" class="form-horizontal">
......
......@@ -14,9 +14,9 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
<c:if test="${error ne null}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="validate.no-such-key"/>
</div>
</gui:alert>
</c:if>
<form role="form" class="form-vertical validate" action="<c:url value="/request/${tokenUuid}/validate" />" method="post">
......
......@@ -27,14 +27,14 @@
<c:if test="${error ne null}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="search.search-query-failed" arguments="${error.message}" />
</div>
</gui:alert>
</c:if>
<c:if test="${pagedData eq null}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="search.search-query-missing" />
</div>
</gui:alert>
</c:if>
<div class="applied-filters">
......
......@@ -17,7 +17,7 @@
</div>
<c:if test="${pagedData.totalElements eq 0}">
<div class="alert alert-info"><spring:message code="search.no-results" /></div>
<gui:alert type="info"><spring:message code="search.no-results" /></gui:alert>
</c:if>
<c:if test="${pagedData ne null and pagedData.totalElements gt 0}">
......
......@@ -28,14 +28,14 @@
</div>
<c:if test="${error ne null}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="search.search-query-failed" arguments="${error.message}" />
</div>
</gui:alert>
</c:if>
<c:if test="${pagedData eq null}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="search.search-query-missing" />
</div>
</gui:alert>
</c:if>
<div class="applied-filters">
......@@ -127,7 +127,7 @@
</table>
</c:when>
<c:otherwise>
<div class="alert alert-info"><spring:message code="search.no-results" /></div>
<gui:alert type="info"><spring:message code="search.no-results" /></gui:alert>
</c:otherwise>
</c:choose>
</body>
......
......@@ -10,13 +10,13 @@
<cms:informative-h1 title="selection.page.title" fancy="true" info="selection.page.intro" />
<c:if test="${resultFromSave ne null}">
<div class="alert alert-warning"><spring:message code="${resultFromSave}" /></div>
<gui:alert type="warning"><spring:message code="${resultFromSave}" /></gui:alert>
</c:if>
<c:if test="${pagedData == null}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="selection.empty-list-warning"/>
</div>
</gui:alert>
<security:authorize access="isAuthenticated()">
<c:if test="${fn:length(userAccessionLists) gt 0}">
......
......@@ -43,7 +43,7 @@
</security:authorize>
<c:if test="${error ne null}">
<div class="alert alert-danger"><spring:message code="user.not.found"/></div>
<gui:alert type="danger"><spring:message code="user.not.found"/></gui:alert>
</c:if>
<div class="audit-info">
......
......@@ -13,7 +13,7 @@
</h1>
<c:if test="${not empty emailError}">
<div class="alert alert-danger">${emailError}</div>
<gui:alert type="danger">${emailError}</gui:alert>
</c:if>
<form role="form" class="form-horizontal validate" action="<c:url value="/profile/${user.uuid}/update" />" method="post">
<div class="form-group">
......
......@@ -14,7 +14,7 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${not empty error}">
<div class="alert alert-danger"><spring:message code="${error}" /></div>
<gui:alert type="danger"><spring:message code="${error}" /></gui:alert>
</c:if>
<form class="form-horizontal" action="<c:url value="/profile/password/reset"/>" method="post">
......
......@@ -11,7 +11,7 @@
<spring:message code="userprofile.password" />
</h1>
<c:if test="${error ne null}">
<div class="alert alert-danger"><spring:message code="${error}"/></div>
<gui:alert type="danger"><spring:message code="${error}"/></gui:alert>
</c:if>
<form class="form-horizontal" action="<c:url value="/profile/${tokenUuid}/pwdreset"/>" method="post">
......
......@@ -21,9 +21,9 @@
</div>
<c:if test="${error ne null }">
<div class="alert alert-error">
<gui:alert type="error">
<spring:message code="validate.email.invalid.key"/>
</div>
</gui:alert>
</c:if>
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
......
......@@ -148,18 +148,18 @@
<c:if test="${not faoInstitute.current}">
<div class="alert alert-warning">
<gui:alert type="warning">
<spring:message code="faoInstitute.institute-not-current" />
<a href="<c:url value="/wiews/${faoInstitute.vCode}" />">
<spring:message code="faoInstitute.view-current-institute" arguments="${faoInstitute.vCode}" />
</a>
</div>
</gui:alert>
</c:if>
<c:if test="${faoInstitute.current and countByInstitute eq 0}">
<div class="alert alert-info">
<gui:alert type="info">
<spring:message code="faoInstitute.no-accessions-registered" />
</div>
</gui:alert>
</c:if>
......
<%@ tag description="Alert display" pageEncoding="UTF-8"%>
<%@ tag body-content="scriptless"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ attribute name="type" required="true" type="java.lang.String"%>
<div class="alert alert-<c:out value="${type}" />">
<jsp:doBody />
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment