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
a4fcef01
Commit
a4fcef01
authored
Sep 07, 2018
by
Mat
Browse files
today template, hop
parent
d6ea554b
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/PotageBundle/Resources/views/Mail/bodyMail.html.twig
View file @
a4fcef01
...
...
@@ -8,6 +8,7 @@
.brand
{
background-color
:
#2d2a2a
;
padding
:
1em
;
}
.brand
span
{
color
:
white
;
font-size
:
1.25rem
;
margin-bottom
:
10px
;
}
.brand
img
{
height
:
40px
;
}
.offre
{
border
:
1px
solid
#000
;
margin
:
1em
0
;
padding
:
1em
;
}
</style>
</head>
<body>
...
...
src/PotageBundle/Resources/views/Membre/today.html.twig
View file @
a4fcef01
...
...
@@ -10,25 +10,19 @@
<div
class=
"row"
>
<div
class=
"col-md-10 offset-md-1 bloc"
>
{%
if
app.user
%}
id:
{{
app.user.id
}}
<br>
username:
{{
app.user.username
}}
<br>
email:
{{
app.user.email
}}
<br>
roles:
{%
for
roles
in
app.token.roles
%}{{
roles.role
}}
,
{%
endfor
%}
<br>
dernière connexion:
{{
app.user.lastLogin
|
date
(
"d M Y, à H:i:s"
)
}}
<br>
{%
if
app.user.utilisateur
%}
nom:
{{
app.user.utilisateur.prenom
}}
{{
app.user.utilisateur.nom
}}
<br>
{%
endif
%}
<hr>
{%
endif
%}
{%
if
offreOne
is
defined
%}
{%
if
offreOne
is
not
null
%}
{#
# affiche l'offre passée par le token, ou dans l'URL
#}
<h1>
{{
offreOne.reference
}}
| Offre de légumes n°
{{
offreOne.id
}}
</h1>
<h3>
Expire le
{{
offreOne.endedAt
|
date
(
'd M Y à H:i A'
)
}}
</h3>
{# Afficher le temps restant
# https://stackoverflow.com/a/5906737
#}
<div
id=
"offre"
class=
"grid"
>
{%
for
legume
in
legumesSorted
%}
<div
class=
"item image legume"
...
...
@@ -51,6 +45,9 @@
{%
endfor
%}
</div>
{#
# aucune offre n'est pointée spécifiquement
#}
{%
else
%}
{%
if
groupes
%}
<h2>
Offres en cours
</h2>
...
...
@@ -78,6 +75,20 @@
{%
endif
%}
{#
# user connecté
#}
{%
if
app.user
%}
<div
class=
"user"
>
Roles:
{%
if
is_granted
(
'ROLE_SUPER_ADMIN'
)
%}
Administrateur
{%
elseif
is_granted
(
'ROLE_ADMIN'
)
%}
Maraîcher
{%
else
%}
Mangeur
{%
endif
%}
<br>
{%
if
app.user.utilisateur
%}
Nom:
{{
app.user.utilisateur.prenom
}}
{{
app.user.utilisateur.nom
}}
<br>
{%
endif
%}
Username:
{{
app.user.username
}}
<br>
Email:
{{
app.user.email
}}
<br>
Dernière connexion:
{{
app.user.lastLogin
|
date
(
"d M Y, à H:i:s"
)
}}
</div>
{%
endif
%}
{{
dump
()
}}
</div>
</div>
...
...
web/css/style.css
View file @
a4fcef01
...
...
@@ -410,5 +410,7 @@ body[id^='today'] #offre.grid div.item .overlay {
font-size
:
10px
;
}
body
[
id
^=
'today'
]
div
.user
{
margin
:
2em
0
;
}
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