Commit 133dc250 authored by Matija Obreza's avatar Matija Obreza

Added display attributed to <gui:alert tag

parent 12a9b3f9
......@@ -29,44 +29,30 @@
</div>
</div>
<c:if test="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}">
<gui:alert type="warning">
<spring:message code="accession.this-is-a-historic-entry" />
</gui:alert>
</c:if>
<gui:alert type="warning" display="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}">
<spring:message code="accession.this-is-a-historic-entry" />
</gui:alert>
<c:if test="${accession.inTrust eq true}">
<gui:alert type="info">
<spring:message code="accession.inTrust.true" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${accession.inTrust eq true}">
<spring:message code="accession.inTrust.true" />
</gui:alert>
<c:if test="${accession.inSvalbard eq true}">
<gui:alert type="info">
<spring:message code="accession.inSvalbard.true" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${accession.inSvalbard eq true}">
<spring:message code="accession.inSvalbard.true" />
</gui:alert>
<c:if test="${accession.mlsStatus eq true}">
<gui:alert type="info">
<spring:message code="accession.mlsStatus.true" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${accession.mlsStatus eq true}">
<spring:message code="accession.mlsStatus.true" />
</gui:alert>
<%--
<c:if test="${accession.availability eq false}">
<gui:alert type="warning">
<gui:alert type="warning" display="${accession.availability eq false}">
<spring:message code="accession.not-available-for-distribution" />
</gui:alert>
</c:if>
<c:if test="${accession.availability eq true}">
<gui:alert type="info">
<gui:alert type="info" display="${accession.availability eq true}">
<spring:message code="accession.available-for-distribution" />
</gui:alert>
</c:if>
--%>
--%>
<%--
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="<c:url value="/wiews/${accession.institute.code}" />" itemprop="url">
......
......@@ -7,9 +7,11 @@
<title><spring:message code="userprofile.update.title" /></title>
</head>
<body>
<c:if test="${not empty emailError}">
<gui:alert type="danger">${emailError}</gui:alert>
</c:if>
<!-- Any errors? -->
<gui:alert type="danger" display="${not empty emailError}">
<c:out value="${emailError}" />
</gui:alert>
<form role="form" class="form-horizontal validate" action="<c:url value="/admin/users/${user.uuid}/update" />" method="post">
<div class="form-group">
<label for="name" class="col-lg-2 control-label"><spring:message code="registration.full-name" /></label>
......
......@@ -17,7 +17,7 @@
<div class="" style="position: absolute; right: 0;">
<form class="inline-form pull-right" method="post" action="<c:url value="/content/transifex"/>">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input id="articleSlug" type="hidden" name="slug" value="${article.slug eq "blurp"? "".concat(article.classPk.shortName).concat("-").concat(article.targetId) : article.slug}"/>
<input id="articleSlug" type="hidden" name="slug" value="${article.slug eq 'blurp' ? ''.concat(article.classPk.shortName).concat('-').concat(article.targetId) : article.slug}"/>
<c:choose>
<c:when test="${article.targetId ne null}">
......
......@@ -22,11 +22,9 @@
</a>
</security:authorize>
<c:if test="${crop eq null}">
<gui:alert type="error">
<spring:message code="data.error.404"/>
</gui:alert>
</c:if>
<gui:alert type="error" display="${crop eq null}">
<spring:message code="data.error.404"/>
</gui:alert>
<c:if test="${blurp ne null}">
<div class="collect-info about-section">
......
......@@ -24,44 +24,31 @@
</div>
</div>
<c:if test="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}">
<gui:alert type="warning">
<spring:message code="accession.this-is-a-historic-entry" />
</gui:alert>
</c:if>
<gui:alert type="warning" display="${accession.historic eq true or accession.getClass().simpleName eq 'AccessionHistoric'}">
<spring:message code="accession.this-is-a-historic-entry" />
</gui:alert>
<c:if test="${accession.inTrust eq true}">
<gui:alert type="info">
<spring:message code="accession.inTrust.true" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${accession.inTrust eq true}">
<spring:message code="accession.inTrust.true" />
</gui:alert>
<c:if test="${accession.inSvalbard eq true}">
<gui:alert type="info">
<spring:message code="accession.inSvalbard.true" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${accession.inSvalbard eq true}">
<spring:message code="accession.inSvalbard.true" />
</gui:alert>
<c:if test="${accession.mlsStatus eq true}">
<gui:alert type="info">
<spring:message code="accession.mlsStatus.true" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${accession.mlsStatus eq true}">
<spring:message code="accession.mlsStatus.true" />
</gui:alert>
<%--
<c:if test="${accession.availability eq false}">
<gui:alert type="warning">
<spring:message code="accession.not-available-for-distribution" />
</gui:alert>
</c:if>
<gui:alert type="warning" display="${accession.availability eq false}">
<spring:message code="accession.not-available-for-distribution" />
</gui:alert>
<c:if test="${accession.availability eq true}">
<gui:alert type="info">
<spring:message code="accession.available-for-distribution" />
</gui:alert>
</c:if>
--%>
<gui:alert type="info" display="${accession.availability eq true}">
<spring:message code="accession.available-for-distribution" />
</gui:alert>
--%>
<%--
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="<c:url value="/wiews/${accession.institute.code}" />" itemprop="url">
......
......@@ -7,13 +7,14 @@
<title><spring:message code="menu.admin.repository.galleries" /></title>
</head>
<body>
<c:if test="${not empty errorMessage}">
<gui:alert type="warning">${errorMessage}</gui:alert>
</c:if>
<c:if test="${not empty successMessage}">
<gui:alert type="success">${successMessage}</gui:alert>
</c:if>
<!-- Any alerts? -->
<gui:alert type="warning" display="${not empty errorMessage}">
<c:out value="${errorMessage}" />
</gui:alert>
<gui:alert type="success" display="${not empty successMessage}">
<c:out value="${successMessage}" />
</gui:alert>
<table class="table table-striped">
<thead>
<tr>
......
......@@ -7,9 +7,10 @@
<title><spring:message code="menu.admin.repository.files" /></title>
</head>
<body>
<c:if test="${not empty errorMessage}">
<gui:alert type="warning">${errorMessage}</gui:alert>
</c:if>
<!-- Any alerts? -->
<gui:alert type="warning" display="${not empty errorMessage}">
<c:out value="${errorMessage}" />
</gui:alert>
<div class="row">
<div class="col-xs-2">
......
......@@ -19,7 +19,7 @@
<security:authorize access="hasRole('ADMINISTRATOR') or hasRole('CONTENTMANAGER')">
<form class="inline-form pull-right" method="post" action="<c:url value="/content/transifex"/>">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input id="articleSlug" type="hidden" name="slug" value="${article.slug eq "blurp"? "".concat(article.classPk.shortName).concat("-").concat(article.targetId) : article.slug}"/>
<input id="articleSlug" type="hidden" name="slug" value="${article.slug eq 'blurp'? ''.concat(article.classPk.shortName).concat('-').concat(article.targetId) : article.slug}"/>
<c:choose>
<c:when test="${article.targetId ne null}">
......
<%@include file="/WEB-INF/jsp/init.jsp" %>
<c:if test="${responseFromTransifex ne null}">
<gui:alert type="warning">
<c:forEach items="${responseFromTransifex}" var="rpt">
<div>
<spring:message code="${rpt}" />
</div>
</c:forEach>
</gui:alert>
</c:if>
\ No newline at end of file
<gui:alert type="warning" display="${responseFromTransifex ne null}">
<c:forEach items="${responseFromTransifex}" var="rpt">
<div>
<spring:message code="${rpt}" />
</div>
</c:forEach>
</gui:alert>
......@@ -14,15 +14,14 @@
<img class="country-flag bigger" src="<c:url value="${cdnFlagsUrl}" />/${country.code3.toUpperCase()}.svg" />
</h1>
<c:if test="${not country.current}">
<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>
</gui:alert>
</c:if>
<!-- Is country current? -->
<gui:alert type="info" display="${not country.current}">
<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>
</gui:alert>
<div class="jumbotron">
<spring:message code="country.stat.countByOrigin" arguments="${countByOrigin}" />
......@@ -39,11 +38,9 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${itpgrfa != null and itpgrfa.contractingParty=='Yes'}">
<gui:alert type="info">
<spring:message code="country.is-itpgrfa-contractingParty" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${itpgrfa != null and itpgrfa.contractingParty=='Yes'}">
<spring:message code="country.is-itpgrfa-contractingParty" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" />
</gui:alert>
<div>
ISO-3166 3-alpha:
......
......@@ -8,11 +8,9 @@
<meta name="description" content="<c:out value="${jspHelper.htmlToText(blurp.summary)}" />" />
</head>
<body>
<c:if test="${crop eq null}">
<gui:alert type="error">
<gui:alert type="error" display="${crop eq null}">
<spring:message code="data.error.404"/>
</gui:alert>
</c:if>
<div class="informative-h1 row">
<div class="col-md-12 col-sm-12">
......
......@@ -8,14 +8,16 @@
</head>
<body>
<h1><spring:message code="page.login" /></h1>
<c:if test="${param['error'] ne null}">
<gui:alert type="danger"><spring:message code="login.invalid-credentials"/></gui:alert>
</c:if>
<c:if test="${error ne null}">
<gui:alert type="danger"><spring:message code="login.invalid-token"/></gui:alert>
</c:if>
<!-- Alerts? -->
<gui:alert type="danger" display="${param['error'] ne null}">
<spring:message code="login.invalid-credentials" />
</gui:alert>
<gui:alert type="danger" display="${error ne null}">
<spring:message code="login.invalid-token" />
</gui:alert>
<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">
<div class="form-group">
<label for="j_username" class="col-lg-2 control-label"><spring:message code="login.username"/></label>
<div class="col-lg-3">
......
......@@ -4,9 +4,10 @@
<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 class="mcboatface">
<p>Different types of alerts are used: <code>success</code>, <code>info</code>, <code>warning</code>, <code>danger</code> (Coming from Bootstrap).</p>
<pre>&lt;gui:alert type="info" display="true"&gt;Contents here&lt;/gui:alert&gt;</pre>
<p>The <code>display</code> attribute determines whether the alert is rendered or not.</p>
</div>
<gui:alert type="success">
......
......@@ -16,17 +16,16 @@
</a>
</security:authorize>
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${not empty error}">
<gui:alert type="danger"><spring:message code="${error}" /></gui:alert>
</c:if>
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<gui:alert type="danger" display="${not empty error}">
<spring:message code="${error}" />
</gui:alert>
<gui:alert type="error" display="${param['exist'] ne null}">
<spring:message code="registration.user-exists" />
</gui:alert>
<c:if test="${param['exist'] ne null}">
<gui:alert type="error">
<spring:message code="registration.user-exists" />
</gui:alert>
</c:if>
<form role="form" method="POST" action="new-user.html" class="form-horizontal validate">
<div class="form-group">
<label for="email" class="col-lg-2 control-label"><spring:message code="registration.email" /></label>
......
......@@ -7,20 +7,17 @@
<title><spring:message code="request.confirm-request"/></title>
</head>
<body>
<h1>
<spring:message code="request.confirm-request"/>
</h1>
<h1>
<spring:message code="request.confirm-request" />
</h1>
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
<gui:alert type="warning" display="${error ne null}">
<spring:message code="validate.no-such-key" />
</gui:alert>
<c:if test="${error ne null}">
<gui:alert type="warning">
<spring:message code="validate.no-such-key"/>
</gui:alert>
</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">
<div class="form-group">
<label class="col-lg-3 control-label"><spring:message code="request.validation-key" /></label>
......
......@@ -11,11 +11,9 @@
<spring:message code="request.page.title" />
</h1>
<c:if test="${pagedData == null}">
<gui:alert type="info">
<spring:message code="selection.empty-list-warning" />
</gui:alert>
</c:if>
<gui:alert type="info" display="${pagedData == null}">
<spring:message code="selection.empty-list-warning" />
</gui:alert>
<c:if test="${pagedData != null}">
......
......@@ -13,17 +13,13 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${error ne null}">
<gui:alert type="danger">
<c:out value="${error.message}" />
</gui:alert>
</c:if>
<gui:alert type="danger" display="${error ne null}">
<c:out value="${error.message}" />
</gui:alert>
<c:if test="${smta ne null and smta ne true}">
<gui:alert type="warning">
<spring:message code="request.smta-not-accepted"/>
</gui:alert>
</c:if>
<gui:alert type="warning" display="${smta ne null and smta ne true}">
<spring:message code="request.smta-not-accepted"/>
</gui:alert>
<form method="post" action="<c:url value="/request/submit" />" class="form-horizontal">
<div class="form-group">
......
......@@ -7,17 +7,15 @@
<title><spring:message code="request.validate-request"/></title>
</head>
<body>
<h1>
<spring:message code="request.validate-request"/>
</h1>
<h1>
<spring:message code="request.validate-request"/>
</h1>
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
<c:if test="${error ne null}">
<gui:alert type="warning">
<spring:message code="validate.no-such-key"/>
</gui:alert>
</c:if>
<gui:alert type="warning" display="${error ne null}">
<spring:message code="validate.no-such-key"/>
</gui:alert>
<form role="form" class="form-vertical validate" action="<c:url value="/request/${tokenUuid}/validate" />" method="post">
......
......@@ -26,16 +26,13 @@
</div>
<c:if test="${error ne null}">
<gui:alert type="warning">
<spring:message code="search.search-query-failed" arguments="${error.message}" />
</gui:alert>
</c:if>
<c:if test="${pagedData eq null}">
<gui:alert type="warning">
<spring:message code="search.search-query-missing" />
</gui:alert>
</c:if>
<!-- Alerts? -->
<gui:alert type="warning" display="${error ne null}">
<spring:message code="search.search-query-failed" arguments="${error.message}" />
</gui:alert>
<gui:alert type="warning" display="${pagedData eq null}">
<spring:message code="search.search-query-missing" />
</gui:alert>
<div class="applied-filters">
<form class="" method="get" action="<c:url value="/acn/search2" />">
......
......@@ -16,9 +16,9 @@
</form>
</div>
<c:if test="${pagedData.totalElements eq 0}">
<gui:alert type="info"><spring:message code="search.no-results" /></gui:alert>
</c:if>
<gui:alert type="info" display="${pagedData.totalElements eq 0}">
<spring:message code="search.no-results" />
</gui:alert>
<c:if test="${pagedData ne null and pagedData.totalElements gt 0}">
<div class="main-col-header clearfix">
......
......@@ -27,16 +27,13 @@
</div>
</div>
<c:if test="${error ne null}">
<gui:alert type="warning">
<spring:message code="search.search-query-failed" arguments="${error.message}" />
</gui:alert>
</c:if>
<c:if test="${pagedData eq null}">
<gui:alert type="warning">
<spring:message code="search.search-query-missing" />
</gui:alert>
</c:if>
<!-- Alerts? -->
<gui:alert type="warning" display="${error ne null}">
<spring:message code="search.search-query-failed" arguments="${error.message}" />
</gui:alert>
<gui:alert type="warning" display="${pagedData eq null}">
<spring:message code="search.search-query-missing" />
</gui:alert>
<div class="applied-filters">
<form class="" method="get" action="<c:url value="/acn/search2" />">
......@@ -127,7 +124,9 @@
</table>
</c:when>
<c:otherwise>
<gui:alert type="info"><spring:message code="search.no-results" /></gui:alert>
<gui:alert type="info">
<spring:message code="search.no-results" />
</gui:alert>
</c:otherwise>
</c:choose>
</body>
......
......@@ -9,30 +9,30 @@
<body>
<cms:informative-h1 title="selection.page.title" fancy="true" info="selection.page.intro" />
<c:if test="${resultFromSave ne null}">
<gui:alert type="warning"><spring:message code="${resultFromSave}" /></gui:alert>
</c:if>
<gui:alert type="warning" display="${resultFromSave ne null}">
<spring:message code="${resultFromSave}" />
</gui:alert>
<c:if test="${pagedData == null}">
<gui:alert type="info">
<spring:message code="selection.empty-list-warning"/>
</gui:alert>
<security:authorize access="isAuthenticated()">
<c:if test="${fn:length(userAccessionLists) gt 0}">
<div class="">
<spring:message code="userlist.list-my-lists" />
<ul class="funny-list" role="" id="user-accession-lists">
<c:forEach items="${userAccessionLists}" var="userList">
<li><a href="/sel/load?list=${userList.uuid}">${userList.title}</a>
<div class="pull-right"><c:out value="${userList.description}" /></div>
</li>
</c:forEach>
</ul>
</div>
</c:if>
</security:authorize>
</c:if>
<c:if test="${pagedData == null}">
<gui:alert type="info">
<spring:message code="selection.empty-list-warning"/>
</gui:alert>
<security:authorize access="isAuthenticated()">
<c:if test="${fn:length(userAccessionLists) gt 0}">
<div class="">
<spring:message code="userlist.list-my-lists" />
<ul class="funny-list" role="" id="user-accession-lists">
<c:forEach items="${userAccessionLists}" var="userList">
<li><a href="/sel/load?list=${userList.uuid}">${userList.title}</a>
<div class="pull-right"><c:out value="${userList.description}" /></div>
</li>
</c:forEach>
</ul>
</div>
</c:if>
</security:authorize>
</c:if>
<c:if test="${pagedData != null}">
......
......@@ -42,11 +42,12 @@
</form>
</security:authorize>
<c:if test="${error ne null}">
<gui:alert type="danger"><spring:message code="user.not.found"/></gui:alert>
</c:if>
<!-- Errors? -->
<gui:alert type="danger" display="${error ne null}">
<spring:message code="user.not.found" />
</gui:alert>
<div class="audit-info">
<div class="audit-info">
<c:if test="${team.lastModifiedBy ne null}"><spring:message code="audit.lastModifiedBy" arguments="${jspHelper.userFullName(team.lastModifiedBy)}" /></c:if>
<fmt:formatDate value="${team.lastModifiedDate}" type="both" />
</div>
......
......@@ -12,9 +12,10 @@
<spring:message code="userprofile.update.title" />
</h1>
<c:if test="${not empty emailError}">
<gui:alert type="danger">${emailError}</gui:alert>
</c:if>
<gui:alert type="danger" display="${not empty emailError}">
<c:out value="${emailError}" />
</gui:alert>
<form role="form" class="form-horizontal validate" action="<c:url value="/profile/${user.uuid}/update" />" method="post">
<div class="form-group">
<label for="name" class="col-lg-2 control-label"><spring:message code="registration.full-name" /></label>
......
......@@ -13,11 +13,11 @@
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp"%>
<c:if test="${not empty error}">
<gui:alert type="danger"><spring:message code="${error}" /></gui:alert>
</c:if>
<gui:alert type="danger" display="${not empty error}">
<spring:message code="${error}" />
</gui:alert>
<form class="form-horizontal" action="<c:url value="/profile/password/reset"/>" method="post">
<form class="form-horizontal" action="<c:url value="/profile/password/reset"/>" method="post">
<div class="form-group">
<label class="col-lg-2 control-label"><spring:message code="captcha.text" /></label>
<div class="col-lg-3">
......
......@@ -10,11 +10,12 @@
<h1>
<spring:message code="userprofile.password" />
</h1>
<c:if test="${error ne null}">
<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">
<gui:alert type="danger" display="${error ne null}">
<spring:message code="${error}" />
</gui:alert>
<form class="form-horizontal" action="<c:url value="/profile/${tokenUuid}/pwdreset"/>" method="post">
<div class="form-group">
<label for="password" class="col-lg-2 control-label"><spring:message code="verification.token-key" /></label>
<div class="col-lg-3"><input type="text" id="key" name="key" class="span1 form-control" maxlength="4" placeholder="..." value="<c:out value="${key}" />" /></div>
......
......@@ -20,11 +20,10 @@
<input type="submit" value="OK" class="btn btn-primary"/>
</div>
<c:if test="${error ne null }">
<gui:alert type="error">
<spring:message code="validate.email.invalid.key"/>
</gui:alert>
</c:if>
<gui:alert type="error" display="${error ne null }">
<spring:message code="validate.email.invalid.key"/>
</gui:alert>
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</form>
......
......@@ -147,21 +147,15 @@
</div>
<c:if test="${not faoInstitute.current}">
<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>
</gui:alert>
</c:if>
<c:if test="${faoInstitute.current and countByInstitute eq 0}">
<gui:alert type="info">
<spring:message code="faoInstitute.no-accessions-registered" />
</gui:alert>
</c:if>