Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
osp
work.w
Commits
42c3a20a
Commit
42c3a20a
authored
Mar 06, 2019
by
alexandre
Browse files
help anchors
parent
d705e823
Changes
6
Hide whitespace changes
Inline
Side-by-side
playground/static/playground/js/views.js
View file @
42c3a20a
...
...
@@ -2331,7 +2331,7 @@ window.W = window.W || {};
W
.
ChoiceListView
=
Marionette
.
CollectionView
.
extend
({
childViewContainer
:
'
ol
'
,
template
:
_
.
template
(
'
<h1 class="filter__heading"><%- title %></h1><ol class="filter__list"></ol>
'
),
template
:
_
.
template
(
'
<h1 class="filter__heading
js-help" data-href="<%- helpAnchor %>
"><%- title %></h1><ol class="filter__list"></ol>
'
),
className
:
'
scores__filter filter
'
,
...
...
@@ -2345,11 +2345,13 @@ window.W = window.W || {};
templateContext
:
function
()
{
return
{
title
:
this
.
title
,
helpAnchor
:
this
.
helpAnchor
,
}
},
initialize
:
function
(
options
)
{
this
.
title
=
options
.
title
||
'
untitled section
'
;
this
.
helpAnchor
=
options
.
helpAnchor
||
'
#
'
;
var
that
=
this
;
...
...
@@ -2489,13 +2491,13 @@ window.W = window.W || {};
// });
var
languageCollection
=
new
W
.
ChoiceCollection
([],
{
action
:
"
language
"
,
syncWith
:
this
.
collection
});
var
languageChoiceListView
=
new
W
.
ChoiceListView
({
collection
:
languageCollection
,
syncWith
:
this
.
collection
,
title
:
t
(
'
langue
'
)});
var
languageChoiceListView
=
new
W
.
ChoiceListView
({
collection
:
languageCollection
,
syncWith
:
this
.
collection
,
title
:
t
(
'
langue
'
)
,
helpAnchor
:
"
#langue
"
});
var
scoreTypeCollection
=
new
W
.
ChoiceCollection
([],
{
action
:
"
score_type
"
,
syncWith
:
this
.
collection
})
var
scoreTypeChoiceListView
=
new
W
.
ChoiceListView
({
collection
:
scoreTypeCollection
,
syncWith
:
this
.
collection
,
title
:
t
(
'
type
'
)})
var
scoreTypeChoiceListView
=
new
W
.
ChoiceListView
({
collection
:
scoreTypeCollection
,
syncWith
:
this
.
collection
,
title
:
t
(
'
type
'
)
,
helpAnchor
:
"
#type-de-partition
"
})
var
TagCollection
=
new
W
.
ChoiceCollection
([],
{
action
:
"
tags
"
,
syncWith
:
this
.
collection
})
var
TagChoiceListView
=
new
W
.
ChoiceListView
({
collection
:
TagCollection
,
syncWith
:
this
.
collection
,
title
:
t
(
'
tags
'
)})
var
TagChoiceListView
=
new
W
.
ChoiceListView
({
collection
:
TagCollection
,
syncWith
:
this
.
collection
,
title
:
t
(
'
tags
'
)
,
helpAnchor
:
"
#tags
"
})
TagChoiceListView
.
$el
.
addClass
(
"
filter--tags
"
);
this
.
showChildView
(
'
search
'
,
mySearchView
);
...
...
playground/templates/playground/underscore/field-alternative.mtpl
View file @
42c3a20a
<label class="inline">
<input type="checkbox" name="toggle-range-field" <% if (enabled) { %>checked<% } %>>
<%= label %>
<span class="js-help" data-href="#alternative">
<%= label %>
</span>
</label>
<label class="inline">
<%- t('choisir') %>
...
...
playground/templates/playground/underscore/field-attachment.mtpl
View file @
42c3a20a
<label>
<span class="label-text"><%- t('Pièce-jointe') %></span>
<span class="label-text
js-help" data-href="#piece-jointe
"><%- t('Pièce-jointe') %></span>
<input type="text" name="title" value="<%- title %>" />
<button class="inline">supprimer</button>
</label>
\ No newline at end of file
</label>
playground/templates/playground/underscore/field-boucle.mtpl
View file @
42c3a20a
<label class="inline">
<input type="checkbox" name="toggle-range-field" <% if (enabled) { %>checked<% } %>>
<%= label %>
<span class="js-help" data-href="#boucle">
<%= label %>
</span>
</label>
<label class="inline">
<%- t('effectuer l’axe') %>
...
...
playground/templates/playground/underscore/node-form.mtpl
View file @
42c3a20a
<fieldset>
<% if (parent) { %>
<label>
<span class="label-text"><%- t('Opérateur') %></span>
<span class="label-text
js-help" data-href="#operateur
"><%- t('Opérateur') %></span>
<select name="tag">
<% _.each(tagChoices, function(t) {%>
<option value="<%= t %>" <% if (tag===t) { %>selected<% } %>><%= t %></option>
...
...
@@ -9,7 +9,7 @@
</select>
</label>
<% } %>
<label><span class="label-text js-help" data-href="#axe"><%- t('Axe') %></span>
<label><span class="label-text js-help" data-href="#
nom-de-l
axe"><%- t('Axe') %></span>
<input type="text" name="title" value="<%- title %>">
</label>
...
...
@@ -36,7 +36,7 @@
<!-- aspect -->
<section class="fieldgroup">
<label class="inline">
<span class="label-text"><%- t('aspect') %></span>
<span class="label-text
js-help" data-href="#aspect
"><%- t('aspect') %></span>
<select name="aspect-value">
<option value="" <% if (!aspect) { %>selected<% } %>><%- t('aucun') %></option>
<% _.each(aspectChoices, function(a) {%>
...
...
@@ -49,13 +49,13 @@
<!-- contingent -->
<label>
<input type="checkbox" name="contingent" <% if (contingent) { %>checked<% } %>>
<%- t('axe contingent') %>
<span class="js-help" data-href="#axe-contingent">
<%- t('axe contingent') %>
</span>
</label>
<!-- modulé -->
<label>
<input type="checkbox" name="module" <% if (module_) { %>checked<% } %>>
<%- t('axe modulé') %>
<span class="js-help" data-href="#axe-module">
<%- t('axe modulé') %>
</span>
</label>
</fieldset>
<fieldset>
...
...
@@ -64,12 +64,12 @@
</fieldset>
<fieldset>
<!-- actant -->
<label><span class="label-text"><%- t('Actant') %></span>
<label><span class="label-text
js-help" data-href="#actant
"><%- t('Actant') %></span>
<input type="text" name="actant" value="<%- actant %>">
</label>
<!-- adresse -->
<label><span class="label-text"><%- t('Adresse') %></span>
<label><span class="label-text
js-help" data-href="#adresse
"><%- t('Adresse') %></span>
<input type="text" name="adresse" value="<%- adresse %>">
</label>
</fieldset>
...
...
@@ -78,19 +78,19 @@
<legend></legend>
<section class="fields">
<!-- Commandement -->
<label><span class="label-text"><%- t('Commandement') %></span>
<label><span class="label-text
js-help" data-href="#commandement
"><%- t('Commandement') %></span>
<input type="text" name="commandement" value="<%- commandement %>">
</label>
<!-- Destination -->
<label><span class="label-text"><%- t('Destination') %></span>
<label><span class="label-text
js-help" data-href="#destination
"><%- t('Destination') %></span>
<input type="text" name="destination" value="<%- destination %>">
</label>
<!-- Code -->
<label><span class="label-text"><%- t('Code') %></span>
<label><span class="label-text
js-help" data-href="#code
"><%- t('Code') %></span>
<input type="text" name="code" value="<%- code %>">
</label>
<!-- Indications -->
<label><span class="label-text"><%- t('Indications') %></span>
<label><span class="label-text
js-help" data-href="#indications
"><%- t('Indications') %></span>
<textarea name="indications"><%- indications %></textarea>
</label>
</section>
...
...
playground/templates/playground/underscore/score-form.mtpl
View file @
42c3a20a
<!-- Title -->
<label>
<span class="label-text"><%- t('Titre') %>:</span>
<span class="label-text
js-help" data-href="#titre
"><%- t('Titre') %>:</span>
<input type="text" name="title" value="<%- title %>" required>
</label>
<!-- description -->
<label>
<span class="label-text"><%- t('Présentation') %>: </span>
<span class="label-text
js-help" data-href="#presentation
"><%- t('Présentation') %>: </span>
<textarea name="presentation"><%- presentation %></textarea>
</label>
<!-- Setting -->
<label>
<span class="label-text"><%- t('Mise') %>:</span>
<span class="label-text
js-help" data-href="#mise
"><%- t('Mise') %>:</span>
<textarea name="stage_set"><%= stage_set %></textarea>
</label>
<!-- Performance author -->
<label>
<span class="label-text"><%- t('Auteur de la performance') %>:</span>
<span class="label-text
js-help" data-href="#auteur-de-la-performance
"><%- t('Auteur de la performance') %>:</span>
<input type="text" name="performance_author" value="<%- performance_author %>" <%- (score_type === 2) ? 'disabled' : '' %>>
</label>
<!-- Score author -->
<label>
<span class="label-text"><%- t('Auteur de la partition') %>:</span>
<span class="label-text
js-help" data-href="#auteur-de-la-partition
"><%- t('Auteur de la partition') %>:</span>
<input type="text" name="score_author" value="<%- score_author %>">
</label>
<!-- score_type = models.PositiveSmallIntegerField(default=1, choices=SCORE_TYPE_CHOICES) -->
<label>
<span class="label-text"><%- t('Type') %>:</span>
<span class="label-text
js-help" data-href="#type-de-partition
"><%- t('Type') %>:</span>
<select name="score_type">
<option value="0" <%- (score_type === 0) ? 'selected' : '' %>><%- t('Indéterminé') %></option>
<option value="1" <%- (score_type === 1) ? 'selected' : '' %>><%- t('Transcription') %></option>
...
...
@@ -41,33 +41,33 @@
</label>
<!-- effectif = models.CharField(blank=True, max_length=255) -->
<label data-name="effectif"><%- t('Effectif') %>:</label>
<label data-name="effectif
js-help" data-href="#effectif
"><%- t('Effectif') %>:</label>
<!-- Duration -->
<label>
<span class="label-text"><%- t('Durée') %>:</span>
<span class="label-text
js-help" data-href="#duree
"><%- t('Durée') %>:</span>
<input type="text" name="duration" value="<%- duration %>">
</label>
<!-- Tags -->
<label>
<span class="label-text"><%- t('Tags') %> (<%- t('séparer par une virgule') %>): </span>
<span class="label-text
js-help" data-href="#tags
"><%- t('Tags') %> (<%- t('séparer par une virgule') %>): </span>
<input type="text" name="tags" value="<%- tags %>">
</label>
<!-- Language -->
<label>
<span class="label-text"><%- t('Langue') %>: </span>
<span class="label-text
js-help" data-href="#langue
"><%- t('Langue') %>: </span>
<input type="text" name="language" value="<%- (language) ? language : W.utils.getUserLanguage() %>">
</label>
<!-- Permissions -->
<label>
<input type="checkbox" name="is_public" <% if (is_public) { %>checked<% } %>>
<span class="label-text" style="display: inline"><%- t('Publiée') %>: </span>
<span class="label-text
js-help" data-href="#partager-et-publier
" style="display: inline"><%- t('Publiée') %>: </span>
</label>
<span class="label-text"><%- t('Partager avec') %>: </span>
<span class="label-text
js-help" data-href="#partager-et-publier
"><%- t('Partager avec') %>: </span>
<div id="share_with"></div>
<button data-name="close"><%- t('Annuler') %></button>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment