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
77fd6a1b
Commit
77fd6a1b
authored
Jun 25, 2018
by
Mat
Browse files
Lettre, finitions icones
parent
29c40459
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/PotageBundle/Resources/views/Lettre/ajaxDisplay.js
View file @
77fd6a1b
...
...
@@ -74,13 +74,15 @@ function buildRowLettre(jsonRow)
let
offreLink
=
Routing
.
generate
(
'
potage_offre_legumes_ajax_display
'
,
{
'
id
'
:
jsonRow
.
offre
.
id
});
let
abonnes
=
jsonRow
.
groupe
.
utilisateurs
.
length
+
'
abonné
'
+
(
jsonRow
.
groupe
.
utilisateurs
.
length
>
1
?
'
s
'
:
''
);
let
legumes
=
jsonRow
.
offre
.
offre_legumes
.
length
+
'
légume
'
+
(
jsonRow
.
offre
.
offre_legumes
.
length
>
1
?
'
s
'
:
''
);
let
td3
=
document
.
createElement
(
'
td
'
);
td3
.
innerHTML
=
`<dl>
<dt>Pour:</dt>
<dd>
groupe
${
jsonRow
.
groupe
.
nom
}
<span class="details parenth">
<i class="fas fa-user fa-fw"></i>
${
abonnes
}
</span>
<span class="details parenth">
${
abonnes
}
</span>
</dd>
<dt>Sujet:</dt>
<dd>
...
...
@@ -95,6 +97,7 @@ function buildRowLettre(jsonRow)
<dd>
<a href="
${
offreLink
}
" title="Voir l'offre" class="btn btn-outline-dark btn-sm">
<i class="fas fa-paperclip fa-fw"></i>
${
jsonRow
.
offre
.
reference
}
</a>
<span class="details parenth">
${
legumes
}
</span>
</dd>
</dl>`
;
tr
.
appendChild
(
td3
);
...
...
@@ -212,7 +215,7 @@ function displayEditLettreLink(jsonRow)
dropBtn
.
dataset
.
toggle
=
'
dropdown
'
;
dropBtn
.
setAttribute
(
'
aria-haspopup
'
,
true
);
dropBtn
.
setAttribute
(
'
aria-expanded
'
,
false
);
dropBtn
.
textContent
=
jsonRow
.
reference
;
dropBtn
.
innerHTML
=
'
<i class="far fa-envelope-open fa-fw"></i>
'
+
jsonRow
.
reference
;
dropdown
.
appendChild
(
dropBtn
);
let
dropmenu
=
document
.
createElement
(
'
div
'
);
...
...
@@ -234,7 +237,7 @@ function displayEditLettreLink(jsonRow)
else
{
let
linkLettreInfos
=
displayLinkLettreInfos
(
jsonRow
);
linkLettreInfos
.
textContent
=
jsonRow
.
reference
;
linkLettreInfos
.
innerHTML
=
'
<i class="far fa-envelope fa-fw"></i>
'
+
jsonRow
.
reference
;
linkLettreInfos
.
classList
.
add
(
'
btn
'
,
'
btn-outline-dark
'
,
'
btn-sm
'
,
'
mb-1
'
,
'
mr-1
'
);
return
linkLettreInfos
;
...
...
src/PotageBundle/Resources/views/Offre/ajaxDisplay.js
View file @
77fd6a1b
...
...
@@ -78,7 +78,7 @@ function buildRowOffre(jsonRow)
referenceBtn
.
setAttribute
(
'
href
'
,
href
);
referenceBtn
.
setAttribute
(
'
title
'
,
'
Éditer
'
);
referenceBtn
.
classList
.
add
(
'
btn
'
,
'
btn-outline-dark
'
,
'
btn-sm
'
,
'
mb-1
'
,
'
mr-1
'
);
referenceBtn
.
textContent
=
jsonRow
.
reference
;
referenceBtn
.
innerHTML
=
'
<i class="fas fa-paperclip fa-fw"></i>
'
+
jsonRow
.
reference
;
td6
.
appendChild
(
referenceBtn
);
if
(
jsonRow
.
status
===
'
draft
'
)
...
...
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