score-vue.mtpl 5.47 KB
Newer Older
1
<article class="<% if (!is_editable) { %>read-only<% } %>">
2 3
    <header class="score__header">
        <h1 class="score__title"><%- title %></h1>
4

5 6 7 8
        <div class="score__actions">
            <button class="js-save" data-label-progress="<%- t('Enregistrer…') %>" data-label="<%- t('Enregistrer') %>" type="button" <% if (!hasChanges) { %>disabled<% } %>><%- t('Enregistrer') %></button>
            <button class="js-duplicate" type="button"><%- t('Dupliquer') %></button>
            <button class="js-delete" type="button"><%- t('Supprimer') %></button>
9
            <!--<button data-name="export"><%- t('Export') %></button>-->
alexandre's avatar
alexandre committed
10
        </div>
11

gijs's avatar
gijs committed
12 13
    </header>

14
    <div class="score__main">
gijs's avatar
gijs committed
15 16
        <div id="expand-level-slider"></div>
        <div id="axis-wrapper">
17
            <ol class="score__mainline"></ol>
gijs's avatar
gijs committed
18 19 20 21 22
        </div>
    </div>
</article>

<aside class="panel__alt panel--score-meta <% if (!metaExpanded) { %>is-collapsed<% } %>">
alexandre's avatar
alexandre committed
23
    <span class="panel__toggle__alt js-toggle"><%- t('infos') %></span>
gijs's avatar
gijs committed
24
    <section class="content">
25
        <button class="js-edit score-edit"><%- t('Éditer') %></button>
26

alexandre's avatar
alexandre committed
27
        <dl class="score-meta">
gijs's avatar
gijs committed
28
        <% if (presentation) { %>
29
            <dt class="score-meta__term"><%- t('Présentation') %></dt>
30
            <dd class="score-meta__def"><%- presentation %></dd>
alexandre's avatar
alexandre committed
31 32
            <% } %>
            <% if (stage_set) { %>
33
            <dt class="score-meta__term"><%- t('Mise') %></dt>
34
            <dd class="score-meta__def"><%= stage_set.replace(/\n/g, "<br />") %></dd>
alexandre's avatar
alexandre committed
35
            <% } %>
alexandre's avatar
alexandre committed
36
        </dl>
alexandre's avatar
alexandre committed
37

alexandre's avatar
alexandre committed
38
        <dl class="score-meta">
alexandre's avatar
alexandre committed
39 40
            <!-- Extended fields -->
            <% if (performance_author && (score_type === 1 || score_type === 3)) { %>
alexandre's avatar
alexandre committed
41
            <dt class="score-meta__term"><%- t('Auteur de la performance') %></dt>
42
            <dd class="score-meta__def"><%- performance_author %></dd>
alexandre's avatar
alexandre committed
43
            <% } %>
alexandre's avatar
alexandre committed
44
            
alexandre's avatar
alexandre committed
45
            <% if (score_author) { %>
alexandre's avatar
alexandre committed
46
            <dt class="score-meta__term"><%- t('Auteur de la partition') %></dt>
47
            <dd class="score-meta__def"><%- score_author %></dd>
48
            <% } %>
alexandre's avatar
alexandre committed
49

alexandre's avatar
alexandre committed
50
            <% if (score_type) { %>
alexandre's avatar
alexandre committed
51
            <dt class="score-meta__term"><%- t('Type de partition') %></dt>
52
            <dd class="score-meta__def">
alexandre's avatar
alexandre committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
                <% switch (score_type) {
                    case 1:
                %>
                        transcription
                <%
                        break;
                    case 2:
                %>
                        prescription
                <%
                        break;
                    case 3:
                %>
                        traduction
                <%
                        break;
                } %>
            </dd>
            <% } %>
