diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-23 16:44:20 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-23 16:44:20 +0300 |
commit | e701ed398ab9b2ac252742a056ec4c232ff75a71 (patch) | |
tree | a4f31395e39a033a223c820bd1c17f9a3072e727 /layouts/footer.html | |
parent | e3984c342e48ab8de7d78965c8d5a48174f9d8d9 (diff) |
Hide Edit button from archives, show only on master
Diffstat (limited to 'layouts/footer.html')
-rw-r--r-- | layouts/footer.html | 3 |
1 files changed, 3 insertions, 0 deletions
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> |