mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
updates to templates to support lvl 3
This commit is contained in:
@@ -7,9 +7,16 @@
|
||||
<%# topic_group[:id] %>
|
||||
<%# topic_id %>
|
||||
|
||||
<!-- group_id is the one that is user selected. topic_group[id] is what we are parsing via navigation -->
|
||||
|
||||
<%- current_group = topic_group[:id] == group_id -%>
|
||||
<li class="nav-header">
|
||||
|
||||
<%# current_group %>
|
||||
<%# topic_group[:id] %>
|
||||
<%# group_id %>
|
||||
|
||||
|
||||
<a class="" href="javascript:void(0);" data-toggle="collapse" data-target="#topicGroup<%= groupidx %>">
|
||||
<span id="tgSpan<%= groupidx %>" class="fa <%= current_group ? 'fa-angle-down' : 'fa-angle-right' %>"></span>
|
||||
<%= topic_group[:name] %>
|
||||
@@ -69,11 +76,12 @@
|
||||
<%# topic_id %>
|
||||
|
||||
<%- if not subtopic.has_key?(:topics) -%>
|
||||
|
||||
<!-- is this is a single page? That is, does this topic have more topics?
|
||||
Welcome 2 Index Page and Welcome 2 More -->
|
||||
|
||||
<%- current_subtopic = current_group && current_subgroup && (subtopic[:id] == topic_id) %>
|
||||
|
||||
|
||||
<li>
|
||||
<a class="<%= current_subtopic ? ' active' : '' %>" href="<%= subtopic_shim %><%= subtopic[:path] %>">
|
||||
<%= subtopic[:name] %>
|
||||
@@ -84,19 +92,23 @@
|
||||
|
||||
<!-- Welcome 3 -->
|
||||
|
||||
<%- current_subsubgroup = subtopic[:id] == subgroup_id -%>
|
||||
<%- current_subsubgroup = subtopic[:id] == subsubgroup_id -%>
|
||||
|
||||
<%# subsubgroup_id %>
|
||||
<%# subtopic[:id] %>
|
||||
<%# current_subsubgroup %>
|
||||
|
||||
<li class="nav-header">
|
||||
<a class="" href="javascript:void(0);" data-toggle="collapse" data-target="#topicSubSubGroup-<%= groupidx %>-<%= topicidx %>">
|
||||
<span id="sgSpan-<%= groupidx %>-<%= topicidx %>" class="fa <%= current_subsubgroup ? 'fa-caret-down' : 'fa-caret-right' %>"></span>
|
||||
<span id="ssgSpan-<%= groupidx %>-<%= topicidx %>" class="fa <%= current_subsubgroup ? 'fa-caret-down' : 'fa-caret-right' %>"></span>
|
||||
<%= subtopic[:name] %>
|
||||
</a>
|
||||
<ul id="topicSubSubGroup-<%= groupidx %>-<%= topicidx %>" class="nav-tertiary list-unstyled collapse<%= current_subsubgroup ? ' in' : '' %>">
|
||||
<%- subtopic[:topics].each do |subsubtopic| -%>
|
||||
|
||||
<!-- list all topics within Welcome 3 here. Note that we are not coding this for more subtopics here -->
|
||||
<%- current_subsubtopic = current_group && current_subgroup && current_subsubgroup && (subtopic[:id] == topic_id) %>
|
||||
<%- current_subsubtopic = current_group && current_subgroup && current_subsubgroup && (subsubtopic[:id] == topic_id) %>
|
||||
|
||||
<li>
|
||||
<a class="<%= current_subsubtopic ? ' active' : '' %>" href="<%= subtopic_shim %><%= subsubtopic[:path] %>" style="padding-left: 70px;">
|
||||
<%= subsubtopic[:name] %>
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<li class="hidden-xs active">
|
||||
<%= breadcrumb_topic %>
|
||||
</li>
|
||||
|
||||
<% if (distro_key != "openshift-origin") %>
|
||||
<span text-align="right" style="float: right !important">
|
||||
<a href="https://github.com/openshift/openshift-docs/commits/enterprise-<%= (distro_key == "openshift-enterprise") ? version : ((distro_key == "openshift-dedicated") ? "3.11" : "3.11") %>/<%= repo_path %>">
|
||||
@@ -113,7 +114,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render("_templates/_nav_openshift.html.erb", :distro_key => distro_key, :navigation => navigation, :group_id => group_id, :topic_id => topic_id, :subgroup_id => subgroup_id, :subtopic_shim => subtopic_shim) %>
|
||||
<%= render("_templates/_nav_openshift.html.erb", :distro_key => distro_key, :navigation => navigation, :group_id => group_id, :topic_id => topic_id, :subgroup_id => subgroup_id, :subtopic_shim => subtopic_shim, :subsubgroup_id => subsubgroup_id) %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-9 col-md-9 main">
|
||||
<div class="page-header">
|
||||
@@ -181,6 +182,13 @@
|
||||
$("[id^='topicSubGroup']").on('hide.bs.collapse', function () {
|
||||
$(this).parent().find("[id^='sgSpan']").toggleClass("fa-caret-right fa-caret-down");
|
||||
});
|
||||
$("[id^='topicSubSubGroup']").on('show.bs.collapse', function () {
|
||||
$(this).parent().find("[id^='ssgSpan']").toggleClass("fa-caret-right fa-caret-down");
|
||||
});
|
||||
$("[id^='topicSubSubGroup']").on('hide.bs.collapse', function () {
|
||||
$(this).parent().find("[id^='ssgSpan']").toggleClass("fa-caret-right fa-caret-down");
|
||||
});
|
||||
|
||||
});
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
<%= render((distro_key['atomic'] ? "_templates/_page_atomic.html.erb" : "_templates/_page_openshift.html.erb"),
|
||||
<%
|
||||
# Asciibinder doesn't set subgroups for multi groups (more than 2). So this
|
||||
# hack sets it here based on the topic id, which is of the form:
|
||||
# Welcome1::Welcome2::Welcome3::Welcome3TopicTitle
|
||||
|
||||
if topic_id.scan(/::/).length == 3
|
||||
topics = topic_id.split("::")
|
||||
subgroup_id = topics[0] + "::" + topics[1]
|
||||
subsubgroup_id = topics[0] + "::" + topics[1] + "::" + topics[2]
|
||||
# TO DO if breadcrumbs become an issue
|
||||
breadcrumb_subsubgroup_block = ""
|
||||
breadcrumb_topic = topic_title
|
||||
end
|
||||
%>
|
||||
|
||||
<%= render("_templates/_page_openshift.html.erb",
|
||||
:distro_key => distro_key,
|
||||
:distro => distro,
|
||||
:version => version,
|
||||
@@ -6,6 +21,7 @@
|
||||
:group_id => group_id,
|
||||
:group_title => group_title,
|
||||
:subgroup_id => subgroup_id,
|
||||
:subsubgroup_id => subsubgroup_id,
|
||||
:subgroup_title => subgroup_title,
|
||||
:topic_id => topic_id,
|
||||
:topic_title => topic_title,
|
||||
@@ -20,6 +36,7 @@
|
||||
:breadcrumb_group => breadcrumb_group,
|
||||
:breadcrumb_root => breadcrumb_root,
|
||||
:breadcrumb_subgroup_block => breadcrumb_subgroup_block,
|
||||
:breadcrumb_subsubgroup_block => breadcrumb_subsubgroup_block,
|
||||
:breadcrumb_topic => breadcrumb_topic,
|
||||
:subtopic_shim => subtopic_shim,
|
||||
:repo_path => repo_path) %>
|
||||
|
||||
Reference in New Issue
Block a user