cardset.html 2.54 KB
Newer Older
1 2 3 4 5 6 7 8 9
<template name="cardsetAccess">
    {{#if isInRole 'firstLogin'}}
        {{> first_login_content_only}}
    {{else}}
        {{#if isInRole 'blocked'}}
            {{> access_denied_content_only}}
        {{else}}
            {{#if hasPermission}}
                {{#if learningActive}}
10
                    {{> cardset}}
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
                {{else}}
                    {{> cardset}}
                {{/if}}
            {{else}}
                <div class="col-md-12">
                    <h4>{{_ "permission"}}</h4>
                </div>
            {{/if}}
        {{/if}}
    {{/if}}
</template>

<template name="cardset">
    {{#unless fullscreenActive}}
        {{> cardsetInfo}}
        {{> showLicense}}
Curtis Adam's avatar
Curtis Adam committed
27
        {{> cardsetForm}}
28 29
        {{> cardsetImportForm}}
        {{> cardsetPublishForm}}
Curtis Adam's avatar
Curtis Adam committed
30
        {{> bonusForm}}
31 32 33 34 35 36 37
        {{> cardsetEndLearnForm}}
        {{> selectLicenseForm}}
        {{> reportCardsetForm}}
        {{> deleteCardsForm}}
        {{> resetLeitnerForm}}
        {{> resetMemoForm}}
        {{> leaveLearnPhaseForm}}
38
        {{> leaveCardsetForm}}
39
        {{> leaveEditorsForm}}
40
        {{> chooseFlashcards}}
41 42
        {{> joinBonusForm}}
        {{> leaveBonusForm}}
43
        {{> profileIncompleteModal}}
44
    {{/unless}}
45
    {{#if hasCardsetPermission}}
46 47 48
        {{#unless learningActiveAndEditor}}
            {{selectedForLearning}}
        {{/unless}}
49
        {{#if isActiveRoute regex='cardsetdetailsid|cardsetcard'}}
50
            {{#unless isInBonusAndNotOwner}}
51
                {{#if this.quantity}}
52
                    <div class="hidden-xs col-xs-12">
53 54
                        {{> cardNavigation}}
                    </div>
55
                    <div class="hidden-xs col-xs-12">
56 57
                        {{> flashcards cardset=this}}
                    </div>
58
                {{/if}}
59
            {{/unless}}
60 61
        {{/if}}
        {{#if isActiveRoute 'cardsetlistid'}}
Curtis Adam's avatar
Curtis Adam committed
62
            <div class="col-xs-12">
Curtis Adam's avatar
Curtis Adam committed
63 64
                <button class="btn btn-raised btn-danger" id="{{#if
                        fullscreenActive}}backToCardsetDetailViewFullscreen{{else}}backToCardsetDetailView{{/if}}">
65
                    <span class="pull-left"><i class="fa fa-arrow-left"></i> {{_ "cardset.list.back"}}</span>
Curtis Adam's avatar
Curtis Adam committed
66 67 68
                </button>
                {{> cardsetList}}
            </div>
69 70
        {{/if}}
    {{else}}
71
        {{#if this.quantity}}
72 73 74 75 76 77
            <div class="col-xs-12">
                {{> cardNavigation}}
            </div>
            <div class="col-xs-12">
                {{> flashcards cardset=this}}
            </div>
78
        {{/if}}
79 80
    {{/if}}
</template>