Skip to content

Commit

Permalink
Remaniement de la page de validation des tutoriels
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Jul 27, 2014
1 parent eaf3648 commit ce103c8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
13 changes: 7 additions & 6 deletions assets/scss/_all-supports.scss
Expand Up @@ -1048,19 +1048,24 @@
}

.member-item {
margin-right: 7px;

.avatar {
margin-top: -2px;
height: 20px;
width: 20px;
border: 1px solid #CCC;
}

.avatar + span {
padding-left: 3px;
}

&:hover .avatar {
border-color: #999;
}
}
.member-item + .member-item {
margin-left: 7px;
}
.authors .member-item {
margin-right: 0;
margin-left: 7px;
Expand Down Expand Up @@ -2370,10 +2375,6 @@ table {
text-indent: 20px;
}

.member-item {
margin: 0;
}

textarea {
margin: 10px 0 10px -1px;
background-color: transparent;
Expand Down
12 changes: 5 additions & 7 deletions templates/misc/member_item.part.html
Expand Up @@ -12,13 +12,11 @@
itemprop="author"
{% endif %}
>{% spaceless %}
{% if avatar %}
<img src="{{ profile.get_avatar_url }}" alt="" class="avatar" itemprop="image">
{% endif %}

<span itemprop="name">
{{ member.username }}
</span>
{% if avatar %}
<img src="{{ profile.get_avatar_url }}" alt="" class="avatar" itemprop="image">
{% endif %}

<span itemprop="name">{{ member.username }}</span>

{% if info %}
<span class="info">({{ info }})</span>
Expand Down
27 changes: 16 additions & 11 deletions templates/tutorial/validation/index.html
Expand Up @@ -47,9 +47,8 @@ <h2 class="subtitle">{{ headlinesub|safe }}</h2>
<thead>
<tr>
<th>Titre</th>
<th width="8%">Catégorie(s)</th>
<th width="8%">Auteur(s)</th>
<th width="8%">Proposé</th>
<th width="15%">Auteur(s)</th>
<th width="10%">Proposé</th>
<th width="24%">Statut</th>
</tr>
</thead>
Expand All @@ -60,21 +59,27 @@ <h2 class="subtitle">{{ headlinesub|safe }}</h2>
<a href="{% url "zds.tutorial.views.view_tutorial" validation.tutorial.pk validation.tutorial.slug %}?version={{ validation.version }}">
{{ validation.tutorial.title }}
</a>
</td>
<td>
{% for subcategory in validation.tutorial.subcategory.all %}
<a href="{% url "zds.tutorial.views.list_validation" %}?subcategory={{subcategory.pk}}">
{{ subcategory.title }}
</a>
{% endfor %}
<br>
{% if validation.tutorial.subcategory.all %}
Catégories :
{% for subcategory in validation.tutorial.subcategory.all %}
{% if not forloop.first %}
-
{% endif %}
<a href="{% url "zds.tutorial.views.list_validation" %}?subcategory={{ subcategory.pk }}">
{{ subcategory.title }}</a>
{% endfor %}
{% else %}
<em>Aucune catégorie</em>
{% endif %}
</td>
<td>
{% for author in validation.tutorial.authors.all %}
{% include 'misc/member_item.part.html' with member=author avatar=True %}
{% endfor %}
</td>
<td>
<span>{{ validation.date_proposition|format_date|capfirst }}</span>
<span>{{ validation.date_proposition|format_date:True|capfirst }}</span>
</td>
<td>
{% captureas reservation_url %}
Expand Down

0 comments on commit ce103c8

Please sign in to comment.