Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
mathieu
potage
Commits
b27cbe82
Commit
b27cbe82
authored
Jul 26, 2018
by
Mat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hop
parent
c37ff64f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
web/js/ajax_functions.js
web/js/ajax_functions.js
+21
-19
No files found.
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
Markdown
is supported
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