<section class="deity">
    <div class="head">
        <img class="img" src="{{img}}" data-action="editImage" data-edit="img" title="{{name}}"/>
        <label>Name
            <input type="text" name="name" value="{{this.name}}"/>
        </label>
        <label>Karma
            <input type="number" name="system.karmicEnergy" value="{{system.karmicEnergy}}"/>
        </label>

    </div>
    <div class="editor">
        <label>Beschreibung</label>
        <prose-mirror
                name="system.description"
                button="false"
                editable="{{editable}}"
                toggled="true"
                value="{{system.description}}">
            {{{description}}}
        </prose-mirror>
    </div>
    <fieldset>
        <legend>Mirakel</legend>
        <div class="miracles">
            <div><label><span>Mirakel+</span>
                <input type="text" name="miraclePlus" value="{{miraclePlus}}"/>
            </label></div>
            <div><label><span>Mirakel-</span>
                <input type="text" name="miracleMinus" value="{{miracleMinus}}"/>
            </label></div>
        </div>
    </fieldset>
    <fieldset>
        <legend>Liturgien</legend>
        <table>
            <thead>
            <tr>
                <th>Grad</th>
                <th>Liturgien</th>
            </tr>
            </thead>
            <tbody>

            <tr class="liturgy-drops" data-rank="0">
                <th data-rank="0">0</th>
                <td data-rank="0">
                    {{#each liturgies.rank0}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="0" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="0" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="1">
                <th data-rank="1">I</th>
                <td data-rank="1">
                    {{#each liturgies.rank1}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="1" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="1" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="2">
                <th data-rank="2">II</th>
                <td data-rank="2">
                    {{#each liturgies.rank2}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="2" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="2" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="3">
                <th data-rank="3">III</th>
                <td data-rank="3">
                    {{#each liturgies.rank3}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="3" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="3" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="4">
                <th data-rank="4">IV</th>
                <td data-rank="4">
                    {{#each liturgies.rank4}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="4" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="4" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="5">
                <th data-rank="5">V</th>
                <td data-rank="5">
                    {{#each liturgies.rank5}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="5" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="5" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="6">
                <th data-rank="6">VI</th>
                <td data-rank="6">
                    {{#each liturgies.rank6}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="6" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="6" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="7">
                <th data-rank="7">VII</th>
                <td data-rank="7">
                    {{#each liturgies.rank7}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="7" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="7" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            <tr class="liturgy-drops" data-rank="8">
                <th data-rank="8">VIII</th>
                <td data-rank="8">
                    {{#each liturgies.rank8}}
                        <div class="liturgy" data-action="openLiturgy" data-rank="8" data-liturgy-id="{{this.id}}">
                            <span>{{this.name}}</span>
                            <button type="button" data-action="removeLiturgy" data-rank="8" data-liturgy-id="{{this.id}}"
                                    class="mini"><i class="fa fa-xmark"></i></button>
                        </div>
                    {{/each}}
                </td>
            </tr>

            </tbody>
        </table>
    </fieldset>
</section>