diff --git a/assets/scss/_all-supports.scss b/assets/scss/_all-supports.scss index f27830fddd..52af051681 100644 --- a/assets/scss/_all-supports.scss +++ b/assets/scss/_all-supports.scss @@ -1310,6 +1310,10 @@ } } +.tutorial-list { + margin: 0 0 12px 0; +} + .tutorial-list article, .main .article-content .tutorial-list article { min-height: 60px; @@ -1344,6 +1348,7 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + clear: none; } a { text-decoration: none; @@ -1395,6 +1400,10 @@ } } + .tutorial-help{ + margin: 12px 0 0 0; + } + .tutorial-help img.light { opacity: 0.2; &:hover, diff --git a/templates/tutorial/tutorial/help.html b/templates/tutorial/tutorial/help.html index 9331cac9da..2be1609814 100644 --- a/templates/tutorial/tutorial/help.html +++ b/templates/tutorial/tutorial/help.html @@ -18,96 +18,98 @@ {% endblock %} +{% block headline %} +

{% trans "Aider les auteurs de tutoriels" %} ({{ tutorials|length }})

+{% endblock %} -{% block content_out %} -
-

- {% block headline %} - {% trans "Aider les auteurs de tutoriels" %} ({{ tutorials|length }}) - {% endblock %} -

- - {% block content %} - {% if tutorials %} -
- {% for tutorial in tutorials %} -
- {% if tutorial.image.physical.tutorial_illu.url %} - - {% endif %} -
-

{{tutorial.title}}

- {% trans "Par " %} - {% for author in tutorial.authors.all %} - {% if not forloop.first %} - {% if forloop.last %} - {% trans "et" %} - {% else %} - , - {% endif %} - {% endif %} - {% if author == user %} - {% trans "vous" %} - {% else %} - - {{author.username}} - - {% endif %} - {% endfor %} - {% if not user in tutorial.authors.all %} - - {% trans "Contacter par MP" %} - {% endif %} - - -
- {% if tutorial.on_line %} - - {% blocktrans %}Tutoriel en ligne{% endblocktrans %} - + +{% block content %} + {% include "misc/pagination.part.html" with position="top" %} + + {% if tutorials %} +
+ {% for tutorial in tutorials %} +
+ {% if tutorial.image.physical.tutorial_illu.url %} + + {% endif %} +
+

{{ tutorial.title }}

+ + + {% trans "Par " %} + {% for author in tutorial.authors.all %} + {% if not forloop.first %} + {% if forloop.last %} + {% trans "et" %} {% else %} - {% blocktrans %}Tutoriel hors-ligne{% endblocktrans %} + , {% endif %} - {% if tutorial.in_beta %} - - {% blocktrans %}Bêta Active{% endblocktrans %} - - {% else %} - {% blocktrans %}Bêta Inactive{% endblocktrans %} + {% endif %} + {% if author == user %} + {% trans "vous" %} + {% else %} + + {{author.username}} + + {% endif %} + {% endfor %} + {% if not user in tutorial.authors.all %} + - {% trans "Contacter par MP" %} + {% endif %} +
+ +
-
-
+ {% endfor %} + {% endif %} + +
+ +
+ {% if tutorial.on_line %} + + {% blocktrans %}Tutoriel en ligne{% endblocktrans %} + + {% else %} + {% blocktrans %}Tutoriel hors-ligne{% endblocktrans %} + {% endif %} + {% if tutorial.in_beta %} + + {% blocktrans %}Bêta Active{% endblocktrans %} + + {% else %} + {% blocktrans %}Bêta Inactive{% endblocktrans %} + {% endif %} + {% for help in helps %} + + {% if help in tutorial.helps.all %} + {{help.title}} + {% else %} + {{help.title}} + {% endif %} + {% endfor %}
- {% else %} -

- {% trans "Aucun auteur n'a besoin d'aide pour le moment." %} -

- {% endif %} - {% endblock %} -
+ + {% endfor %} + + {% else %} +

+ {% trans "Aucun auteur n'a besoin d'aide pour le moment." %} +

+ {% endif %} + + {% include "misc/pagination.part.html" with position="bottom" %} {% endblock %} diff --git a/zds/settings.py b/zds/settings.py index 55ae17f21f..785033ab0b 100644 --- a/zds/settings.py +++ b/zds/settings.py @@ -363,6 +363,7 @@ 'repo_public_path': os.path.join(SITE_ROOT, 'tutoriels-public'), 'default_license_pk': 7, 'home_number': 5, + 'helps_per_page': 20 }, 'forum': { 'posts_per_page': 21, diff --git a/zds/tutorial/views.py b/zds/tutorial/views.py index 178853dfef..4226392951 100644 --- a/zds/tutorial/views.py +++ b/zds/tutorial/views.py @@ -3621,7 +3621,7 @@ def help_tutorial(request): .all() # Paginator - paginator = Paginator(tutos, settings.ZDS_APP['forum']['topics_per_page']) + paginator = Paginator(tutos, settings.ZDS_APP['tutorial']['helps_per_page']) page = request.GET.get('page') try: