shows go back link only when history is available
This commit is contained in:
parent
034c8885a0
commit
4d881ac625
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Shows 'Go Back' link only when browser history is available
|
||||||
|
merge_request: 9017
|
||||||
|
author:
|
|
@ -57,6 +57,11 @@
|
||||||
.container {
|
.container {
|
||||||
margin: auto 20px;
|
margin: auto 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.go-back {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -71,7 +76,16 @@
|
||||||
<hr />
|
<hr />
|
||||||
<p>Make sure the address is correct and that the page hasn't moved.</p>
|
<p>Make sure the address is correct and that the page hasn't moved.</p>
|
||||||
<p>Please contact your GitLab administrator if you think this is a mistake.</p>
|
<p>Please contact your GitLab administrator if you think this is a mistake.</p>
|
||||||
<a href="javascript:history.back()">Go back</a>
|
<a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var goBack = document.querySelector('.js-go-back');
|
||||||
|
|
||||||
|
if (history.length > 1) {
|
||||||
|
goBack.style.display = 'inline';
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -57,6 +57,11 @@
|
||||||
.container {
|
.container {
|
||||||
margin: auto 20px;
|
margin: auto 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.go-back {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -71,7 +76,17 @@
|
||||||
<hr />
|
<hr />
|
||||||
<p>Make sure you have access to the thing you tried to change.</p>
|
<p>Make sure you have access to the thing you tried to change.</p>
|
||||||
<p>Please contact your GitLab administrator if you think this is a mistake.</p>
|
<p>Please contact your GitLab administrator if you think this is a mistake.</p>
|
||||||
<a href="javascript:history.back()">Go back</a>
|
<a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var goBack = document.querySelector('.js-go-back');
|
||||||
|
|
||||||
|
if (history.length > 1) {
|
||||||
|
goBack.style.display = 'inline';
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -57,6 +57,11 @@
|
||||||
.container {
|
.container {
|
||||||
margin: auto 20px;
|
margin: auto 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.go-back {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -71,7 +76,16 @@
|
||||||
<hr />
|
<hr />
|
||||||
<p>Try refreshing the page, or going back and attempting the action again.</p>
|
<p>Try refreshing the page, or going back and attempting the action again.</p>
|
||||||
<p>Please contact your GitLab administrator if this problem persists.</p>
|
<p>Please contact your GitLab administrator if this problem persists.</p>
|
||||||
<a href="javascript:history.back()">Go back</a>
|
<a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var goBack = document.querySelector('.js-go-back');
|
||||||
|
|
||||||
|
if (history.length > 1) {
|
||||||
|
goBack.style.display = 'inline';
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -57,6 +57,11 @@
|
||||||
.container {
|
.container {
|
||||||
margin: auto 20px;
|
margin: auto 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.go-back {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -71,7 +76,16 @@
|
||||||
<hr />
|
<hr />
|
||||||
<p>Try refreshing the page, or going back and attempting the action again.</p>
|
<p>Try refreshing the page, or going back and attempting the action again.</p>
|
||||||
<p>Please contact your GitLab administrator if this problem persists.</p>
|
<p>Please contact your GitLab administrator if this problem persists.</p>
|
||||||
<a href="javascript:history.back()">Go back</a>
|
<a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var goBack = document.querySelector('.js-go-back');
|
||||||
|
|
||||||
|
if (history.length > 1) {
|
||||||
|
goBack.style.display = 'inline';
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -57,6 +57,11 @@
|
||||||
.container {
|
.container {
|
||||||
margin: auto 20px;
|
margin: auto 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.go-back {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -71,7 +76,16 @@
|
||||||
<hr />
|
<hr />
|
||||||
<p>Try refreshing the page, or going back and attempting the action again.</p>
|
<p>Try refreshing the page, or going back and attempting the action again.</p>
|
||||||
<p>Please contact your GitLab administrator if this problem persists.</p>
|
<p>Please contact your GitLab administrator if this problem persists.</p>
|
||||||
<a href="javascript:history.back()">Go back</a>
|
<a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var goBack = document.querySelector('.js-go-back');
|
||||||
|
|
||||||
|
if (history.length > 1) {
|
||||||
|
goBack.style.display = 'inline';
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue