Commit 8cfaf747 authored by Curtis Adam's avatar Curtis Adam

Display the transcript author and lecture date for reviewers

parent c266458d
......@@ -741,7 +741,7 @@ Router.route('/presentation/transcripts/bonus/:card_id', {
name: 'presentationTranscriptBonus',
template: 'presentation',
subscriptions: function () {
return [Meteor.subscribe('transcriptCard', this.params.card_id), Meteor.subscribe('myTranscriptBonus'), Meteor.subscribe('cardsetsTranscripts')];
return [Meteor.subscribe('transcriptCard', this.params.card_id), Meteor.subscribe('myTranscriptBonus'), Meteor.subscribe('cardsetTranscriptBonus', this.params._id)];
},
data: function () {
if (ServerStyle.gotTranscriptsEnabled()) {
......@@ -765,7 +765,7 @@ Router.route('/presentation/transcripts/bonus/:_id/:card_id', {
name: 'presentationTranscriptBonusCardset',
template: 'presentation',
subscriptions: function () {
return [Meteor.subscribe('cardset', this.params._id), Meteor.subscribe('transcriptCard', this.params.card_id)];
return [Meteor.subscribe('cardset', this.params._id), Meteor.subscribe('transcriptCard', this.params.card_id), Meteor.subscribe('cardsetTranscriptBonus', this.params._id)];
},
data: function () {
if (ServerStyle.gotTranscriptsEnabled()) {
......
......@@ -2,18 +2,31 @@
<div class="col-xs-8 cardHeaderCenter" data-cardtype="{{cardType}}">
{{#if gotCardsetTitleNavigation}}
<span class="center-align">
{{#unless isMobilePreview}}
{{#if gotLearningGoal}}
<span class="hidden-xs cardHeaderSmallerText" data-cardtype="{{cardType}}">
{{#if displayTranscriptOwner}}
<span class="center-align">
<strong class="cardHeaderSmallText">{{getAuthorName this.owner}}</strong><br>
<strong class="cardHeaderSmallText">{{getLectureDate this._id}}</strong>
</span>
{{else}}
{{#unless isMobilePreview}}
{{#if gotLearningGoal}}
<span class="hidden-xs cardHeaderSmallerText" data-cardtype="{{cardType}}">
{{_ "learning-goal.cardName"}}: {{getLearningGoalName}}</span>
{{/if}}
{{/unless}}
{{/if}}
{{/unless}}
{{/if}}
<h2 data-cardtype="{{cardType}}">
{{> cardSubject this}}
</h2>
</span>
{{else}}
<div class="cardHeaderRowHalf" data-cardtype="{{cardType}}">
{{#if displayTranscriptOwner}}
<span class="center-align">
<strong class="cardHeaderSmallText">{{getAuthorName this.owner}}</strong><br>
<strong class="cardHeaderSmallText">{{getLectureDate this._id}}</strong>
</span>
{{else}}
<strong class="cardHeaderSmallText" data-cardtype="{{cardType}}">{{getCardsetName}}</strong><br>
{{#unless isMobilePreview}}
{{#if gotLearningGoal}}
......@@ -21,6 +34,7 @@
{{_ "learning-goal.cardName"}}: {{getLearningGoalName}}</span>
{{/if}}
{{/unless}}
{{/if}}
</div>
<h2 data-cardtype="{{cardType}}">
{{> cardSubject this}}
......
......@@ -6,6 +6,7 @@ import {Cardsets} from "../../../../../api/cardsets";
import {CardType} from "../../../../../api/cardTypes";
import "./center.html";
import {MarkdeepEditor} from "../../../../../api/markdeepEditor";
import {TranscriptBonus, TranscriptBonusList} from "../../../../../api/transcriptBonus";
/*
* ############################################################################
......@@ -14,6 +15,12 @@ import {MarkdeepEditor} from "../../../../../api/markdeepEditor";
*/
Template.flashcardHeaderCenter.helpers({
getLectureDate: function (card_id) {
let bonusTranscript = TranscriptBonus.findOne({card_id: card_id});
if (bonusTranscript !== undefined) {
return TranscriptBonusList.getLectureName(bonusTranscript, false);
}
},
isCardset: function () {
return Route.isCardset();
},
......@@ -57,5 +64,8 @@ Template.flashcardHeaderCenter.helpers({
},
gotCardsetTitleNavigation: function () {
return CardType.gotCardsetTitleNavigation(this.cardType);
},
displayTranscriptOwner: function () {
return Route.isPresentationTranscriptBonusCardset();
}
});
......@@ -29,7 +29,7 @@
<tbody>
<tr>
<td>
{{_ "transcriptForm.transcriptForm.info.submissions"}}:
{{_ "transcriptForm.info.submissions"}}:
</td>
<td>
{{getSubmissions 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