Skip to content

Commit eea1e93

Browse files
committed
RHDEVDOCS 5444 add version selection for Pipelines
1 parent 35d5e36 commit eea1e93

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

_templates/_page_openshift.html.erb

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

4949
unsupported_versions_serverless = [];
5050

51+
unsupported_versions_pipelines = [];
52+
5153
unsupported_versions_gitops = [];
5254

5355
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"];
@@ -102,6 +104,18 @@
102104

103105
<% end %>
104106

107+
108+
<% if ((unsupported_versions_pipelines.include? version) && (distro_key == "openshift-pipelines")) %>
109+
110+
<span>
111+
<div class="alert alert-danger" role="alert" id="support-alert">
112+
<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/pipelines/latest/about/understanding-openshift-pipelines.html" style="color: #545454 !important" class="link-primary">latest Pipelines docs</a>.
113+
</div>
114+
</span>
115+
116+
<% end %>
117+
118+
105119
<% if ((unsupported_versions_gitops.include? version) && (distro_key == "openshift-gitops")) %>
106120

107121
<span>
@@ -189,6 +203,14 @@
189203
<option value="1.29">1.29</option>
190204
<option value="1.28">1.28</option>
191205
</select>
206+
<% elsif (distro_key == "openshift-pipelines") %>
207+
<a href="https://docs.openshift.com/pipelines/<%= version %>/about/understanding-openshift-pipelines.html">
208+
<%= distro %>
209+
</a>
210+
<select id="version-selector" onchange="versionSelector(this);">
211+
<option value="1.11">1.11</option>
212+
<option value="1.10">1.10</option>
213+
</select>
192214
<% elsif (distro_key == "openshift-gitops") %>
193215
<a href="https://docs.openshift.com/gitops/<%= version %>/gitops-release-notes.html">
194216
<%= distro %>
@@ -236,7 +258,7 @@
236258
<li class="hidden-xs active">
237259
<%= breadcrumb_topic %>
238260
</li>
239-
<% if (distro_key != "openshift-origin" && distro_key != "openshift-aro" && distro_key != "openshift-acs" && distro_key != "openshift-serverless" && distro_key != "openshift-gitops") %>
261+
<% if (distro_key != "openshift-origin" && distro_key != "openshift-aro" && distro_key != "openshift-acs" && distro_key != "openshift-serverless" && distro_key != "openshift-gitops" && distro_key != "openshift-pipelines") %>
240262
<span text-align="right" style="float: right !important">
241263
<a href="https://github.com/openshift/openshift-docs/commits/<%=
242264
((distro_key == "openshift-enterprise") ? "enterprise-#{version}"
@@ -301,6 +323,22 @@
301323
</a>
302324
<% end %>
303325
</span>
326+
<% elsif (distro_key == "openshift-pipelines") %>
327+
<span text-align="right" style="float: right !important">
328+
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-pipelines") ? "pipelines-docs-#{version}" : "pipelines-docs" %>/<%= repo_path %>">
329+
<span class="material-icons-outlined" title="Page history">history
330+
</span>
331+
</a>
332+
<% unless (unsupported_versions_pipelines.include? version) %>
333+
<a href="https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12317820&issuetype=1&components=12332358&priority=4&summary=<%= "[pipelines-docs-#{version}]+Issue+in+file+#{repo_path}"%>">
334+
<span class="material-icons-outlined" title="Open an issue">bug_report
335+
</span>
336+
</a>
337+
<a href="javascript: void(0);" onclick="window.print()">
338+
<span class="material-icons-outlined" title="Print page (Save as PDF)">picture_as_pdf</span>
339+
</a>
340+
<% end %>
341+
</span>
304342
<% elsif (distro_key == "openshift-gitops") %>
305343
<span text-align="right" style="float: right !important">
306344
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-gitops") ? "gitops-docs-#{version}" : "gitops-docs" %>/<%= repo_path %>">
@@ -399,6 +437,7 @@
399437
'openshift-rosa' : ['docs_rosa'],
400438
'openshift-acs' : ['docs_acs', version],
401439
'openshift-serverless' : ['docs_serverless', version],
440+
'openshift-pipelines' : ['docs_pipelines', version],
402441
'openshift-gitops' : ['docs_gitops', version]
403442
};
404443

0 commit comments

Comments
 (0)