object_configcontext.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {% extends base_template %}
  2. {% load helpers %}
  3. {% load static %}
  4. {% block title %}{{ block.super }} - Config Context{% endblock %}
  5. {% block content %}
  6. <div class="row">
  7. <div class="col-md-6">
  8. <div class="panel panel-default">
  9. <div class="panel-heading">
  10. <strong>Rendered Context</strong>
  11. {% include 'extras/inc/configcontext_format.html' %}
  12. </div>
  13. <div class="panel-body">
  14. {% include 'extras/inc/configcontext_data.html' with data=rendered_context %}
  15. </div>
  16. </div>
  17. </div>
  18. <div class="col-md-6">
  19. <div class="panel panel-default">
  20. <div class="panel-heading">
  21. <strong>Local Context</strong>
  22. </div>
  23. <div class="panel-body">
  24. {% if obj.local_context_data %}
  25. {% include 'extras/inc/configcontext_data.html' with data=obj.local_context_data %}
  26. {% else %}
  27. <span class="text-muted">None</span>
  28. {% endif %}
  29. </div>
  30. <div class="panel-footer">
  31. <span class="help-block">
  32. <i class="fa fa-info-circle"></i>
  33. The local config context overwrites all source contexts.
  34. </span>
  35. </div>
  36. </div>
  37. <div class="panel panel-default">
  38. <div class="panel-heading">
  39. <strong>Source Contexts</strong>
  40. </div>
  41. {% for context in source_contexts %}
  42. <div class="panel-body">
  43. <div class="pull-right">
  44. <span class="text-muted">{{ context.weight }}</span>
  45. </div>
  46. <a href="{{ context.get_absolute_url }}"><strong>{{ context.name }}</strong></a>
  47. {% if context.description %}
  48. <br /><small>{{ context.description }}</small>
  49. {% endif %}
  50. {% include 'extras/inc/configcontext_data.html' with data=context.data %}
  51. </div>
  52. {% empty %}
  53. <div class="panel-body">
  54. <span class="text-muted">None found</span>
  55. </div>
  56. {% endfor %}
  57. </div>
  58. </div>
  59. </div>
  60. {% endblock %}
  61. {% block javascript %}
  62. <script src="{% static 'js/configcontext.js' %}?v{{ settings.VERSION }}"></script>
  63. {% endblock %}