Skip to content

Commit 5271b7c

Browse files
authored
Merge pull request #63898 from gabriel-rh/RHDEVDOCS_5358-add-versions-history-bugs
RHDEVDOCS-5358 Add versions, history, JIRA bug link got GitOps
2 parents 23e8a47 + ea89179 commit 5271b7c

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

_templates/_page_openshift.html.erb

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747

4848
unsupported_versions_serverless = [];
4949

50+
unsupported_versions_gitops = [];
51+
5052
unsupported_versions_origin = ["3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.9", "3.10", "3.11", "4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", "4.10", "4.11", "4.12"];
5153

5254
%>
@@ -99,6 +101,16 @@
99101

100102
<% end %>
101103

104+
<% if ((unsupported_versions_gitops.include? version) && (distro_key == "openshift-gitops")) %>
105+
106+
<span>
107+
<div class="alert alert-danger" role="alert" id="support-alert">
108+
<strong>You are viewing documentation for a release that is no longer maintained.</strong> To view the documentation for the most recent version, see the <a href="https://docs.openshift.com/gitops/latest/gitops-release-notes.html" style="color: #545454 !important" class="link-primary">latest GitOps docs</a>.
109+
</div>
110+
</span>
111+
112+
<% end %>
113+
102114
<% if ((unsupported_versions_origin.include? version) && (distro_key == "openshift-origin")) %>
103115

104116
<span>
@@ -176,6 +188,14 @@
176188
<option value="1.29">1.29</option>
177189
<option value="1.28">1.28</option>
178190
</select>
191+
<% elsif (distro_key == "openshift-gitops") %>
192+
<a href="https://docs.openshift.com/gitops/<%= version %>/gitops-release-notes.html">
193+
<%= distro %>
194+
</a>
195+
<select id="version-selector" onchange="versionSelector(this);">
196+
<option value="1.9">1.9</option>
197+
<option value="1.8">1.8</option>
198+
</select>
179199
<% elsif (distro_key == "openshift-origin") %>
180200
<a href="https://docs.okd.io/<%= version %>/welcome/index.html">
181201
<%= distro %>
@@ -208,7 +228,7 @@
208228
<li class="hidden-xs active">
209229
<%= breadcrumb_topic %>
210230
</li>
211-
<% if (distro_key != "openshift-origin" && distro_key != "openshift-aro" && distro_key != "openshift-acs" && distro_key != "openshift-serverless") %>
231+
<% if (distro_key != "openshift-origin" && distro_key != "openshift-aro" && distro_key != "openshift-acs" && distro_key != "openshift-serverless" && distro_key != "openshift-gitops") %>
212232
<span text-align="right" style="float: right !important">
213233
<a href="https://github.com/openshift/openshift-docs/commits/<%=
214234
((distro_key == "openshift-enterprise") ? "enterprise-#{version}"
@@ -272,6 +292,23 @@
272292
<% end %>
273293
</span>
274294
<% end %>
295+
<% elsif (distro_key == "openshift-gitops") %>
296+
<span text-align="right" style="float: right !important">
297+
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-gitops") ? "gitops-docs-#{version}" : "gitops-docs" %>/<%= repo_path %>">
298+
<span class="material-icons-outlined" title="Page history">history
299+
</span>
300+
</a>
301+
<% unless (unsupported_versions_gitops.include? version) %>
302+
<a href="https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12317820&issuetype=1&components=12342156&priority=4&summary=<%= "[gitops-docs-#{version}]+Issue+in+file+#{repo_path}"%>">
303+
<span class="material-icons-outlined" title="Open an issue">bug_report
304+
</span>
305+
</a>
306+
<a href="javascript: void(0);" onclick="window.print()">
307+
<span class="material-icons-outlined" title="Print page (Save as PDF)">picture_as_pdf</span>
308+
</a>
309+
<% end %>
310+
</span>
311+
<% end %>
275312
</ol>
276313
<div class="row row-offcanvas row-offcanvas-left">
277314
<div class="col-xs-8 col-sm-3 col-md-3 sidebar sidebar-offcanvas hide-for-print">
@@ -351,7 +388,8 @@
351388
'openshift-aro' : ['docs_aro', version],
352389
'openshift-rosa' : ['docs_rosa'],
353390
'openshift-acs' : ['docs_acs', version],
354-
'openshift-serverless' : ['docs_serverless', version]
391+
'openshift-serverless' : ['docs_serverless', version],
392+
'openshift-gitops' : ['docs_gitops', version]
355393
};
356394

357395
// only OSD v3 docs have the version variable specified

0 commit comments

Comments
 (0)