Commit 919e87c2 authored by Curtis Adam's avatar Curtis Adam

Setup a basic dropdown menu for display bonus transcript information

parent b69c5416
...@@ -1620,11 +1620,16 @@ $themes: ( ...@@ -1620,11 +1620,16 @@ $themes: (
} }
#collapseLearningPhaseInfoButton, #collapseManageButton { #collapseLearningPhaseInfoButton, #collapseManageButton {
background-color: $bonus_background ; background-color: $bonus_background;
color: $bonus_text; color: $bonus_text;
} }
#collapseLearningPhaseInfoButton:hover i, #collapseLearningPhaseInfoButton:focus i, #collapseManageButton:hover i, #collapseManageButton:focus i, #collapseCardsetInfoButton:hover i, #collapseCardsetInfoButton:focus i { #collapseBonusTranscriptInfoButton {
background-color: $transcript_bonus_info_background;
color: $transcript_bonus_info_text;
}
#collapseLearningPhaseInfoButton:hover i, #collapseLearningPhaseInfoButton:focus i, #collapseManageButton:hover i, #collapseManageButton:focus i, #collapseCardsetInfoButton:hover i, #collapseCardsetInfoButton:focus i, #collapseBonusTranscriptInfoButton:hover i, #collapseBonusTranscriptInfoButton:focus i {
color: $item_icon_hover !important; color: $item_icon_hover !important;
} }
......
...@@ -1090,6 +1090,9 @@ ...@@ -1090,6 +1090,9 @@
}, },
"cardset": { "cardset": {
"info": { "info": {
"title": {
"transcriptBonus": "Über die Bonusschreibphase"
},
"author": "Autor/in", "author": "Autor/in",
"multipleAuthors": "Mehrere", "multipleAuthors": "Mehrere",
"publisher": "Editor/in", "publisher": "Editor/in",
......
...@@ -1092,6 +1092,9 @@ ...@@ -1092,6 +1092,9 @@
}, },
"cardset": { "cardset": {
"info": { "info": {
"title": {
"transcriptBonus": "About the Bonus Writing Phase"
},
"author": "Autor/in", "author": "Autor/in",
"multipleAuthors": "Mehrere", "multipleAuthors": "Mehrere",
"publisher": "Editor/in", "publisher": "Editor/in",
......
...@@ -310,13 +310,7 @@ $padding-card-list-row: 8px; ...@@ -310,13 +310,7 @@ $padding-card-list-row: 8px;
font-size: 18px; font-size: 18px;
} }
#collapseCardsetInfoButton { #collapseCardsetInfoButton, #collapseLearningPhaseInfoButton, #collapseBonusTranscriptInfoButton {
float: none;
z-index: 50;
cursor: pointer;
}
#collapseLearningPhaseInfoButton {
float: none; float: none;
z-index: 50; z-index: 50;
cursor: pointer; cursor: pointer;
......
<template name="bonusTranscriptInfoBox">
<div id="collapseBonusTranscriptInfoButton" class="col-xs-12 card card-block collapseButton">
<strong>{{_ "cardset.info.title.transcriptBonus"}}</strong>
<i id="collapseBonusTranscriptInfoIcon" class="glyphicon glyphicon-collapse-down pull-right"></i>
</div>
<div class="collapse" id="collapseBonusTranscriptInfo">
<div class="card card-block">
<table class="table table-condensed table-striped table-hover infoBoxTable">
<tbody>
{{> cardsetInfoBoxItemBonusPointsFAQ}}
</tbody>
</table>
</div>
</div>
</template>
//------------------------ IMPORTS
import {Template} from "meteor/templating";
import {CardsetVisuals} from "../../../../api/cardsetVisuals";
import "./item/bonusActiveLearners.js";
import "./item/bonusButton.js";
import "./item/bonusDeadline.js";
import "./item/bonusEnd.js";
import "./item/bonusMaxPoints.js";
import "./item/bonusPointsFAQ.js";
import "./item/bonusRegistrationPeriod.js";
import "./item/bonusStart.js";
import "./item/bonusStatus.js";
import "./item/bonusWorkload.js";
import "./item/pomodoroBreakTime.js";
import "./item/pomodoroCount.js";
import "./item/pomodoroWorkTime.js";
import "./bonusTranscript.html";
/*
* ############################################################################
* bonusTranscriptInfoBox
* ############################################################################
*/
Template.bonusTranscriptInfoBox.events({
"click #collapseBonusTranscriptInfoButton": function (event) {
event.preventDefault();
CardsetVisuals.changeCollapseElement("#collapseBonusTranscriptInfo");
}
});
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="panel-body"> <div class="panel-body">
<div class="row markdeepCardset"> <div class="row markdeepCardset">
<div class="col-xs-12 {{#if <div class="col-xs-12 {{#if
canSeeBonusDropdown}}col-md-4{{else}}col-sm-6 col-md-8{{/if}} markdeepCardsetTitle"> canSeeBonusDropdown}}col-md-4{{else}}{{#if canSeeBonusTranscriptDropdown}}col-md-4{{else}}col-sm-6 col-md-8{{/if}}{{/if}} markdeepCardsetTitle">
<div class="cardsetTitleContainer"> <div class="cardsetTitleContainer">
<div class="cardsetLabels"> <div class="cardsetLabels">
{{> cardsetLabels}} {{> cardsetLabels}}
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
{{> bonusInfoBox}} {{> bonusInfoBox}}
</div> </div>
{{/if}} {{/if}}
{{#if canSeeBonusTranscriptDropdown}}
<div class="col-xs-12 col-sm-6 col-md-4 infoBox">
{{> bonusTranscriptInfoBox}}
</div>
{{/if}}
</div> </div>
<div class="row markdeepCardset markdeepCardsetContent"> <div class="row markdeepCardset markdeepCardsetContent">
<hr class="markdeepCardsetHeader"> <hr class="markdeepCardsetHeader">
......
...@@ -10,6 +10,7 @@ import {MarkdeepContent} from "../../../api/markdeep"; ...@@ -10,6 +10,7 @@ import {MarkdeepContent} from "../../../api/markdeep";
import "../navigation/navigation.js"; import "../navigation/navigation.js";
import "./box/cardset.js"; import "./box/cardset.js";
import "./box/bonus.js"; import "./box/bonus.js";
import "./box/bonusTranscript.js";
import "./info.html"; import "./info.html";
import {UserPermissions} from "../../../api/permissions"; import {UserPermissions} from "../../../api/permissions";
...@@ -54,6 +55,9 @@ Template.cardsetInfo.helpers({ ...@@ -54,6 +55,9 @@ Template.cardsetInfo.helpers({
}, },
canSeeBonusDropdown: function () { canSeeBonusDropdown: function () {
return this.learningActive && UserPermissions.canCreateContent(); return this.learningActive && UserPermissions.canCreateContent();
},
canSeeBonusTranscriptDropdown: function () {
return this.transcriptBonus !== undefined && this.transcriptBonus.enabled && UserPermissions.canCreateContent();
} }
}); });
......
...@@ -258,7 +258,7 @@ body { ...@@ -258,7 +258,7 @@ body {
text-transform: unset !important; text-transform: unset !important;
} }
.btn-success, .btn-danger, .btn-warning, .btn-info, .label-bonus, .learnBtn, .bonusBtn, .presentationBtn, .label-private, .label-edu, .label-free, .label-pro, #filter-nav-wrapper .navbar-text, #filter-nav-wrapper .dropdown-toggle, .panel-heading.info-tab, #collapseLearningPhaseInfoButton, .deleteAllCardsBtn, .newCardBtn, .markdeep-help, .markdeep-translate.pressed, .pomodoroTimer h2, #searchResults h4, .footer.icon-container .glyphicon { .btn-success, .btn-danger, .btn-warning, .btn-info, .label-bonus, .learnBtn, .bonusBtn, .presentationBtn, .label-private, .label-edu, .label-free, .label-pro, #filter-nav-wrapper .navbar-text, #filter-nav-wrapper .dropdown-toggle, .panel-heading.info-tab, #collapseLearningPhaseInfoButton, #collapseBonusTranscriptInfoButton, .deleteAllCardsBtn, .newCardBtn, .markdeep-help, .markdeep-translate.pressed, .pomodoroTimer h2, #searchResults h4, .footer.icon-container .glyphicon {
text-shadow: $default_text_shadow; text-shadow: $default_text_shadow;
} }
......
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