mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
use javascript variable for repo_primary_branch
This commit is contained in:
parent
bd3b708a27
commit
8e79a8df27
2 changed files with 3 additions and 2 deletions
3
doc/_themes/saltstack2/layout.html
vendored
3
doc/_themes/saltstack2/layout.html
vendored
|
@ -52,7 +52,8 @@
|
|||
SEARCH_CX: '{{ search_cx }}',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
|
||||
HAS_SOURCE: '{{ has_source|lower }}'
|
||||
HAS_SOURCE: '{{ has_source|lower }}',
|
||||
REPO_PRIMARY_BRANCH_TAB_NAME: '{{ repo_primary_branch | capitalize }}'
|
||||
};
|
||||
</script>
|
||||
{%- for scriptfile in script_files %}
|
||||
|
|
|
@ -125,7 +125,7 @@ $( document ).ready(function() {
|
|||
window.location.href = window.location.href.replace($currentVer.attr("href"), clickedVer);
|
||||
}
|
||||
else {
|
||||
if ($currentVer.text().indexOf("{{ repo_primary_branch | capitalize }}") == -1) {
|
||||
if ($currentVer.text().indexOf(DOCUMENTATION_OPTIONS.REPO_PRIMARY_BRANCH_TAB_NAME) == -1) {
|
||||
window.location.href = clickedVer + "topics/releases/" + $currentVer.text().trim() + ".html";
|
||||
}
|
||||
else window.location.href = clickedVer + "topics/releases/";
|
||||
|
|
Loading…
Add table
Reference in a new issue