diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-23 20:13:37 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-23 20:13:37 +0300 |
commit | 715c566932b3414857982562b9af106eb05f7250 (patch) | |
tree | ed1a61bc2944286ef06dcd0252698b005db07742 /layouts | |
parent | 9f897d17acfc978234767aaa595dee0ca05004e5 (diff) | |
parent | 17b3ff21a79a3e52c6ac11e9d4d1bbd7466a9bbd (diff) |
Merge branch 'versions_round_two' into 'master'
Versions round two
See merge request gitlab-com/gitlab-docs!220
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/default.html | 3 | ||||
-rw-r--r-- | layouts/disqus.html | 3 | ||||
-rw-r--r-- | layouts/footer.html | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/layouts/default.html b/layouts/default.html index d09455d9..b08da70f 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -43,9 +43,12 @@ <div class="article-content js-article-content"> <%= yield %> </div> + <% if ENV['NANOC_ENV'] == 'production' && ENV['CI_COMMIT_REF_NAME'] == 'master' %> + <%# Show Edit button only in production and on master branch (hide archives) %> <div class="edit-on"> <%= edit_on_gitlab(@item) %> </div> + <% end %> <% if @item[:last_updated] %> <hr> <p class="last-updated"> diff --git a/layouts/disqus.html b/layouts/disqus.html index 34a0b578..3c6eff15 100644 --- a/layouts/disqus.html +++ b/layouts/disqus.html @@ -1,4 +1,5 @@ -<% if @item[:comments].nil? && ENV['NANOC_ENV'] == 'production' %> +<%# Show comments only in production and on master branch (hide archives) %> +<% if @item[:comments].nil? && ENV['NANOC_ENV'] == 'production' && ENV['CI_COMMIT_REF_NAME'] == 'master' %> <% unless @item.identifier.to_s.split('/')[1] == 'ce' %> <div class="comments"> <p><em>Leave a comment below if you have any feedback on the documentation. For support and other enquiries, see <a href="https://about.gitlab.com/getting-help/" target="_blank">getting help</a>.</em></p> diff --git a/layouts/footer.html b/layouts/footer.html index 8212535d..384a4393 100644 --- a/layouts/footer.html +++ b/layouts/footer.html @@ -2,9 +2,12 @@ <%= render '/footer_links.*' %> <div class='animated text-center source-link'> <a href='https://gitlab.com/gitlab-com/gitlab-docs' target='_blank'>Created</a> with Nanoc, hosted on <a href='https://about.gitlab.com/features/pages/' target='_blank'>GitLab Pages</a> + <% if ENV['NANOC_ENV'] == 'production' && ENV['CI_COMMIT_REF_NAME'] == 'master' %> + <%# Show Edit button only in production and on master branch (hide archives) %> <div class="edit-on"> <i class="fa fa-code-fork" aria-hidden="true"></i> <%= edit_on_gitlab(@item) %> </div> + <% end %> </div> </footer> |