cardEditor.html 9.36 KB
Newer Older
1 2
<template name="learningGoalLevel">
    <div id="learningGoalLevelGroup" class="form-group btn-group col-xs-12" role="group" data-toggle="buttons">
3 4
        <button id="learningGoalLevel0"
               class="col-xs-6 col-sm-2 learningGoalLevelButton btn btn-raised {{#if isLearningGoalLevelChecked
5 6 7 8
                                                             0}}btn-primary{{else}}btn-white{{/if}} {{#if
                       isLearningGoalLevel 0}}active{{/if}}"
               data-lvl="0">
            {{#if isLearningGoalLevel 0}}
9
                <input type="radio" name="learningGoalLevel" value="0" checked tabindex="4" data-lvl="0">
10
            {{else}}
11
                <input type="radio" name="learningGoalLevel" value="0" data-lvl="0">
12 13
            {{/if}}
            {{_ "learning-goal.level1"}}
14 15 16
        </button>
        <button id="learningGoalLevel1"
               class="col-xs-6 col-sm-2 learningGoalLevelButton btn btn-raised {{#if isLearningGoalLevelChecked
17 18 19 20
                                                             1}}btn-primary{{else}}btn-white{{/if}} {{#if
                       isLearningGoalLevel 1}}active{{/if}}"
               data-lvl="1">
            {{#if isLearningGoalLevel 1}}
21
                <input type="radio" name="learningGoalLevel" value="1" checked tabindex="4" data-lvl="1">
22
            {{else}}
23
                <input type="radio" name="learningGoalLevel" value="1" data-lvl="1">
24 25
            {{/if}}
            {{_ "learning-goal.level2"}}
26 27 28
        </button>
        <button id="learningGoalLevel2"
               class="col-xs-6 col-sm-2 learningGoalLevelButton btn btn-raised {{#if isLearningGoalLevelChecked
29 30 31 32
                                                             2}}btn-primary{{else}}btn-white{{/if}} {{#if
                       isLearningGoalLevel 2}}active{{/if}}"
               data-lvl="2">
            {{#if isLearningGoalLevel 2}}
33
                <input type="radio" name="learningGoalLevel" value="2" checked tabindex="4" data-lvl="2">
34
            {{else}}
35
                <input type="radio" name="learningGoalLevel" value="2" data-lvl="2">
36 37
            {{/if}}
            {{_ "learning-goal.level3"}}
38 39 40
        </button>
        <button id="learningGoalLevel3"
               class="col-xs-6 col-sm-2 learningGoalLevelButton btn btn-raised {{#if isLearningGoalLevelChecked
41 42 43 44
                                                             3}}btn-primary{{else}}btn-white{{/if}} {{#if
                       isLearningGoalLevel 3}}active{{/if}}"
               data-lvl="3">
            {{#if isLearningGoalLevel 3}}
45
                <input type="radio" name="learningGoalLevel" value="3" checked tabindex="4" data-lvl="3">
46
            {{else}}
47
                <input type="radio" name="learningGoalLevel" value="3" data-lvl="3">
48 49
            {{/if}}
            {{_ "learning-goal.level4"}}
50 51 52
        </button>
        <button id="learningGoalLevel4"
               class="col-xs-6 col-sm-2 learningGoalLevelButton btn btn-raised {{#if isLearningGoalLevelChecked
53 54 55 56
                                                             4}}btn-primary{{else}}btn-white{{/if}} {{#if
                       isLearningGoalLevel 4}}active{{/if}}"
               data-lvl="4">
            {{#if isLearningGoalLevel 4}}
57
                <input type="radio" name="learningGoalLevel" value="4" checked tabindex="4" data-lvl="4">
58
            {{else}}
59
                <input type="radio" name="learningGoalLevel" value="4" data-lvl="4">
60 61
            {{/if}}
            {{_ "learning-goal.level5"}}
62 63 64
        </button>
        <button id="learningGoalLevel5"
               class="col-xs-6 col-sm-2 learningGoalLevelButton btn btn-raised {{#if isLearningGoalLevelChecked
65 66 67 68
                                                             5}}btn-primary{{else}}btn-white{{/if}} {{#if
                       isLearningGoalLevel 5}}active{{/if}}"
               data-lvl="5">
            {{#if isLearningGoalLevel 5}}
69
                <input type="radio" name="learningGoalLevel" value="5" checked tabindex="4" data-lvl="5">
70
            {{else}}
71
                <input type="radio" name="learningGoalLevel" value="5" data-lvl="5">
72 73
            {{/if}}
            {{_ "learning-goal.level6"}}
74
        </button>
75 76 77 78 79 80 81 82 83 84 85 86
    </div>
</template>


<template name="subjectEditor">
    {{#if gotLearningUnit}}
        <button class="btn btn-raised btn-success col-xs-4 col-sm-3 subjectEditorButton" data-toggle="modal"
                data-target="#showSelectLearningUnitModal">{{_ "learningUnit.choose"}}</button>
    {{/if}}
    <form class="subjectEditor {{#if gotLearningUnit}}col-xs-8 col-sm-9{{/if}}">
        <input class="form-control editorBackground" id="subjectEditor" name="content"
               placeholder="{{getSubjectPlaceholder}}" value="{{getSubject}}"
87
               tabindex="1" autofocus>
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
    </form>
</template>

<template name="selectLearningUnit">
    <div class="modal fade" id="showSelectLearningUnitModal" role="dialog">
        <div class="modal-dialog" aria-labelledby="showSelectLearningUnitTitle">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 id="showSelectLearningUnitTitle" class="modal-title">{{_ "learningUnit.chooseIndex"}}</h4>
                    <div class="modal-body">
                        <button id="learningUnitCancel"
                                class="btn btn-danger btn-raised" {{disableIfOffline}}>
                            {{_ "learningUnit.cancel"}}
                        </button>
                        <div class="form-horizontal">
                            <div class="form-group">
                                <div class="form-group setdetails name">
                                    <label id="setLearningIndexLabel" class="col-md-3 control-label"
                                           for="setLearningIndex">{{_
                                            "card.cardType0.name"}}</label>
                                    <div class="dropdown">
                                        <div class="btn-group col-xs-12 col-sm-12 col-md-9">
                                            <button id="setLearningIndex" type="button"
                                                    class="btn btn-raised btn-default setLearningIndexDropdown longButton"
                                                    data-toggle="dropdown" aria-haspopup="true"
                                                    aria-expanded="false"
                                                    value="{{getCardsetId}}">{{getCardsetName}}
                                            </button>
                                            <button type="button"
                                                    class="btn btn-raised dropdown-toggle setLearningIndexDropdown"
                                                    data-toggle="dropdown"
                                                    aria-haspopup="true" aria-expanded="false">
                                                <span class="caret"></span>
                                                <span class="sr-only"></span>
                                            </button>
                                            <ul class="dropdown-menu btn-raised longButton">
                                                <li class="learningIndex" value="0" data="0">
                                                    <a
                                                            href="#">{{_ "learningUnit.none"}}</a></li>
                                                {{#each learningIndex}}
                                                    <li class="learningIndex" value="{{this._id}}" data="{{this._id}}">
                                                        <a
                                                                href="#">{{this.name}}</a></li>
                                                {{/each}}
                                            </ul>
                                            <span id="helpSetLearningIndex" class="help-block learningIndex"></span>
                                        </div>
                                    </div>
                                </div>
                                {{#if gotLearningIndex}}
                                    <hr>
                                    <h4>{{_ "learningUnit.chooseUnit"}}</h4>
                                    {{> cardsetList}}
                                {{/if}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
151 152 153

<template name="btnCard">
    <div id="button-row" class="col-xs-12 actionButtons editorElement">
154 155 156 157 158 159 160 161 162 163 164 165 166 167
        <button id="cardSave"
                class="btn btn-success btn-raised saveFirst col-xs-12 col-sm-4" {{disableIfOffline}}
                tabindex="13">
            {{_ "savecard"}}
        </button>
        <button id="cardSaveReturn"
                class="btn btn-default btn-raised save col-xs-12 col-sm-4" {{disableIfOffline}}
                tabindex="14">
            {{_ "savecardReturn"}}
        </button>
        <button id="cardCancel" class="btn btn-danger btn-raised cancel col-xs-12 col-sm-3 pull-right"
                tabindex="15" data-toggle="modal"
                data-target="#cancelEditModal">{{_
                "declinecard"}}</button>
168 169
    </div>
</template>