Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mathieu
potage
Commits
b27cbe82
Commit
b27cbe82
authored
Jul 26, 2018
by
Mat
Browse files
hop
parent
c37ff64f
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/js/ajax_functions.js
100644 → 100755
View file @
b27cbe82
...
...
@@ -269,6 +269,27 @@ function displayBodyOneInfo(body, info)
* Affiche l'entête d'une lettre
* @param lettre json
*/
function
displayHeaderLettre
(
lettre
,
facultatif
=
false
)
{
//let abonnes = lettre.groupe.utilisateurs.length + ' abonné' + (lettre.groupe.utilisateurs.length > 1 ? 's' : '');
let
abonnes
;
let
periode
=
facultatif
?
''
:
displayPeriodAndOffre
(
lettre
);
return
`<div class="lettre-header"><dl>
<dt>Pour:</dt>
<dd>
groupe
${
lettre
.
groupe
.
nom
}
<span class="details parenth">
${
abonnes
}
</span>
</dd>
<dt>Sujet:</dt>
<dd>
${
lettre
.
subject
}
</dd>
${
periode
}
</dl></div>`
;
}
function
displayPeriodAndOffre
(
lettre
)
{
let
offreLink
=
Routing
.
generate
(
'
potage_offre_legumes_ajax_display
'
,
{
'
id
'
:
lettre
.
offre
.
id
});
...
...
@@ -289,26 +310,7 @@ function displayPeriodAndOffre(lettre)
</dd>
`
;
}
function
displayHeaderLettre
(
lettre
,
facultatif
=
false
)
{
//let abonnes = lettre.groupe.utilisateurs.length + ' abonné' + (lettre.groupe.utilisateurs.length > 1 ? 's' : '');
let
abonnes
;
let
periode
=
facultatif
?
''
:
displayPeriodAndOffre
(
lettre
);
return
`<div class="lettre-header"><dl>
<dt>Pour:</dt>
<dd>
groupe
${
lettre
.
groupe
.
nom
}
<span class="details parenth">
${
abonnes
}
</span>
</dd>
<dt>Sujet:</dt>
<dd>
${
lettre
.
subject
}
</dd>
${
periode
}
</dl></div>`
;
}
...
...
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