Commit 03dc8211 authored by Curtis Adam's avatar Curtis Adam

Add a last editor column to all filter results

parent a9647e77
......@@ -333,6 +333,8 @@ $themes: (
$item_icon: map-get($map, "item_icon");
$item_icon_hover: map-get($map, "item_icon_hover");
$item_author_text: map-get($map, "item_author_text");
$item_workload_text: map-get($map, "item_workload_text");
$item_last_editor_text: map-get($map, "item_last_editor_text");
$item_description_background: map-get($map, "item_description_background");
$item_description_text: map-get($map, "item_description_text");
$item_text: map-get($map, "item_text");
......@@ -2643,6 +2645,14 @@ $themes: (
color: $item_author_text !important;
}
.resultItemHeaderWorkload {
color: $item_workload_text !important;
}
.resultItemHeaderLastEditor {
color: $item_last_editor_text !important;
}
.resultItemHeaderBottomArea {
background-color: $item_background !important;
i {
......
......@@ -376,6 +376,8 @@
"item_icon": white,
"item_icon_hover": $item_icon_hover,
"item_author_text": black,
"item_workload_text": black,
"item_last_editor_text": black,
"item_description_background": LightGoldenRodYellow,
"item_description_text": $thm_gray,
"item_text": white,
......
......@@ -520,6 +520,7 @@
"college": "Hochschule",
"course": "Studiengang",
"author": "Autor/in",
"lastEditor": "Letzter Editor/in",
"authorPublisher": "Autor/in | Editor/in",
"title": "Aktuell werden folgende Karteien angeboten:",
"everyone": "Alle",
......@@ -556,7 +557,7 @@
"shuffleRemove": "Auswahl entfernen",
"workload": "Heute",
"learningMode": "Lernmodus",
"cardsToLearn": "1 Karte",
"cardsToLearn": "Karte",
"cardsToLearnPlural": " Karten",
"noCardsToLearn": "nichts",
"leitner": "Leitner",
......
......@@ -521,6 +521,7 @@
"college": "Hochschule",
"course": "Studiengang",
"author": "Autor/in",
"lastEditor": "Last Editor",
"authorPublisher": "Autor/in | Editor/in",
"title": "Aktuell werden folgende Karteien angeboten:",
"everyone": "Alle",
......@@ -557,7 +558,7 @@
"shuffleRemove": "Auswahl entfernen",
"workload": "Heute zu lernen",
"learningMode": "Lernmodus",
"cardsToLearn": "1 Karte",
"cardsToLearn": "Karte",
"cardsToLearnPlural": " Karten",
"noCardsToLearn": "nichts",
"leitner": "Leitner",
......
......@@ -37,13 +37,13 @@ import "./item/bottom/workloadProgress.js";
import "./item/bottom/transcriptRating.js";
import "./item/collapse/collapse.js";
import "./item/titleRow/author.js";
import "./item/titleRow/dateCreated.js";
import "./item/titleRow/dateModified.js";
import "./item/titleRow/date.js";
import "./item/titleRow/topic.js";
import "./item/titleRow/lastEditor.js";
import "./item/titleRow/workload.js";
import "./item/top/author.js";
import "./item/top/dateCreated.js";
import "./item/top/dateModified.js";
import "./item/top/date.js";
import "./item/top/lastEditor.js";
import "./item/top/topic.js";
import "./item/top/workload.js";
import "../modal/aboutThisRating.js";
......
......@@ -188,3 +188,12 @@ input, textarea {
#newCardSet, #newRepetitorium {
padding: 8px 30px !important;
}
.itemDateRow {
padding-left: 0;
padding-right: 0;
}
.resultItemHeaderWorkload {
padding-right: 0;
}
......@@ -4,7 +4,7 @@
{{#if isCardsetOwner this._id}}
<a class="resultNavigationElement exportCardset" data-id="{{this._id}}"
data-name="{{this.name}}" title='{{_ "admin.cardset.export"}}'><i
class="result fas fa-cloud-download hidden-xs" data-id="{{this._id}}"
class="result fas fa-cloud-download-alt hidden-xs" data-id="{{this._id}}"
data-name="{{this.name}}"></i></a>
{{/if}}
{{/unless}}
......
......@@ -2,34 +2,34 @@
<div class="resultItem col-xs-12">
{{#unless this.index}}
{{#if isCardsetTranscriptBonusRoute}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-4 col-md-5")}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowAuthor (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowDateCreated (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowDateModified (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowDate (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowLastEditor (setGridSize "hidden-sm col-md-3")}}
{{else}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-8")}}
{{> filterIndexItemTitleRowDateCreated (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowDateModified (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-8 col-md-6")}}
{{> filterIndexItemTitleRowDate (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowLastEditor (setGridSize "hidden-sm col-md-3")}}
{{/if}}
{{/unless}}
<div class="resultItemHeaderWrapper col-xs-12">
<div class="resultItemHeaderTopArea row">
{{#if isCardsetTranscriptBonusRoute}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-6 col-sm-4 col-md-5")}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-6 col-sm-4 col-md-3")}}
{{> filterIndexItemTopAuthor (setGridSize "col-xs-6 col-sm-4 col-md-3")}}
{{> filterIndexItemTopDateCreated (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopDateModified (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopDate (setGridSize "hidden-xs col-sm-4 col-md-3")}}
{{> filterIndexItemTopLastEditor (setGridSize "hidden-xs hidden-sm col-md-3")}}
{{else}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-12 col-sm-8")}}
{{> filterIndexItemTopDateCreated (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopDateModified (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-12 col-sm-8 col-md-6")}}
{{> filterIndexItemTopDate (setGridSize "hidden-xs col-sm-4 col-md-3")}}
{{> filterIndexItemTopLastEditor (setGridSize "hidden-xs hidden-sm col-md-3")}}
{{/if}}
</div>
<div class="resultItemHeaderBottomArea row">
<div class="col-xs-12 col-sm-8 collapseButton resultItemHeaderBottomAreaLabels">
<div class="col-xs-12 col-sm-8 col-md-9 collapseButton resultItemHeaderBottomAreaLabels">
{{> cardsetLabels}}
</div>
<div class="col-xs-12 col-sm-4 collapseButton resultItemHeaderBottomAreaButtons">
<div class="col-xs-12 col-sm-4 col-md-3 collapseButton resultItemHeaderBottomAreaButtons">
{{#unless isSelectingCardsetToLearn}}
{{#if isMyTranscriptsRoute}}
{{> filterIndexItemBottomEditTranscript}}
......
......@@ -2,46 +2,50 @@
<div class="resultItem col-xs-12">
{{#unless this.index}}
{{#if isWorkloadRoute}}
{{> filterIndexItemTitleRowWorkload (setGridSize "col-sm-3")}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-5")}}
{{> filterIndexItemTitleRowAuthor (setGridSize "col-sm-4")}}
{{> filterIndexItemTitleRowWorkload (setGridSize "col-sm-2 col-md-1")}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-3")}}
{{> filterIndexItemTitleRowAuthor (setGridSize "col-sm-3 col-md-2")}}
{{> filterIndexItemTitleRowDate (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowLastEditor (setGridSize "hidden-sm col-md-3")}}
{{else}}
{{#if isPersonalRoute}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-8")}}
{{> filterIndexItemTitleRowDateCreated (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowDateModified (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-8 col-md-6")}}
{{> filterIndexItemTitleRowDate (setGridSize "col-sm-4")}}
{{> filterIndexItemTitleRowLastEditor (setGridSize "hidden-sm col-md-2")}}
{{else}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-4 col-md-5")}}
{{> filterIndexItemTitleRowTopic (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowAuthor (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowDateCreated (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowDateModified (setGridSize "col-sm-2")}}
{{> filterIndexItemTitleRowDate (setGridSize "col-sm-4 col-md-3")}}
{{> filterIndexItemTitleRowLastEditor (setGridSize "hidden-sm col-md-3")}}
{{/if}}
{{/if}}
{{/unless}}
<div class="resultItemHeaderWrapper col-xs-12">
<div class="resultItemHeaderTopArea row">
{{#if isWorkloadRoute}}
{{> filterIndexItemTopWorkload (setGridSize "col-xs-5 col-sm-3")}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-7 col-sm-5")}}
{{> filterIndexItemTopAuthor (setGridSize "hidden-xs col-sm-4")}}
{{> filterIndexItemTopWorkload (setGridSize "col-xs-5 col-sm-2 col-md-1")}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-7 col-sm-3")}}
{{> filterIndexItemTopAuthor (setGridSize "hidden-xs col-sm-3 col-md-2")}}
{{> filterIndexItemTopDate (setGridSize "hidden-xs col-sm-4 col-md-3")}}
{{> filterIndexItemTopLastEditor (setGridSize "hidden-xs hidden-sm col-md-3")}}
{{else}}
{{#if isPersonalRoute}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-12 col-sm-8")}}
{{> filterIndexItemTopDateCreated (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopDateModified (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-12 col-sm-8 col-md-6")}}
{{> filterIndexItemTopDate (setGridSize "hidden-xs col-sm-4")}}
{{> filterIndexItemTopLastEditor (setGridSize "hidden-xs hidden-sm col-md-2")}}
{{else}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-6 col-sm-4 col-md-5")}}
{{> filterIndexItemTopTopic (setGridSize "col-xs-6 col-sm-4 col-md-3")}}
{{> filterIndexItemTopAuthor (setGridSize "col-xs-6 col-sm-4 col-md-3")}}
{{> filterIndexItemTopDateCreated (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopDateModified (setGridSize "hidden-xs col-sm-2")}}
{{> filterIndexItemTopDate (setGridSize "hidden-xs col-sm-4 col-md-3")}}
{{> filterIndexItemTopLastEditor (setGridSize "hidden-xs hidden-sm col-md-3")}}
{{/if}}
{{/if}}
</div>
<div class="resultItemHeaderBottomArea row">
<div class="col-xs-12 col-sm-8 collapseButton resultItemHeaderBottomAreaLabels">
<div class="col-xs-12 col-sm-8 col-md-9 collapseButton resultItemHeaderBottomAreaLabels">
{{> cardsetLabels}}
</div>
<div class="col-xs-12 col-sm-4 collapseButton resultItemHeaderBottomAreaButtons">
<div class="col-xs-12 col-sm-4 col-md-3 collapseButton resultItemHeaderBottomAreaButtons">
{{#unless isSelectingCardsetToLearn}}
{{#if isShuffleRoute}}
{{> filterIndexItemBottomShuffle}}
......@@ -53,7 +57,9 @@
{{#unless isShuffleRoute}}
{{> filterIndexItemBottomBonusStats}}
{{> filterIndexItemBottomEdit}}
{{> filterIndexItemBottomDelete}}
{{#unless isWorkloadRoute}}
{{> filterIndexItemBottomDelete}}
{{/unless}}
{{> filterIndexItemBottomExport}}
{{/unless}}
{{/unless}}
......
......@@ -62,7 +62,7 @@
}
}
.resultName, .authorProfile {
.resultName, .authorProfile, .resultItemHeaderWorkload {
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis;
......
<template name="filterIndexItemTitleRowDate">
<div class="hidden-xs {{this.gridSize}} resultsHeader">
<div class="col-xs-6 itemDateRow">
{{_ "pool.release"}}
</div>
<div class="col-xs-6 itemDateRow">
{{_ "pool.dateUpdated"}}
</div>
</div>
</template>
<template name="filterIndexItemTitleRowDateModified">
<div class="hidden-xs {{this.gridSize}} resultsHeader">
{{_ "pool.dateUpdated"}}
</div>
</template>
<template name="filterIndexItemTitleRowDateCreated">
<template name="filterIndexItemTitleRowLastEditor">
<div class="hidden-xs {{this.gridSize}} resultsHeader">
{{_ "pool.release"}}
{{_ "set-list.lastEditor"}}
</div>
</template>
<template name="filterIndexItemTopDate">
<div class="resultItemHeader resultItemHeaderAuthor {{this.gridSize}} collapseButton {{getCardsetBackground
this.difficulty this.cardType}}">
<div class="col-xs-6 itemDateRow">
{{getMomentsDate this.date true 0 true}}
</div>
<div class="col-xs-6 itemDateRow">
{{getMomentsDate this.dateUpdated true 0 true}}
</div>
</div>
</template>
<template name="filterIndexItemTopDateCreated">
<div class="resultItemHeader resultItemHeaderAuthor {{this.gridSize}} collapseButton {{getCardsetBackground
this.difficulty this.cardType}}"
data-date="{{this.date}}">
{{getMomentsDate this.date true 0 true}}
</div>
</template>
<template name="filterIndexItemTopDateModified">
<div class="resultItemHeader resultItemHeaderAuthor {{this.gridSize}} collapseButton {{getCardsetBackground
this.difficulty this.cardType}}" data-dateUpdated="{{this.dateUpdated}}">
{{getMomentsDate this.dateUpdated true 0 true}}
</div>
</template>
<template name="filterIndexItemTopLastEditor">
<div class="resultItemHeader resultName lastEditorProfile resultItemHeaderLastEditor {{this.gridSize}} collapseButton {{getCardsetBackground
this.difficulty this.cardType}}"
data-id="{{this.lastEditor}}">
{{#if isNotOwner}}
{{#if gotBackendAccess}}
<a href="/admin/user/{{this.lastEditor}}">{{getAuthorName this.lastEditor}}</a>
{{else}}
{{getAuthorName this.lastEditor}}
{{/if}}
{{else}}
&nbsp;
{{/if}}
</div>
</template>
import "./lastEditor.html";
import {Template} from "meteor/templating";
/*
* ############################################################################
* filterIndexItemTopLastEditor
* ############################################################################
*/
Template.filterIndexItemTopLastEditor.helpers({
isNotOwner: function () {
if (this.lastEditor !== undefined) {
return this.owner !== this.lastEditor;
}
}
});
<template name="filterIndexItemTopWorkload">
<div class="resultItemHeader {{this.gridSize}} collapseButton {{getCardsetBackground
<div class="resultItemHeader resultItemHeaderWorkload {{this.gridSize}} collapseButton {{getCardsetBackground
this.difficulty this.cardType}}">
{{#if gotWorkload}}
<a class="{{getWorkloadType}} col-xs-12" data-toggle="{{#if gotWorkloadForBothTypes}}modal{{/if}}"
<a class="{{getWorkloadType}}" data-toggle="{{#if gotWorkloadForBothTypes}}modal{{/if}}"
data-target="{{#if gotWorkloadForBothTypes}}#selectModeToLearnModal{{/if}}"
data-id="{{this._id}}">
{{getWorkload}}
{{{getWorkload}}}
</a>
{{else}}
<span class="resultItemHeaderAuthor col-xs-12">
{{_ "set-list.noCardsToLearn"}}
</span>
{{_ "set-list.noCardsToLearn"}}
{{/if}}
</div>
</template>
......@@ -76,7 +76,7 @@ Template.filterIndexItemTopWorkload.helpers({
let count = getLeitnerCount(this) + getWozniakCount(this);
switch (count) {
case 1:
return TAPi18n.__('set-list.cardsToLearn');
return count + TAPi18n.__('set-list.cardsToLearn');
default:
return count + TAPi18n.__('set-list.cardsToLearnPlural');
}
......
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