Commit 6fc0670f authored by Matija Obreza's avatar Matija Obreza
Browse files

URL Shortener: layout

parent 57a0e4e6
......@@ -676,6 +676,8 @@ twitter.tweet-this=Tweet!
twitter.follow-X=Follow @{0}
linkedin.share-this=Share on LinkedIn
share.link=Share Link
share.link.placeholder=Please wait...
share.link.text=Please use the shortened version of the full URL to this page:
welcome.read-more=Read more about Genesys
twitter.latest-on-twitter=Latest on Twitter
......
......@@ -17,7 +17,7 @@
<spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
</div>
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="col-md-12 col-lg-6">
<form method="get" action="">
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />" />
<div class="pagination">
......@@ -28,18 +28,30 @@
</div>
</form>
</div>
<div class="col-sm-12 col-md-6 text-right" style="padding-top: 12px">
<div class="col-md-12 col-lg-6 text-right" style="padding-top: 12px">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="menuShareLink">
<span class="glyphicon glyphicon-share"></span><span><spring:message code="share.link"/></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="padding10">
<p><spring:message code="share.link.text" /></p>
<input id="shortLink" type="text" placeholder="<spring:message code="share.link.placeholder" />" value="" />
</li>
</ul>
</div>
<c:if test="${pagedData.totalElements le 200000}">
<form style="display: inline-block" method="post" action="<c:url value="/download/explore/dwca" />">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />" />
<button class="btn btn-default" type="submit"><spring:message code="filter.download-dwca" /></button>
<button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-download"></span><span><spring:message code="filter.download-dwca" /></span></button>
</form>
<security:authorize access="isAuthenticated()">
<form style="display: inline-block" method="post" action="<c:url value="/download/explore/download/mcpd" />">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />" />
<button class="btn btn-default" type="submit"><spring:message code="filter.download-mcpd" /></button>
<button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-download"></span><span><spring:message code="filter.download-mcpd" /></span></button>
</form>
</security:authorize>
</c:if>
......@@ -90,14 +102,6 @@
<span class="${fn:length(currentFilters) gt 0 ? '' : 'hide'}"><spring:message code="filter.filters-applied" /></span>
<span class="${fn:length(currentFilters) gt 0 ? 'hide' : ''}"><spring:message code="filter.filters-not-applied" /></span>
</li>
<li class="active dropdown form-horizontal" style="float: right" id="menuShareLink">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<spring:message code="share.link"/>
</a>
<ul class="dropdown-menu">
<input id="shortLink" type="text" value="">
</ul>
</li>
</ul>
<%-- Only render currently present filters --%>
......@@ -432,6 +436,7 @@
});
$("#menuShareLink").on("click", function () {
if ($('#shortLink').val() === '') {
$.ajax({
type: 'POST',
url: '/explore/shorten-url',
......@@ -444,6 +449,9 @@
inp.select();
}
});
} else {
console.log('No repeat.');
}
});
GenesysFilterUtil.registerAutocomplete("#allfilters",jsonData);
......
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