page.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends 'base.html' %}
  2. {% load crispy_forms_tags %}
  3. {% load static %}
  4. {% block main %}
  5. <div class="card-body">
  6. {% if not page.output or page.err %}
  7. {{page.p_contenu|safe}}
  8. {% else %}
  9. {% if page.err %}{{page.err|safe}}{% endif %}
  10. {% if page.output and page.err %}<hr>{% endif %}
  11. {% if page.output %}{{page.output|safe|urlize}}{% endif %}
  12. {% endif %}
  13. {% if page.form and not page.output %}
  14. <div class="col-sm-9 p-0 m-3">
  15. <div class="card text-white bg-dark">
  16. {% if page.p_f_titre %}<div class="card-header">{{page.p_f_titre}}</div>{% endif %}
  17. <div class="card-body">
  18. <form action="{{page.p_adresse}}" method="post">{% csrf_token %}
  19. {{ page.form|crispy }}
  20. <input type="submit" class="btn btn-success mt-1" value="Valider">
  21. </form>
  22. </div>
  23. </div>
  24. </div>
  25. {% endif %}
  26. </div>
  27. {% endblock %}
  28. {% block right_panel %}
  29. {% if page.p_right != "" %}
  30. <div class="card-body">
  31. {% if page.form and page.output %}
  32. {% if page.p_f_titre %}<div class="card-header">{{page.p_f_titre}}</div>{% endif %}
  33. <form class="mb-2" action="{{page.p_adresse}}" method="post">{% csrf_token %}
  34. {{ page.form|crispy }}
  35. <input type="submit" class="btn btn-success mt-1" value="Valider">
  36. </form>
  37. {% endif %}
  38. {{page.p_right|safe}}
  39. </div>
  40. {% endif %}
  41. {% endblock %}