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 @@ ...@@ -30,41 +30,41 @@
</div> </div>
<c:if test="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}"> <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" /> <spring:message code="accession.this-is-a-historic-entry" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.inTrust eq true}"> <c:if test="${accession.inTrust eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.inTrust.true" /> <spring:message code="accession.inTrust.true" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.inSvalbard eq true}"> <c:if test="${accession.inSvalbard eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.inSvalbard.true" /> <spring:message code="accession.inSvalbard.true" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.mlsStatus eq true}"> <c:if test="${accession.mlsStatus eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.mlsStatus.true" /> <spring:message code="accession.mlsStatus.true" />
</div> </gui:alert>
</c:if> </c:if>
<%-- <%--
<c:if test="${accession.availability eq false}"> <c:if test="${accession.availability eq false}">
<div class="alert alert-warning"> <gui:alert type="warning">
<spring:message code="accession.not-available-for-distribution" /> <spring:message code="accession.not-available-for-distribution" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.availability eq true}"> <c:if test="${accession.availability eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.available-for-distribution" /> <spring:message code="accession.available-for-distribution" />
</div> </gui:alert>
</c:if> </c:if>
--%> --%>
<%-- <%--
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</head> </head>
<body> <body>
<c:if test="${not empty emailError}"> <c:if test="${not empty emailError}">
<div class="alert alert-danger">${emailError}</div> <gui:alert type="danger">${emailError}</gui:alert>
</c:if> </c:if>
<form role="form" class="form-horizontal validate" action="<c:url value="/admin/users/${user.uuid}/update" />" method="post"> <form role="form" class="form-horizontal validate" action="<c:url value="/admin/users/${user.uuid}/update" />" method="post">
<div class="form-group"> <div class="form-group">
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
</security:authorize> </security:authorize>
<c:if test="${crop eq null}"> <c:if test="${crop eq null}">
<div class="alert alert-error"> <gui:alert type="error">
<spring:message code="data.error.404"/> <spring:message code="data.error.404"/>
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${blurp ne null}"> <c:if test="${blurp ne null}">
......
...@@ -25,41 +25,41 @@ ...@@ -25,41 +25,41 @@
</div> </div>
<c:if test="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}"> <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" /> <spring:message code="accession.this-is-a-historic-entry" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.inTrust eq true}"> <c:if test="${accession.inTrust eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.inTrust.true" /> <spring:message code="accession.inTrust.true" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.inSvalbard eq true}"> <c:if test="${accession.inSvalbard eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.inSvalbard.true" /> <spring:message code="accession.inSvalbard.true" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.mlsStatus eq true}"> <c:if test="${accession.mlsStatus eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.mlsStatus.true" /> <spring:message code="accession.mlsStatus.true" />
</div> </gui:alert>
</c:if> </c:if>
<%-- <%--
<c:if test="${accession.availability eq false}"> <c:if test="${accession.availability eq false}">
<div class="alert alert-warning"> <gui:alert type="warning">
<spring:message code="accession.not-available-for-distribution" /> <spring:message code="accession.not-available-for-distribution" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${accession.availability eq true}"> <c:if test="${accession.availability eq true}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="accession.available-for-distribution" /> <spring:message code="accession.available-for-distribution" />
</div> </gui:alert>
</c:if> </c:if>
--%> --%>
<%-- <%--
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
</head> </head>
<body> <body>
<c:if test="${not empty errorMessage}"> <c:if test="${not empty errorMessage}">
<div class="alert alert-warning">${errorMessage}</div> <gui:alert type="warning">${errorMessage}</gui:alert>
</c:if> </c:if>
<c:if test="${not empty successMessage}"> <c:if test="${not empty successMessage}">
<div class="alert alert-success">${successMessage}</div> <gui:alert type="success">${successMessage}</gui:alert>
</c:if> </c:if>
<table class="table table-striped"> <table class="table table-striped">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</head> </head>
<body> <body>
<c:if test="${not empty errorMessage}"> <c:if test="${not empty errorMessage}">
<div class="alert alert-warning">${errorMessage}</div> <gui:alert type="warning">${errorMessage}</gui:alert>
</c:if> </c:if>
<div class="row"> <div class="row">
......
<%@include file="/WEB-INF/jsp/init.jsp" %> <%@include file="/WEB-INF/jsp/init.jsp" %>
<c:if test="${responseFromTransifex ne null}"> <c:if test="${responseFromTransifex ne null}">
<div class="alert alert-warning"> <gui:alert type="warning">
<c:forEach items="${responseFromTransifex}" var="rpt"> <c:forEach items="${responseFromTransifex}" var="rpt">
<div> <div>
<spring:message code="${rpt}" /> <spring:message code="${rpt}" />
</div> </div>
</c:forEach> </c:forEach>
</div> </gui:alert>
</c:if> </c:if>
\ No newline at end of file
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
</h1> </h1>
<c:if test="${not country.current}"> <c:if test="${not country.current}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="country.page.not-current" /> <spring:message code="country.page.not-current" />
<c:if test="${country.replacedBy != null}"> <c:if test="${country.replacedBy != null}">
<spring:message code="country.replaced-by" arguments="${country.replacedBy.code3}" /> <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> <a href="${country.replacedBy.code3}"><c:out value="${country.replacedBy.getName(pageContext.response.locale)}" /></a>
</c:if> </c:if>
</div> </gui:alert>
</c:if> </c:if>
<div class="jumbotron"> <div class="jumbotron">
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%> <%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${itpgrfa != null and itpgrfa.contractingParty=='Yes'}"> <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="|" /> <spring:message code="country.is-itpgrfa-contractingParty" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" />
</div> </gui:alert>
</c:if> </c:if>
<div> <div>
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
</head> </head>
<body> <body>
<c:if test="${crop eq null}"> <c:if test="${crop eq null}">
<div class="alert alert-error"> <gui:alert type="error">
<spring:message code="data.error.404"/> <spring:message code="data.error.404"/>
</div> </gui:alert>
</c:if> </c:if>
<div class="informative-h1 row"> <div class="informative-h1 row">
......
...@@ -6,3 +6,4 @@ ...@@ -6,3 +6,4 @@
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="local" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="local" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="cms" tagdir="/WEB-INF/tags/cms"%> <%@ taglib prefix="cms" tagdir="/WEB-INF/tags/cms"%>
<%@ taglib prefix="gui" tagdir="/WEB-INF/tags/gui"%>
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<body> <body>
<h1><spring:message code="page.login" /></h1> <h1><spring:message code="page.login" /></h1>
<c:if test="${param['error'] ne null}"> <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>
<c:if test="${error ne null}"> <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> </c:if>
<form role="form" method="POST" action="<c:url value="/login-attempt" />" class="form-horizontal"> <form role="form" method="POST" action="<c:url value="/login-attempt" />" class="form-horizontal">
......
<%@include file="/WEB-INF/jsp/init.jsp"%> <%@include file="/WEB-INF/jsp/init.jsp"%>
<!-- Alerts --> <!-- Alerts -->
<div class="alert alert-info"> <gui:alert type="info">
This accession is in the Multilateral System of the ITPGRFA. <b>Info:</b> This accession is in the Multilateral System of the ITPGRFA.
</div> </gui:alert>
<div class="mcboatface">Different types of alerts are used: <code>alert-info</code>, <code>alert-warning</code>, <div class="mcboatface">Different types of alerts are used: <code>success</code>, <code>info</code>, <code>warning</code>,
<code>alert-error</code> (Coming from Bootstrap). <code>danger</code> (Coming from Bootstrap).
<pre>&lt;div class="alert alert-info"&gt;Contents here&lt;/div&gt;</pre> <pre>&lt;gui:alert type="info"&gt;Contents here&lt;/gui:alert&gt;</pre>
</div> </div>
<div class="alert alert-warning"> <gui:alert type="success">
This accession is in the Multilateral System of the ITPGRFA. <b>Success!</b> This accession is in the Multilateral System of the ITPGRFA.
</div> </gui:alert>
<div class="alert alert-error"> <gui:alert type="warning">
This is an error. <b>Warning!</b> This accession is in the Multilateral System of the ITPGRFA.
</div> </gui:alert>
<gui:alert type="danger">
<b>Danger!</b> Do not panic.
</gui:alert>
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%> <%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${not empty error}"> <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>
<c:if test="${param['exist'] ne null}"> <c:if test="${param['exist'] ne null}">
<div class="alert alert-error"> <gui:alert type="error">
<spring:message code="registration.user-exists" /> <spring:message code="registration.user-exists" />
</div> </gui:alert>
</c:if> </c:if>
<form role="form" method="POST" action="new-user.html" class="form-horizontal validate"> <form role="form" method="POST" action="new-user.html" class="form-horizontal validate">
<div class="form-group"> <div class="form-group">
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %> <%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
<c:if test="${error ne null}"> <c:if test="${error ne null}">
<div class="alert alert-warning"> <gui:alert type="warning">
<spring:message code="validate.no-such-key"/> <spring:message code="validate.no-such-key"/>
</div> </gui:alert>
</c:if> </c:if>
<form role="form" class="form-vertical validate" action="<c:url value="/request/${tokenUuid}/confirm" />" method="post"> <form role="form" class="form-vertical validate" action="<c:url value="/request/${tokenUuid}/confirm" />" method="post">
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
</h1> </h1>
<c:if test="${pagedData == null}"> <c:if test="${pagedData == null}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="selection.empty-list-warning" /> <spring:message code="selection.empty-list-warning" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${pagedData != null}"> <c:if test="${pagedData != null}">
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
</div> </div>
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="request.total-vs-available" arguments="${totalCount},${availableCount}" /> <spring:message code="request.total-vs-available" arguments="${totalCount},${availableCount}" />
</div> </gui:alert>
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%> <%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%> <%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${error ne null}"> <c:if test="${error ne null}">
<div class="alert alert-danger"> <gui:alert type="danger">
<c:out value="${error.message}" /> <c:out value="${error.message}" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${smta ne null and smta ne true}"> <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"/> <spring:message code="request.smta-not-accepted"/>
</div> </gui:alert>
</c:if> </c:if>
<form method="post" action="<c:url value="/request/submit" />" class="form-horizontal"> <form method="post" action="<c:url value="/request/submit" />" class="form-horizontal">
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %> <%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
<c:if test="${error ne null}"> <c:if test="${error ne null}">
<div class="alert alert-warning"> <gui:alert type="warning">
<spring:message code="validate.no-such-key"/> <spring:message code="validate.no-such-key"/>
</div> </gui:alert>
</c:if> </c:if>
<form role="form" class="form-vertical validate" action="<c:url value="/request/${tokenUuid}/validate" />" method="post"> <form role="form" class="form-vertical validate" action="<c:url value="/request/${tokenUuid}/validate" />" method="post">
......
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
<c:if test="${error ne null}"> <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}" /> <spring:message code="search.search-query-failed" arguments="${error.message}" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${pagedData eq null}"> <c:if test="${pagedData eq null}">
<div class="alert alert-warning"> <gui:alert type="warning">
<spring:message code="search.search-query-missing" /> <spring:message code="search.search-query-missing" />
</div> </gui:alert>
</c:if> </c:if>
<div class="applied-filters"> <div class="applied-filters">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<c:if test="${pagedData.totalElements eq 0}"> <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>
<c:if test="${pagedData ne null and pagedData.totalElements gt 0}"> <c:if test="${pagedData ne null and pagedData.totalElements gt 0}">
......
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
</div> </div>
<c:if test="${error ne null}"> <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}" /> <spring:message code="search.search-query-failed" arguments="${error.message}" />
</div> </gui:alert>
</c:if> </c:if>
<c:if test="${pagedData eq null}"> <c:if test="${pagedData eq null}">
<div class="alert alert-warning"> <gui:alert type="warning">
<spring:message code="search.search-query-missing" /> <spring:message code="search.search-query-missing" />
</div> </gui:alert>
</c:if> </c:if>
<div class="applied-filters"> <div class="applied-filters">
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</table> </table>
</c:when> </c:when>
<c:otherwise> <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:otherwise>
</c:choose> </c:choose>
</body> </body>
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
<cms:informative-h1 title="selection.page.title" fancy="true" info="selection.page.intro" /> <cms:informative-h1 title="selection.page.title" fancy="true" info="selection.page.intro" />
<c:if test="${resultFromSave ne null}"> <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>
<c:if test="${pagedData == null}"> <c:if test="${pagedData == null}">
<div class="alert alert-info"> <gui:alert type="info">
<spring:message code="selection.empty-list-warning"/> <spring:message code="selection.empty-list-warning"/>
</div> </gui:alert>
<security:authorize access="isAuthenticated()"> <security:authorize access="isAuthenticated()">
<c:if test="${fn:length(userAccessionLists) gt 0}"> <c:if test="${fn:length(userAccessionLists) gt 0}">
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</security:authorize> </security:authorize>
<c:if test="${error ne null}"> <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> </c:if>