diff options
Diffstat (limited to 'blog/templates/blog/table_template.html')
-rw-r--r-- | blog/templates/blog/table_template.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/blog/templates/blog/table_template.html b/blog/templates/blog/table_template.html new file mode 100644 index 0000000..53081ac --- /dev/null +++ b/blog/templates/blog/table_template.html @@ -0,0 +1,48 @@ +<table class="table table-hover"> + {% if table_header %} + <thead> + <tr> + {% for column in table_header %} + <th> + {% if column.strip %} + {% if html_renderer %} + {{ column.strip|safe|linebreaksbr }} + {% else %} + {{ column.strip|linebreaksbr }} + {% endif %} + {% endif %} + </th> + {% endfor %} + </tr> + </thead> + {% endif %} + <tbody> + {% for row in data %} + <tr> + {% for column in row %} + {% if first_col_is_header and forloop.first %} + <th> + {% if column.strip %} + {% if html_renderer %} + {{ column.strip|safe|linebreaksbr }} + {% else %} + {{ column.strip|linebreaksbr }} + {% endif %} + {% endif %} + </th> + {% else %} + <td> + {% if column.strip %} + {% if html_renderer %} + {{ column.strip|safe|linebreaksbr }} + {% else %} + {{ column.strip|linebreaksbr }} + {% endif %} + {% endif %} + </td> + {% endif %} + {% endfor %} + </tr> + {% endfor %} + </tbody> +</table> |