alexandre's avatar
alexandre committed
72 73

            <% if (effectif && effectif !== "") { %>
alexandre's avatar
alexandre committed
74
            <dt class="score-meta__term"><%- t('Effectif') %></dt>
75
            <dd class="score-meta__def">
alexandre's avatar
alexandre committed
76
                <% if (effectif && effectif.type === rangeType.exact) { %>
Annie's avatar
Annie committed
77
                    <%- effectif.value %> <%- (effectif.value > 1) ? t('performeurs') : t('performeur') %>
alexandre's avatar
alexandre committed
78
                <% } else if (effectif && effectif.type === rangeType.minimal) { %>
Annie's avatar
Annie committed
79
                    <%- t('au moins') %> <%- effectif.value %> <%- t('performeurs') %>
alexandre's avatar
alexandre committed
80
                <% } else if (effectif && effectif.type === rangeType.range) { %>
81
                    <%- t('entre') %> <%- effectif.value[0] %> et <%- effectif.value[1] %> <%- t('performeurs') %>
alexandre's avatar
alexandre committed
82
                <% } else { %>
Annie's avatar
Annie committed
83
                    <%- t('indéterminé') %>
alexandre's avatar
alexandre committed
84 85
                <% } %>
            </dd>
alexandre's avatar
alexandre committed
86 87
            <% } %>

alexandre's avatar
alexandre committed
88
            <% if (duration) { %>
alexandre's avatar
alexandre committed
89
            <dt class="score-meta__term"><%- t('Durée') %></dt>
90
            <dd class="score-meta__def"><%- duration %></dd>
alexandre's avatar
alexandre committed
91
            <% } %>
92
        </dl>
alexandre's avatar
alexandre committed
93

94 95 96 97
        <% if (tags && tags.length) { %>
            <ul class="tags">
            <% for (var i=0; i < tags.length; i++) { %>
                <li class="tags__item">#<%- tags[i] %></li>
alexandre's avatar
alexandre committed
98
            <% } %>
99 100
            </ul>
        <% } %>
alexandre's avatar
alexandre committed
101

102
        <dl class="score-meta">
alexandre's avatar
alexandre committed
103
            <dt class="score-meta__term score-meta__term--inline"><%- t('Créée le') %></dt>
104
            <dd class="score-meta__def"><%- formatTimestamp(created_at) %></dd>
alexandre's avatar
alexandre committed
105
            <dt class="score-meta__term score-meta__term--inline"><%- t('Modifiée le') %></dt>
106
            <dd class="score-meta__def"><%- formatTimestamp(updated_at) %></dd>
alexandre's avatar
alexandre committed
107
        </dl>
108

alexandre's avatar
alexandre committed
109 110
        <p><% if (is_public) { %>Cette partition est public<% } else { %>Cette partition est privée<% } %></p>

111 112 113 114 115 116 117 118 119 120 121 122
        {% comment %}
        <dl class="score-meta">
            <dt class="score-meta__term score-meta__term--inline"><%- t('Créé par') %></dt>
            <dd class="score-meta__def"><%- created_by.username %></dd>
            <dt class="score-meta__term score-meta__term--inline"><%- t('Partagé avec') %></dt>
            <dd class="score-meta__def">
            <ul>
            <% for (var i=0; i < shared_with.length; i++) { %>
                <li><%- shared_with[i].username %></li>
            <% } %>
            </ul>
            </dd>
alexandre's avatar
alexandre committed
123
            <dt class="score-meta__term score-meta__term--inline"><%- t('Publiée?') %></dt>
124 125 126 127
            <dd class="score-meta__def"><%- is_public %></dd>
        </dl>
        {% endcomment %}

alexandre's avatar
alexandre committed
128 129 130 131 132
        <dl class="score-meta">
            <dt class="score-meta__term score-meta__term--inline"><%- t('Publiée?') %></dt>
            <dd class="score-meta__def"><%- is_public %></dd>
        </dl>

133
        <div id="permissions"></div>
134

alexandre's avatar
alexandre committed
135
        <form></form>
gijs's avatar
gijs committed
136
    </section>
alexandre's avatar
alexandre committed
137
</aside>