index.html 5.83 KB
Newer Older
Curtis Adam's avatar
Curtis Adam committed
1
<template name="filterIndex">
2
    {{> showLicense}}
3 4 5 6 7 8 9 10
    {{#unless isCardsetTranscriptBonusRoute}}
        {{> filterItemSelectCardsetToLearnCallout}}
        {{#if gotBackendAccess}}
            {{> cardsetFormAdmin}}
        {{/if}}
        {{> cardsetDeleteForm}}
        {{> cardsetForm}}
    {{/unless}}
11
    <div id="set-list-region">
12 13 14
        {{#if isActiveRoute regex='alldecks|create'}}
            {{> filterIndexCreate}}
        {{/if}}
15

16
        {{#if isActiveRoute regex='repetitorium|allRepetitorien|personalRepetitorien'}}
17 18
            {{> filterIndexRepetitorium}}
        {{/if}}
19

20 21 22 23 24
        {{#if isActiveRoute 'learn'}}
            {{> selectModeForm}}
            {{> cardsetsConfirmLearnForm}}
            {{> filterIndexWorkload}}
        {{/if}}
25

26 27 28
        {{#if isActiveRoute 'shuffle'}}
            {{> filterIndexShuffle}}
        {{/if}}
Curtis Adam's avatar
Curtis Adam committed
29

30 31 32
        {{#if isActiveRoute 'pool'}}
            {{> filterIndexPool}}
        {{/if}}
33

34
        {{#if isActiveRoute regex='transcriptsPersonal|transcriptsBonus'}}
35 36 37
            {{#if isActiveRoute regex='transcriptsBonus'}}
                {{> cardsetIndexTranscriptNavigation}}
                {{#if isViewActive 1}}
38 39 40
                    <div class="col-xs-12">
                        {{> filterItemCreateTranscriptButton}}
                    </div>
41 42 43 44 45 46 47
                    {{> cardsetIndexTranscriptStatistics}}
                {{else}}
                    {{> filterIndexTranscripts}}
                {{/if}}
            {{else}}
                {{> filterIndexTranscripts}}
            {{/if}}
48 49 50
        {{/if}}
        {{#if isCardsetTranscriptBonusRoute}}
            {{> filterIndexTranscripts}}
51
        {{/if}}
52
    </div>
53 54
</template>

Curtis Adam's avatar
Curtis Adam committed
55
<template name="filterIndexPool">
56
    {{#unless isSelectingCardsetToLearn}}
57
        <div class="empty-button-placeholder"></div>
58
    {{/unless}}
Curtis Adam's avatar
Curtis Adam committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
    {{#if getDecks 0}}
        {{#if displayWordcloud}}
            {{> wordcloud}}
        {{else}}
            {{#if getDecks 1}}
                {{#each getDecks 2}}
                    {{> filterIndexItemCardset extendContext 'index' @index}}
                {{/each}}
                {{> infiniteScroll}}
            {{else}}
                {{> noFilterResults}}
            {{/if}}
        {{/if}}
    {{else}}
        {{> noResults}}
    {{/if}}
</template>

77 78 79
<template name="filterIndexTranscripts">
    {{> deleteTranscriptForm}}
    <span class="filter-index-buttons empty-button-placeholder">
80
        {{#if isTranscriptRoute}}
81 82 83
            <div class="col-xs-12">
                {{> filterItemCreateTranscriptButton}}
            </div>
84
        {{/if}}
85 86 87
        {{#if isCardsetTranscriptBonusRoute}}
            {{> cardsetIndexTranscriptSubmissionsItemReviewButton}}
        {{/if}}
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
    </span>
    {{#if getCards 0}}
        {{#if getCards 1}}
            {{#each getCards 2}}
                {{> filterIndexItemCard extendContext 'index' @index}}
            {{/each}}
            {{> infiniteScroll}}
        {{else}}
            {{> noFilterResults}}
        {{/if}}
    {{else}}
        {{> noResults}}
    {{/if}}
</template>

Curtis Adam's avatar
Curtis Adam committed
103
<template name="filterIndexShuffle">
104
    {{#if canShuffle}}
105
        <div class="container" id="set-list-region">
106
            {{> filterItemShuffleRepetitoriumCallout}}
107 108 109
            {{#if shuffleList 1}}
                {{#each shuffleList 2}}
                    {{#unless isActiveCardset}}
Curtis Adam's avatar
Curtis Adam committed
110
                        {{> filterIndexItemCardset extendContext 'index' @index}}
111 112 113 114 115 116 117
                    {{/unless}}
                {{/each}}
                {{> infiniteScroll}}
            {{else}}
                {{> noFilterResults}}
            {{/if}}
        </div>
118
    {{/if}}
119
</template>
120

Curtis Adam's avatar
Curtis Adam committed
121
<template name="filterIndexCreate">
122 123
    <span class="filter-index-buttons empty-button-placeholder">
        {{#if isActiveRoute 'create'}}
124 125
            {{> filterItemCreateCardsetButton}}
            {{> filterItemImportCardsetButton}}
126
        {{/if}}
127
    </span>
128 129 130 131 132 133 134 135 136
    {{#if cardsetList 0}}
        {{#if displayWordcloud}}
            {{> wordcloud}}
        {{else}}
            {{#if cardsetList 1}}
                {{#each cardsetList 2}}
                    {{> filterIndexItemCardset extendContext 'index' @index}}
                {{/each}}
                {{> infiniteScroll}}
137
            {{else}}
138
                {{> noFilterResults}}
139 140
            {{/if}}
        {{/if}}
141 142 143
    {{else}}
        {{> noResults}}
    {{/if}}
144 145
</template>

Curtis Adam's avatar
Curtis Adam committed
146
<template name="filterIndexRepetitorium">
147 148
    {{#unless isSelectingCardsetToLearn}}
        {{#if isPersonalRepetitorienRoute}}
149
            <span class="filter-index-buttons empty-button-placeholder">
150 151 152 153 154 155
                {{> filterItemCreateRepetitoriumButton}}
            </span>
        {{else}}
            <div class="empty-button-placeholder"></div>
        {{/if}}
    {{/unless}}
156 157 158
    {{#if cardsetList 0}}
        {{#if displayWordcloud}}
            {{> wordcloud}}
159
        {{else}}
160 161
            {{#if cardsetList 1}}
                {{#each cardsetList 2}}
Curtis Adam's avatar
Curtis Adam committed
162
                    {{> filterIndexItemCardset extendContext 'index' @index}}
163 164 165 166 167
                {{/each}}
                {{> infiniteScroll}}
            {{else}}
                {{> noFilterResults}}
            {{/if}}
168
        {{/if}}
169 170 171 172 173 174
    {{else}}
        {{> noResults}}
    {{/if}}
</template>

<template name="filterIndexWorkload">
175 176 177 178
    <span class="filter-index-buttons empty-button-placeholder">
        {{> filterItemSelectCardsetButton}}
        {{> filterItemSelectRepetitoriumButton}}
    </span>
179 180 181 182 183 184 185 186 187 188
    {{#if learnList 0}}
        {{#if learnList 1}}
            {{#each learnList 2}}
                {{> filterIndexItemCardset extendContext 'index' @index}}
            {{/each}}
            {{> infiniteScroll}}
        {{else}}
            {{> noFilterResults}}
        {{/if}}
    {{/if}}
189
</template>