Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
Revue de Press
Commits
6c7627df
Verified
Commit
6c7627df
authored
Dec 06, 2017
by
Thibaut Broggi
Browse files
Change the way groups are written in templates
parent
e270e8fa
Pipeline
#1760
passed with stages
in 1 minute and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/userprofile/templates/user/user_list.html
View file @
6c7627df
...
...
@@ -41,8 +41,8 @@
<td>
{{user.id}}
</td>
<td>
{{user.username}}
</td>
<td>
{{user.email}}
</td>
<td>
{{user.date_joined |date:'d/m/Y - H:i:s'}}
</td>
<td>
{{user.groups.
all.0
.name}}
</td>
<td>
{{user.date_joined |
date:'d/m/Y - H:i:s'}}
</td>
<td>
{{user.groups.
last
.name}}
</td>
<td></td>
</tr>
{% endfor %}
...
...
templates/base.html
View file @
6c7627df
...
...
@@ -57,17 +57,17 @@
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
>
Vous êtes {{user.groups.
all.0
.name}}
{% if user.groups.
all.0
.name == "padawan" %}
Vous êtes {{user.groups.
last
.name}}
{% if user.groups.
last
.name == "padawan" %}
<img
class=
"inline-image ml-2"
role=
"img"
src=
"{% static 'img/padawan.svg' %}"
/>
{% elif user.groups.
all.0
.name == "
J
edi" %}
{% elif user.groups.
last
.name == "
j
edi" %}
<img
class=
"inline-image ml-2"
role=
"img"
src=
"{% static 'img/jedi.svg' %}"
/>
{% endif %}
</a>
</li>
</ul>
{% else %}
<span
class=
"navbar-text ml-auto text-muted"
>
For jedi
s
by jedi
s
</span>
<span
class=
"navbar-text ml-auto text-muted"
>
For jedi by jedi
</span>
{% endif %}
</div>
</nav>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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