Commit d25efa41 authored by Curtis Adam's avatar Curtis Adam

Don't display the lecturer authorized label on all cardsets and move the label into the config

parent 026fe5d1
......@@ -48,4 +48,13 @@ export let Icons = class Icons {
return config.topNavigation.displayMode.list;
}
}
static labels (type) {
switch (type) {
case "lecturerAuthorized":
return config.labels.lecturerAuthorized;
default:
return "";
}
}
};
......@@ -54,6 +54,10 @@ let topNavigation = {
}
};
let labels = {
"lecturerAuthorized": "<i class='fa fa-graduation-cap'></i>"
};
//Only used for the active route display on mobile. Will be carried over to desktop after the main template got refactored.
let miscNavigation = {
"cardset": "<i class='fa fa-archive'></i>&nbsp;",
......@@ -86,5 +90,6 @@ module.exports = {
miscNavigation,
landingPageNavigation,
aspectRatio,
useCasesIcons
useCasesIcons,
labels
};
......@@ -395,8 +395,8 @@ Template.registerHelper("getBonusLabel", function (shuffled = false) {
});
Template.registerHelper("getLecturerAuthorizedLabel", function (cardset) {
if (cardset.lecturerAuthorized !== undefined) {
return '<span class="label label-lecturer-authorized" data-id="lecturer-authorized" title="' + TAPi18n.__('label.lecturerAuthorized.long') + '"><i class="fa fa-graduation-cap"></i></span>';
if (cardset.lecturerAuthorized !== undefined && cardset.lecturerAuthorized === true) {
return '<span class="label label-lecturer-authorized" data-id="lecturer-authorized" title="' + TAPi18n.__('label.lecturerAuthorized.long') + '">' + Icons.labels("lecturerAuthorized") + '</span>';
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment