GitLab steht Mittwoch, den 08. Juli, zwischen 09:00 und 13:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit 3090128e authored by Curtis Adam's avatar Curtis Adam

Differentiate between learning bonus and writing bonus in the red label

parent 581a7e9e
......@@ -67,6 +67,8 @@ $themes: (
$shuffled_text: map-get($map, "shuffled_text");
$bonus_background: map-get($map, "bonus_background");
$bonus_text: map-get($map, "bonus_text");
$bonus_transcript_background: map-get($map, "bonus_transcript_background");
$bonus_transcript_text: map-get($map, "bonus_transcript_text");
$card_type_background: map-get($map, "card_type_background");
$card_type_text: map-get($map, "card_type_text");
$button_background_hover: map-get($map, "button_background_hover");
......@@ -2695,6 +2697,11 @@ $themes: (
color: $bonus_text !important;
}
.label-transcript-bonus {
background-color: $bonus_transcript_background !important;
color: $bonus_transcript_text !important;
}
.label-card-type {
background-color: $card_type_background !important;
color: $card_type_text !important;
......
......@@ -102,6 +102,8 @@
"shuffled_text": white,
"bonus_background": $thm_red,
"bonus_text": $white,
"bonus_transcript_background": $thm_orange,
"bonus_transcript_text": $white,
"card_type_background": darkviolet,
"card_type_text": white,
"button_background_hover": $button_background_hover,
......
......@@ -1156,6 +1156,10 @@
"long": "Bonus-Lernphase",
"short": "Lern-Bonus"
},
"transcriptBonus": {
"long": "Mitschreib-Bonus",
"short": "Mitschreib-Bonus"
},
"list": {
"back": " Zurück zur Karte"
}
......
......@@ -1158,6 +1158,10 @@
"long": "Bonus-Lernphase",
"short": "Bonus"
},
"transcriptBonus": {
"long": "Mitschreib-Bonus",
"short": "Mitschreib-Bonus"
},
"list": {
"back": " Zurück zur Karte"
}
......
......@@ -449,7 +449,8 @@ Meteor.methods({
quantity: 1,
cardType: 1,
difficulty: 1,
learningActive: 1
learningActive: 1,
transcriptBonus: 1
}
}).fetch();
}
......
......@@ -384,6 +384,12 @@ Template.registerHelper("getBonusLabel", function (shuffled = false) {
}
});
Template.registerHelper("getTranscriptBonusLabel", function (cardset) {
if (cardset.transcriptBonus !== undefined && cardset.transcriptBonus.enabled) {
return '<span class="label label-transcript-bonus" data-id="bonus-transcript" title="' + TAPi18n.__('cardset.transcriptBonus.long') + '">' + TAPi18n.__('cardset.transcriptBonus.short') + '</span>';
}
});
Template.registerHelper("getCardsetIcons", function (isShuffled) {
if (isShuffled) {
return "<i class='fa fa-archive'></i>&nbsp;<i class='fa fa-archive'></i>&nbsp;<i class='fa fa-archive'></i>&nbsp;<i class='fa fa-ellipsis-h'></i>&nbsp;";
......
......@@ -9,6 +9,7 @@
{{{getKind this.kind 0}}}
{{{getShuffleLabel this.shuffled}}}
{{{getBonusLabel this.learningActive}}}
{{{getTranscriptBonusLabel this}}}
{{#unless this.shuffled}}
{{{getCardTypeLabel this.cardType}}}
{{{getDifficultyLabel this.cardType this.difficulty}}}
......
......@@ -44,16 +44,16 @@
this.dateUpdated}}</span>
</div>
<div class="resultItemHeader resultItemHeaderRightArea collapseButton col-xs-12 col-sm-3">
<div class="resultItemHeaderRightAreaTop col-xs-6 col-sm-12">
<div class="resultItemHeaderRightAreaTop col-xs-9 col-sm-12">
{{{getCardTypeLabel this.cardType}}}
</div>
<div class="resultItemHeaderRightAreaBottom col-xs-6 col-sm-12">
<div class="resultItemHeaderRightAreaBottom col-xs-3 col-sm-12">
{{#unless isCardsetTranscriptBonusRoute}}
<a class="resultNavigationElement editCard hidden-xs" {{disableIfOffline}}
title='{{_ "transcriptForm.index.tooltip.edit"}}' data-id="{{this._id}}">
<i class="glyphicon glyphicon-edit" data-id="{{this._id}}"></i>
</a>
<a class="resultNavigationElement deleteCard" {{disableIfOffline}}
<a class="resultNavigationElement deleteCard hidden-xs" {{disableIfOffline}}
title='{{_ "transcriptForm.index.tooltip.delete"}}' data-toggle="modal" data-target="#deleteTranscriptModal" data-id="{{this._id}}">
<i class="result fa fa-trash" data-id="{{this._id}}"></i>
</a>
......
......@@ -120,12 +120,13 @@
</div>
{{/if}}
<div class="resultItemHeader resultItemHeaderRightArea collapseButton col-xs-12 col-sm-3">
<div class="resultItemHeaderRightAreaTop col-xs-6 col-sm-12">
<div class="resultItemHeaderRightAreaTop col-xs-9 col-sm-12">
{{{getKind this.kind 0}}}
{{{getShuffleLabel this.shuffled}}}
{{{getBonusLabel this.learningActive}}}
{{{getTranscriptBonusLabel this}}}
</div>
<div class="resultItemHeaderRightAreaBottom col-xs-6 col-sm-12">
<div class="resultItemHeaderRightAreaBottom col-xs-3 col-sm-12">
{{#unless isSelectingCardsetToLearn}}
{{#if gotBonus this.learningActive}}
{{#if isCardsetOwner this._id}}
......@@ -172,7 +173,7 @@
</a>
{{#if isNotPublicItemView}}
{{#if isAdmin}}
<a class="resultNavigationElement editAdminCardset"
<a class="resultNavigationElement editAdminCardset hidden-xs"
title='{{_ "cardset.tooltip.editAdminSettings"}}' data-id="{{this._id}}"
data-toggle="modal"
data-target="#setCardsetFormAdminModal">
......@@ -186,7 +187,7 @@
<i class="glyphicon glyphicon-plus editShuffle" data-id="{{this._id}}"></i>
</a>
{{/if}}
<a class="resultNavigationElement deleteCardset" {{disableIfOffline}}
<a class="resultNavigationElement deleteCardset hidden-xs" {{disableIfOffline}}
title='{{_ "courseIteration.confirm-form-delete.title"}}' data-toggle="modal"
data-target="#confirmDeleteCardsetModal"
data-id="{{this._id}}">
......
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