html.tpl 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {# Update the template_structure.html document too #}
  2. {%- block before_style -%}{%- endblock before_style -%}
  3. {% block style %}
  4. <style type="text/css" >
  5. {% block table_styles %}
  6. {% for s in table_styles %}
  7. #T_{{uuid}} {{s.selector}} {
  8. {% for p,val in s.props %}
  9. {{p}}: {{val}};
  10. {% endfor -%}
  11. }
  12. {%- endfor -%}
  13. {% endblock table_styles %}
  14. {% block before_cellstyle %}{% endblock before_cellstyle %}
  15. {% block cellstyle %}
  16. {%- for s in cellstyle %}
  17. #T_{{uuid}}{{s.selector}} {
  18. {% for p,val in s.props %}
  19. {{p}}: {{val}};
  20. {% endfor %}
  21. }
  22. {%- endfor -%}
  23. {%- endblock cellstyle %}
  24. </style>
  25. {%- endblock style %}
  26. {%- block before_table %}{% endblock before_table %}
  27. {%- block table %}
  28. <table id="T_{{uuid}}" {% if table_attributes %}{{ table_attributes }}{% endif %}>
  29. {%- block caption %}
  30. {%- if caption -%}
  31. <caption>{{caption}}</caption>
  32. {%- endif -%}
  33. {%- endblock caption %}
  34. {%- block thead %}
  35. <thead>
  36. {%- block before_head_rows %}{% endblock %}
  37. {%- for r in head %}
  38. {%- block head_tr scoped %}
  39. <tr>
  40. {%- for c in r %}
  41. {%- if c.is_visible != False %}
  42. <{{ c.type }} class="{{c.class}}" {{ c.attributes|join(" ") }}>{{c.value}}</{{ c.type }}>
  43. {%- endif %}
  44. {%- endfor %}
  45. </tr>
  46. {%- endblock head_tr %}
  47. {%- endfor %}
  48. {%- block after_head_rows %}{% endblock %}
  49. </thead>
  50. {%- endblock thead %}
  51. {%- block tbody %}
  52. <tbody>
  53. {% block before_rows %}{% endblock before_rows %}
  54. {% for r in body %}
  55. {% block tr scoped %}
  56. <tr>
  57. {% for c in r %}
  58. {% if c.is_visible != False %}
  59. <{{ c.type }} {% if c.id is defined -%} id="T_{{ uuid }}{{ c.id }}" {%- endif %} class="{{ c.class }}" {{ c.attributes|join(" ") }}>{{ c.display_value }}</{{ c.type }}>
  60. {% endif %}
  61. {%- endfor %}
  62. </tr>
  63. {% endblock tr %}
  64. {%- endfor %}
  65. {%- block after_rows %}{%- endblock after_rows %}
  66. </tbody>
  67. {%- endblock tbody %}
  68. </table>
  69. {%- endblock table %}
  70. {%- block after_table %}{% endblock after_table %}