Skip to content

Commit 80bee0c

Browse files
authored
Merge pull request #64782 from mramendi/pipelines-version-selector
RHDEVDOCS 5444 add version selection for Pipelines
2 parents 3327920 + eea1e93 commit 80bee0c

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>
@@ -191,6 +205,14 @@
191205
<option value="1.29">1.29</option>
192206
<option value="1.28">1.28</option>
193207
</select>
208+
<% elsif (distro_key == "openshift-pipelines") %>
209+
<a href="https://docs.openshift.com/pipelines/<%= version %>/about/understanding-openshift-pipelines.html">
210+
<%= distro %>
211+
</a>
212+
<select id="version-selector" onchange="versionSelector(this);">
213+
<option value="1.11">1.11</option>
214+
<option value="1.10">1.10</option>
215+
</select>
194216
<% elsif (distro_key == "openshift-gitops") %>
195217
<a href="https://docs.openshift.com/gitops/<%= version %>/gitops-release-notes.html">
196218
<%= distro %>
@@ -238,7 +260,7 @@
238260
<li class="hidden-xs active">
239261
<%= breadcrumb_topic %>
240262
</li>
241-
<% if (distro_key != "openshift-origin" && distro_key != "openshift-aro" && distro_key != "openshift-acs" && distro_key != "openshift-serverless" && distro_key != "openshift-gitops") %>
263+
<% 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") %>
242264
<span text-align="right" style="float: right !important">
243265
<a href="https://github.com/openshift/openshift-docs/commits/<%=
244266
((distro_key == "openshift-enterprise") ? "enterprise-#{version}"
@@ -303,6 +325,22 @@
303325
</a>
304326
<% end %>
305327
</span>
328+
<% elsif (distro_key == "openshift-pipelines") %>
329+
<span text-align="right" style="float: right !important">
330+
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-pipelines") ? "pipelines-docs-#{version}" : "pipelines-docs" %>/<%= repo_path %>">
331+
<span class="material-icons-outlined" title="Page history">history
332+
</span>
333+
</a>
334+
<% unless (unsupported_versions_pipelines.include? version) %>
335+
<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}"%>">
336+
<span class="material-icons-outlined" title="Open an issue">bug_report
337+
</span>
338+
</a>
339+
<a href="javascript: void(0);" onclick="window.print()">
340+
<span class="material-icons-outlined" title="Print page (Save as PDF)">picture_as_pdf</span>
341+
</a>
342+
<% end %>
343+
</span>
306344
<% elsif (distro_key == "openshift-gitops") %>
307345
<span text-align="right" style="float: right !important">
308346
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-gitops") ? "gitops-docs-#{version}" : "gitops-docs" %>/<%= repo_path %>">
@@ -401,6 +439,7 @@
401439
'openshift-rosa' : ['docs_rosa'],
402440
'openshift-acs' : ['docs_acs', version],
403441
'openshift-serverless' : ['docs_serverless', version],
442+
'openshift-pipelines' : ['docs_pipelines', version],
404443
'openshift-gitops' : ['docs_gitops', version]
405444
};
406445

0 commit comments

Comments
 (0)