Skip to content

Commit

Permalink
Merge pull request #2149 from gustavi/fix-2124
Browse files Browse the repository at this point in the history
Fix #2124 : Ajout de la version en ligne dans l'historique d'un tutoriel
  • Loading branch information
SpaceFox committed Feb 10, 2015
2 parents 4b90cc5 + 4047ec5 commit 6ea406f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
5 changes: 5 additions & 0 deletions assets/scss/base/_helpers.scss
Expand Up @@ -62,6 +62,11 @@ hr.clearfix {
border: none;
}

.unstyled-list {
list-style: none;
padding-left: 0;
}

// Hidden on mobile
.screen,
.wide {
Expand Down
35 changes: 25 additions & 10 deletions templates/tutorial/tutorial/history.html
Expand Up @@ -52,7 +52,7 @@ <h2 class="subtitle">
<table class="fullwidth">
<thead>
<tr>
<th width="10%">{% trans "Etat" %}</th>
<th width="10%">{% trans "État" %}</th>
<th width="18%">{% trans "Date" %}</th>
<th>{% trans "Version" %}</th>
<th width="10%">{% trans "Diff" %}.</th>
Expand All @@ -64,14 +64,29 @@ <h2 class="subtitle">
{% for log in logs %}
<tr>
<td>
{% if tutorial.sha_validation = log.newhexsha %}
{% trans "Validation" %}
{% endif %}
{% if tutorial.sha_beta = log.newhexsha %}
{% trans "Beta" %}
{% endif %}
{% if tutorial.sha_draft = log.newhexsha %}
{% trans "Draft" %}
{% if tutorial.sha_public == log.newhexsha or tutorial.sha_validation == log.newhexsha or tutorial.sha_beta == log.newhexsha or tutorial.sha_draft == log.newhexsha %}
<ul class="unstyled-list">
{% if tutorial.sha_public == log.newhexsha %}
<li>
{% trans "En ligne" %}
</li>
{% endif %}
{% if tutorial.sha_validation == log.newhexsha %}
<li>
{% trans "En validation" %}
</li>
{% endif %}
{% if tutorial.sha_beta == log.newhexsha %}
<li>
{% trans "En bêta" %}
</li>
{% endif %}
{% if tutorial.sha_draft == log.newhexsha %}
<li>
{% trans "Brouillon" %}
</li>
{% endif %}
</ul>
{% endif %}
</td>
<td>
Expand All @@ -97,7 +112,7 @@ <h2 class="subtitle">
{% endwith %}
</td>
<td>
{% if not tutorial.sha_beta = log.newhexsha %}
{% if not tutorial.sha_beta == log.newhexsha %}
<a href="#activ-beta-{{ log.newhexsha }}" class="open-modal">
{% if not tutorial.sha_beta %}
{% trans "Activer" %}
Expand Down

0 comments on commit 6ea406f

Please sign in to comment.