A few notes and template changes.

This commit is contained in:
Norm Rasmussen
2023-07-07 15:51:41 -04:00
parent 58dd40bf99
commit c6b0c5682f
27 changed files with 692 additions and 221 deletions

View File

@ -28,30 +28,38 @@
<div class="np-card-content-footer">
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
{% if course_ribbon == "hochladen" %}
{% if course_ribbon == "hochladen" or course_ribbon == "upload" %}
<a class="np-button np-button-wide" href="{{ course_path }}">
Hochladen
<span data-lang="DE">Hochladen</span>
<span data-lang="EN">Upload</span>
</a>
{% else %}
<a class="np-button np-button-wide" href="{{ course_path }}">
{% t shared.view %}
<span data-lang="DE">{% t shared.view %}</span>
{% if course.progress > 0 and course.progress < 100 %}
<span data-lang="EN">Continue</span>
{% else %}
<span data-lang="EN">View</span>
{% endif %}
</a>
{% endif %}
{% if course.enrolled? %}
{% unless course_ribbon == "demnächst" or course.name == "Neue Lerninhalte" %}
{% unless course_ribbon == "demnächst" or course.name == "Neue Lerninhalte" or course_ribbon == "coming soon" or course_ribbon == "New learning content" %}
{% if course.has_to_restart? %}
{% include "course_version_outdated_popup", path: course_path %}
{% endif %}
<div class="np-card-content-progress np-button-color">
{% if course.completed? %}
Abgeschlossen
<span data-lang="DE">Abgeschlossen</span>
<span data-lang="EN">Completed</span>
{% elsif course.started? == false %}
0% abgeschlossen
<span data-lang="DE">0% abgeschlossen</span>
<span data-lang="EN">0% completed</span>
{% else %}
{% comment %} {{ course.progress }}% Abgeschlossen {% endcomment %}
{% t shared.progress, count: course.progress %}
<span data-lang="DE">{% t shared.progress, count: course.progress %}</span>
<span data-lang="EN">{{course.progress}}% completed</span>
{% endif %}
</div>
{% endunless %}