Commit 22076ca7 authored by Curtis Adam's avatar Curtis Adam

Enable the filter navigation for the shuffle view

parent 9cacdb74
......@@ -202,7 +202,7 @@ export let Route = class Route {
}
static isFilterIndex () {
return (this.isHome() || this.isPool() || this.isMyCardsets() || this.isRepetitorium() || this.isAllCardsets() || this.isWorkload() || this.isAllRepetitorien() || this.isPersonalRepetitorien() || this.isMyTranscripts());
return (this.isHome() || this.isPool() || this.isMyCardsets() || this.isRepetitorium() || this.isAllCardsets() || this.isWorkload() || this.isAllRepetitorien() || this.isPersonalRepetitorien() || this.isMyTranscripts() || this.isShuffle() || this.isEditShuffle());
}
static isFirstTimeVisit () {
......
......@@ -411,6 +411,7 @@ Router.route('/cardset/:_id/editshuffle', {
data: function () {
Session.set('helpFilter', "shuffle");
Filter.resetMaxItemCounter();
Session.set('cardsetIndexResults', Cardsets.find().count());
return Cardsets.findOne({_id: this.params._id});
},
action: function () {
......
......@@ -291,6 +291,7 @@ Template.filterIndexShuffle.helpers({
});
Template.filterIndexShuffle.onCreated(function () {
Session.set('shuffleFilter', undefined);
if (Route.isEditShuffle()) {
Session.set("ShuffledCardsets", Cardsets.findOne({_id: Router.current().params._id}).cardGroups);
} else {
......
......@@ -31,13 +31,15 @@
{{> mainNavigationTopItemConnectionStatus visibility=0}}
</div>
{{#unless isImpressum}}
{{#if gotCardsetsForFilter}}
{{#unless gotAllUnfilteredCardsetsVisible}}
<div class="navbar-header-item pull-right">
{{> mainNavigationTopItemSearchMobile}}
</div>
{{/unless}}
{{/if}}
{{#unless isShuffleRoute}}
{{#if gotCardsetsForFilter}}
{{#unless gotAllUnfilteredCardsetsVisible}}
<div class="navbar-header-item pull-right">
{{> mainNavigationTopItemSearchMobile}}
</div>
{{/unless}}
{{/if}}
{{/unless}}
{{/unless}}
{{#if isFilterIndex}}
{{#if gotCardsetsForFilter}}
......@@ -68,11 +70,13 @@
<div class="collapse navbar-collapse" id="navbar-cards-top-collapse">
<ul class="nav navbar-nav navbar-left">
{{> mainNavigationTopItemUseCasesDesktop}}
{{#if gotCardsetsForFilter}}
{{#unless gotAllUnfilteredCardsetsVisible}}
{{> mainNavigationTopItemSearch}}
{{/unless}}
{{/if}}
{{#unless isShuffleRoute}}
{{#if gotCardsetsForFilter}}
{{#unless gotAllUnfilteredCardsetsVisible}}
{{> mainNavigationTopItemSearch}}
{{/unless}}
{{/if}}
{{/unless}}
{{#if gotDisplayModeButton}}
{{#if gotCardsetsForFilter}}
{{> mainNavigationTopItemDisplayMode}}
......
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