templates/library/learning.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3. <main id="main">
  4. <!-- ======= Breadcrumbs ======= -->
  5. <section id="breadcrumbs" class="breadcrumbs">
  6. <div class="container">
  7. <ol>
  8. <li><a href="{{path('app_home')}}">Startseite</a></li>
  9. <li><a href="{{path('app_library_overview')}}">Bibliothek</a></li>
  10. <li><a href="{{path('app_library_pool',{libId: libId})}}">{{libname}}</a></li>
  11. <li>{{poolname}}</li>
  12. </ol>
  13. <h2>{{poolname}}</h2>
  14. </div>
  15. </section>
  16. <!-- End Breadcrumbs -->
  17. {% if (pooltype == 0) %}
  18. <!-- ======= Our Skills Section ======= -->
  19. <section id="skills" class="contact">
  20. <div class="container">
  21. <div class="section-title">
  22. <h2>Neue Karte erstellen</h2>
  23. <p>Erstelle eine neue Karteikarte, welche automatisch im Sammler abgelegt wird.</p>
  24. </div>
  25. <div class="row">
  26. <div class="col-lg-6">
  27. <img src="{{asset('assets/img/about.jpg')}}" class="img-fluid" alt="">
  28. </div>
  29. <div class="col-lg-6">
  30. {{ form_start(cardform) }}
  31. <div class="form-group mt-3">
  32. {{ form_row(cardform.task) }}
  33. </div>
  34. <div class="form-group mt-3">
  35. {{ form_row(cardform.solution) }}
  36. </div>
  37. <div class="form-group mt-3">
  38. {{ form_row(cardform.classification) }}
  39. </div>
  40. <div class="text-center"><br />{{ form_row(cardform.Erstellen) }}</div>
  41. {{ form_end(cardform) }}
  42. </div>
  43. </div>
  44. </div>
  45. </section>
  46. <!-- End Our Skills Section -->
  47. {% endif %}
  48. <!-- ======= Services Section ======= -->
  49. <section id="testimonials" class="testimonials">
  50. <div class="container">
  51. <div class="section-title">
  52. <h2>Vorhandene Karten ({{ cardscount }}) lernen</h2>
  53. </div>
  54. <div class="row portfolio entry-content">
  55. {% if (pooltype == 1 or pooltype == 2 or pooltype == 3) %}
  56. {% set i = 0 %}
  57. {% for c in cards %}
  58. {% if (c.correct == 0) %}
  59. {% set i = 1 %}
  60. {% endif %}
  61. {% endfor %}
  62. {% if (i == 0) %}
  63. <div class="col-lg-12 d-flex justify-content-center">
  64. <ul id="portfolio-flters">
  65. <li ><a href="{{path('app_pool2',{libId: libId, poolId: poolId, action: "refresh"})}}" class="buy-btn">Pool aktualisieren</a></li>
  66. </ul>
  67. </div>
  68. {% endif %}
  69. {% endif %}
  70. </div>
  71. <div class="row">
  72. {% set a = 0 %}
  73. {% set b = 1 %}
  74. {% for c in cards %}
  75. {% set a = a + 1 %}
  76. {% if (c.correct != 0) %}
  77. {% set b = b + 1 %}
  78. {% endif %}
  79. {% endfor %}
  80. {% set i = 0 %}
  81. {% for c in cards %}
  82. {% if (c.correct == 0) %}
  83. {% if (action == "learn" and i == 0) or (action == "learnshow" and c.id == cardId) %}
  84. <div class="col-lg-4">
  85. <div class="testimonial-item mt-4">
  86. <h3>({{b}}/{{a}}) {{c.task|raw}}</h3>
  87. <h4><strong>Einordnung:</strong> <i>{{c.cname}}</i></h4>
  88. <h4><strong>Letzter Lernstatus:</strong> <i>{% if (c.correct2 == 0) %}n/a{% endif %}{% if (c.correct2 == 1) %}richtig{% endif %}{% if (c.correct2 == 2) %}falsch{% endif %}{% if (c.correct2 == 3) %}verschoben{% endif %}</i></h4>
  89. {% if (action == "learnshow") %}
  90. <p>
  91. {{c.solution|nl2br}}
  92. </p>
  93. {% endif %}
  94. <p>&nbsp;</p>
  95. {% if (action == "learn") %}
  96. <a href="{{path('app_pool3',{libId: libId, poolId: poolId, action: "learnshow", cardId: c.id})}}"><i class="bi bi-eye-fill"></i></a>
  97. {% endif %}
  98. {% if (action == "learnshow") %}
  99. <a href="{{path('app_pool3',{libId: libId, poolId: poolId, action: "true", cardId: c.id})}}"><i class="bi bi-check-circle-fill"></i></a>
  100. &nbsp;&nbsp;&nbsp;
  101. <a href="{{path('app_pool3',{libId: libId, poolId: poolId, action: "false", cardId: c.id})}}"><i class="bi bi-x-circle-fill"></i></a>
  102. {% endif %}
  103. </div>
  104. </div>
  105. {% endif %}
  106. {% set i = i + 1 %}
  107. {% endif %}
  108. {% endfor %}
  109. {% for c in cards %}
  110. {% if (c.correct != 0) %}
  111. <div class="col-lg-4">
  112. <div class="testimonial-item mt-4">
  113. <h3>{{c.task|raw}}</h3>
  114. <h4><strong>Einordnung:</strong> <i>{{c.cname}}</i></h4>
  115. <h4><strong>Letzter Lernstatus:</strong> <i>{% if (c.correct2 == 0) %}n/a{% endif %}{% if (c.correct2 == 1) %}richtig{% endif %}{% if (c.correct2 == 2) %}falsch{% endif %}{% if (c.correct2 == 3) %}verschoben{% endif %}</i></h4>
  116. <p>
  117. {{c.solution|nl2br}}
  118. </p>
  119. <p>&nbsp;</p>
  120. </div>
  121. </div>
  122. {% endif %}
  123. {% endfor %}
  124. </div>
  125. </div>
  126. </section>
  127. <!-- End Services Section -->
  128. </main>
  129. <!-- End #main -->
  130. {% endblock %}