forums.html 918 B

1234567891011121314151617181920212223242526272829
  1. {% extends "admin/admin/list.html" %}
  2. {% from "admin/macros.html" import page_title %}
  3. {% import "forms.html" as form_theme with context %}
  4. {% block title %}{{ page_title(parent=_(action.role.name), title=_("Role Forum Permissions")) }}{% endblock %}
  5. {% block table_head scoped %}
  6. <th>{% trans %}Forum{% endtrans %}</th>
  7. <th class="span8">{% trans %}Role{% endtrans %}</th>
  8. {% endblock %}
  9. {% block table_row scoped %}
  10. <td class="lead-cell" style="padding-left: {{ 8 + ((item.level - 1) * 24) }}px;">
  11. <i class="icon-{{ forum_icon(item.type) }}"></i> <strong>{{ item.name }}</strong>
  12. </td>
  13. <td>
  14. {{ form_theme.field(table_form['forum_' + item.pk|string], attrs={'class': 'span6', 'form': 'table_form'}) }}
  15. </td>
  16. {% endblock %}
  17. {% macro forum_icon(forum_type) -%}
  18. {%- if forum_type == 'category' -%}
  19. folder-open
  20. {%- elif forum_type == 'forum' -%}
  21. list
  22. {%- else -%}
  23. globe
  24. {%- endif -%}
  25. {%- endmacro %}