summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorNur Rony <pro.nmrony@gmail.com>2017-04-07 14:24:04 +0000
committerJacob Schatz <jschatz@gitlab.com>2017-04-07 14:24:04 +0000
commit4d881ac6259fb7f57411f82294d71978417590d0 (patch)
tree437c333a2db757828e3b1fbc728dd3f79be3c372 /public
parent034c8885a0112809dfc1e671e729c7f5e65dd43a (diff)
downloadgitlab-ce-4d881ac6259fb7f57411f82294d71978417590d0.tar.gz
shows go back link only when history is available
Diffstat (limited to 'public')
-rw-r--r--public/404.html16
-rw-r--r--public/422.html17
-rw-r--r--public/500.html16
-rw-r--r--public/502.html16
-rw-r--r--public/503.html16
5 files changed, 76 insertions, 5 deletions
diff --git a/public/404.html b/public/404.html
index b3b3a0fa3f3..03e98e81862 100644
--- a/public/404.html
+++ b/public/404.html
@@ -57,6 +57,11 @@
.container {
margin: auto 20px;
}
+
+ .go-back {
+ display: none;
+ }
+
</style>
</head>
@@ -71,7 +76,16 @@
<hr />
<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>
- <a href="javascript:history.back()">Go back</a>
+ <a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
</div>
+ <script>
+ (function () {
+ var goBack = document.querySelector('.js-go-back');
+
+ if (history.length > 1) {
+ goBack.style.display = 'inline';
+ }
+ })();
+ </script>
</body>
</html>
diff --git a/public/422.html b/public/422.html
index 119e54ad8bd..49ebbe40f39 100644
--- a/public/422.html
+++ b/public/422.html
@@ -57,6 +57,11 @@
.container {
margin: auto 20px;
}
+
+ .go-back {
+ display: none;
+ }
+
</style>
</head>
@@ -71,7 +76,17 @@
<hr />
<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>
- <a href="javascript:history.back()">Go back</a>
+ <a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
</div>
+ <script>
+ (function () {
+ var goBack = document.querySelector('.js-go-back');
+
+ if (history.length > 1) {
+ goBack.style.display = 'inline';
+ }
+ })();
+
+ </script>
</body>
</html>
diff --git a/public/500.html b/public/500.html
index 226ef3c40ea..516920f7471 100644
--- a/public/500.html
+++ b/public/500.html
@@ -57,6 +57,11 @@
.container {
margin: auto 20px;
}
+
+ .go-back {
+ display: none;
+ }
+
</style>
</head>
@@ -71,7 +76,16 @@
<hr />
<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>
- <a href="javascript:history.back()">Go back</a>
+ <a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
</div>
+ <script>
+ (function () {
+ var goBack = document.querySelector('.js-go-back');
+
+ if (history.length > 1) {
+ goBack.style.display = 'inline';
+ }
+ })();
+ </script>
</body>
</html>
diff --git a/public/502.html b/public/502.html
index f037b81bace..189458c9816 100644
--- a/public/502.html
+++ b/public/502.html
@@ -57,6 +57,11 @@
.container {
margin: auto 20px;
}
+
+ .go-back {
+ display: none;
+ }
+
</style>
</head>
@@ -71,7 +76,16 @@
<hr />
<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>
- <a href="javascript:history.back()">Go back</a>
+ <a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
</div>
+ <script>
+ (function () {
+ var goBack = document.querySelector('.js-go-back');
+
+ if (history.length > 1) {
+ goBack.style.display = 'inline';
+ }
+ })();
+ </script>
</body>
</html>
diff --git a/public/503.html b/public/503.html
index f946a087871..b09b0e2a67e 100644
--- a/public/503.html
+++ b/public/503.html
@@ -57,6 +57,11 @@
.container {
margin: auto 20px;
}
+
+ .go-back {
+ display: none;
+ }
+
</style>
</head>
@@ -71,7 +76,16 @@
<hr />
<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>
- <a href="javascript:history.back()">Go back</a>
+ <a href="javascript:history.back()" class="js-go-back go-back">Go back</a>
</div>
+ <script>
+ (function () {
+ var goBack = document.querySelector('.js-go-back');
+
+ if (history.length > 1) {
+ goBack.style.display = 'inline';
+ }
+ })();
+ </script>
</body>
</html>