Skip to content
Snippets Groups Projects
Commit 16a4c92f authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'develop' into 'master'

[release] Regular merge of develop

See merge request !354
parents 5bf02a60 3e88baa0
No related branches found
No related tags found
2 merge requests!493update web IDE content,!354[release] Regular merge of develop
Pipeline #52840 passed with warnings
Showing
with 112 additions and 55 deletions
......@@ -29,13 +29,27 @@ def root_handbook(href):
return href
def root_lab(href):
# remove sym link reference in href
if ('lab-software' in href):
href = href.replace('lab-software', 'lab').strip()
elif ('lab-equipment' in href):
href = href.replace('lab-equipment', 'lab').strip()
elif ('lab-hsa' in href):
href = href.replace('lab-hsa', 'lab').strip()
return href
def build_section_start(title, shortcut):
title = title.replace("Gdpr", "GDPR")
title = title.replace("Handbook additional", "PI/Supervisor specifics")
title = title.replace("Handbook annexes", "Annexes")
title = title.replace("Handbook additional", "Handbook: PI/Supervisor specifics")
title = title.replace("Handbook annexes", "Handbook: Annexes")
title = title.replace("Covid 19", "COVID-19")
title = title.replace("Ppc", "PPC")
title = title.replace("Lab software", "Lab: Software")
title = title.replace("Lab equipment", "Lab: Equipment")
title = title.replace("Lab hsa", "Lab: Health & Safety, Access")
return f'\n\t<div class="index-box noborderbox" id="{shortcut}-card">\n\t\t<h3>{title}</h3>\n\t\t<ul>\n'
......@@ -133,6 +147,50 @@ def remove_header(localroot, root, filename):
return n
def generate_header(folder, permalink, shortcut, order, legacy_from):
header = "---\n"
if len(order) > 0:
header += "order: " + str(order) + "\n"
header += "layout: page\n"
header += "permalink: " + permalink + "\n"
header += "shortcut: " + root_handbook(shortcut) + "\n"
header += "redirect_from:\n"
header += " - /cards/" + shortcut + "\n"
header += " - /" + folder + "/cards/" + shortcut + "\n"
# special case of handbook
if "handbook-annexes" in permalink or "handbook-additional" in permalink:
header += " - /cards/" + root_handbook(shortcut) + "\n"
header += " - /" + folder + "/cards/" + root_handbook(shortcut) + "\n"
# separate lab section
if "lab-software" in permalink or "lab-equipment" in permalink or "lab-hsa" in permalink:
header += " - /cards/" + root_lab(shortcut) + "\n"
header += " - /" + folder + "/cards/" + root_lab(shortcut) + "\n"
# include the legacy section
if len(legacy_from) > 0:
for item in legacy_from:
header += str(item)
else:
header += "---"
return header
def generate_whitelist_entry(folder, permalink, shortcut):
wl_entry = permalink + "\n"
wl_entry += "/?" + shortcut + "\n"
wl_entry += "/cards/" + shortcut + "\n"
wl_entry += "/" + folder + "/cards/" + shortcut + "\n"
if "handbook-annexes" in permalink or "handbook-additional" in permalink:
wl_entry += "/cards/" + root_handbook(shortcut) + "\n"
wl_entry += "/" + folder + "/cards/" + root_handbook(shortcut) + "\n"
# separate lab section
if "lab-software" in permalink or "lab-equipment" in permalink or "lab-hsa" in permalink:
wl_entry += "/cards/" + root_lab(shortcut) + "\n"
wl_entry += "/" + folder + "/cards/" + root_lab(shortcut) + "\n"
return wl_entry
# loop through the entire internal tree
localroot = os.getcwd()
......@@ -214,14 +272,8 @@ for folder in cardDirs:
# replace the / with a :
shortcut = re.sub('/', ':', shortcut)
# define the header for each card
header = "---\n"
if len(order) > 0:
header += "order: " + str(order) + "\n"
# append the order of the card
# find the maximum of existing orders
# find the maximum of existing orders
if folderFlag:
if len(orderArr[indexS]) > 0:
maxOrder = max(orderArr[indexS])
......@@ -236,33 +288,11 @@ for folder in cardDirs:
else:
orderArr[indexS] = []
header += "layout: page\n"
header += "permalink: " + permalink + "\n"
header += "shortcut: " + root_handbook(shortcut) + "\n"
header += "redirect_from:\n"
header += " - /cards/" + shortcut + "\n"
header += " - /" + folder + "/cards/" + shortcut + "\n"
# special case of handbook
if "handbook-annexes" in permalink or "handbook-additional" in permalink:
header += " - /cards/" + root_handbook(shortcut) + "\n"
header += " - /" + folder + "/cards/" + root_handbook(shortcut) + "\n"
# include the legacy section
if len(legacy_from) > 0:
for item in legacy_from:
header += str(item)
else:
header += "---"
# generate the header for each card
header = generate_header(folder, permalink, shortcut, order, legacy_from)
# add autogenerated links to whitelist
whiteList += permalink + "\n"
whiteList += "/?" + shortcut + "\n"
whiteList += "/cards/" +shortcut + "\n"
whiteList += "/" + folder + "/cards/" + shortcut + "\n"
if "handbook-annexes" in permalink or "handbook-additional" in permalink:
whiteList += " - /cards/" + root_handbook(shortcut) + "\n"
whiteList += " - /" + folder + "/cards/" + root_handbook(shortcut) + "\n"
whiteList += generate_whitelist_entry(folder, permalink, shortcut)
# add the header properly speaking
line_prepender(fileName, header)
......
*.PNG filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
......
......@@ -23,13 +23,17 @@ window.boxHider = (function() {
function GetSelectedBoxElement(id) {
var allBoxesArray = GetAllBoxElementsArray();
var element = document.getElementById(id);
// note: handbook and lab are actually grouped sections
if (id.startsWith('handbook') || id.startsWith('lab')) {
return true;
} else {
var element = document.getElementById(id);
if (allBoxesArray.includes(element)) {
return element;
if (allBoxesArray.includes(element)) {
return element;
}
return false;
}
return false;
}
function HideElement(element) {
......@@ -84,6 +88,14 @@ window.boxHider = (function() {
ShowElement(box);
}
});
} else if (boxId.startsWith('lab')) {
allBoxes.map(function(box) {
if (!box.id.startsWith('lab')) {
HideElement(box);
} else {
ShowElement(box);
}
});
} else {
allBoxes.map(function(box) {
if (box != selectedBox) {
......
......@@ -93,21 +93,33 @@ order: -1
</ul>
</div>
<div class="index-box noborderbox" id="lab-card">
<h3>Lab</h3>
<div class="index-box noborderbox" id="lab-equipment-card">
<h3>Lab: Equipment</h3>
<ul>
<li><a href="{{ 'external/lab/book-lab-equipment' | relative_url }}">How to book a Lab Equipment in Quarks</a></li>
<li><a href="{{ 'external/lab/dishwasher-utilization-and-maintenance' | relative_url }}">Dishwasher utilization and maintenance</a></li>
<li><a href="{{ 'external/lab/handwashing' | relative_url }}">Handwashing</a></li>
<li><a href="{{ 'external/lab/lab-coats' | relative_url }}">Lab coats</a></li>
<li><a href="{{ 'external/lab/maintenance-of-fridges' | relative_url }}">Maintenance of fridges and freezers</a></li>
<li><a href="{{ 'external/lab/maintenance_of_cold_traps' | relative_url }}">Maintenance of cold traps </a></li>
<li><a href="{{ 'external/lab/personal-alert-safety-system' | relative_url }}">Personal alert safety system (PASS)</a></li>
<li><a href="{{ 'external/lab/quarks-general' | relative_url }}">Quarks - General information</a></li>
<li><a href="{{ 'external/lab/utilization-of-autoclaves' | relative_url }}">Utilization of autoclaves</a></li>
<li><a href="{{ 'external/lab/utilization-of-balances' | relative_url }}">Utilization of balances</a></li>
<li><a href="{{ 'external/lab/utilization-of-bsc' | relative_url }}">Utilization of BSC</a></li>
<li><a href="{{ 'external/lab/utilization-of-pH-meter' | relative_url }}">Utilization of pH meter</a></li>
<li><a href="{{ 'external/lab-equipment/dishwasher-utilization-and-maintenance' | relative_url }}">Dishwasher utilization and maintenance</a></li>
<li><a href="{{ 'external/lab-equipment/maintenance-of-fridges' | relative_url }}">Maintenance of fridges and freezers</a></li>
<li><a href="{{ 'external/lab-equipment/maintenance_of_cold_traps' | relative_url }}">Maintenance of cold traps </a></li>
<li><a href="{{ 'external/lab-equipment/utilization-of-autoclaves' | relative_url }}">Utilization of autoclaves</a></li>
<li><a href="{{ 'external/lab-equipment/utilization-of-balances' | relative_url }}">Utilization of balances</a></li>
<li><a href="{{ 'external/lab-equipment/utilization-of-bsc' | relative_url }}">Utilization of BSC</a></li>
<li><a href="{{ 'external/lab-equipment/utilization-of-pH-meter' | relative_url }}">Utilization of pH meter</a></li>
</ul>
</div>
<div class="index-box noborderbox" id="lab-hsa-card">
<h3>Lab: Health & Safety, Access</h3>
<ul>
<li><a href="{{ 'external/lab-hsa/handwashing' | relative_url }}">Handwashing</a></li>
<li><a href="{{ 'external/lab-hsa/lab-coats' | relative_url }}">Lab coats</a></li>
<li><a href="{{ 'external/lab-hsa/personal-alert-safety-system' | relative_url }}">Personal alert safety system (PASS)</a></li>
</ul>
</div>
<div class="index-box noborderbox" id="lab-software-card">
<h3>Lab: Software</h3>
<ul>
<li><a href="{{ 'external/lab-software/book-lab-equipment' | relative_url }}">How to book a Lab Equipment in Quarks</a></li>
<li><a href="{{ 'external/lab-software/quarks-general' | relative_url }}">Quarks - General information</a></li>
</ul>
</div>
......
---
layout: page
permalink: /external/lab/dishwasher-utilization-and-maintenance/
shortcut: lab:dishwasher-utilization-and-maintenance
permalink: /external/lab-equipment/dishwasher-utilization-and-maintenance/
shortcut: lab-equipment:dishwasher-utilization-and-maintenance
redirect_from:
- /cards/lab-equipment:dishwasher-utilization-and-maintenance
- /external/cards/lab-equipment:dishwasher-utilization-and-maintenance
- /cards/lab:dishwasher-utilization-and-maintenance
- /external/cards/lab:dishwasher-utilization-and-maintenance
---
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment