Commit 4ef2788f authored by Christian Knauf's avatar Christian Knauf

Suggestion_Add "back to all News/Press/etc" button/link on detail view of news

parent 121e3f6c
......@@ -338,3 +338,9 @@ $(function () {
$(window).on('load', function () {
$('#membershipModal').modal('show');
});
if ($(".news-backlink-wrap a").length > 0) {
if(document.referrer.indexOf(window.location.hostname) != -1) {
$(".news-backlink-wrap a").attr("href","javascript:history.back();").text('Back');
}
}
......@@ -180,10 +180,17 @@
</n:renderMedia>
<f:if condition="{settings.backPid}">
<!-- Link Back -->
<f:link.page class="btn btn-default" pageUid="{settings.backPid}">
<f:translate key="back-link" />
</f:link.page>
<f:then>
<!-- Link Back -->
<f:link.page class="btn btn-default" pageUid="{settings.backPid}">
<f:translate key="back-link" />
</f:link.page>
</f:then>
<f:else>
<a href="#" class="btn btn-default news-backlink-wrap">
<f:translate key="back-link" />
</a>
</f:else>
</f:if>
<f:if condition="{newsItem.allRelatedSorted}">
......
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