{% load i18n %}

<div class="panel panel-primary">
  <div class="panel-heading">
    Rules for {{ project.name }}
  </div>
  <table class="table table-bordered table-condensed">
    {% include "promgen/rule_header.html" %}
    {% include "promgen/rule_block.html" with rule_list=project.rule_set.all toggle=1 delete=1 %}
    {% include "promgen/rule_block.html" with rule_list=project.service.rule_set.all collapse="project-service-rules-" overwrite_type='project' overwrite_id=project.id %}
    {% include "promgen/rule_block.html" with rule_list=request.site.rule_set.all collapse="project-site-rules-" overwrite_type='project' overwrite_id=project.id %}
  </table>
  <div class="panel-footer">
    <a class="btn btn-default btn-xs" role="button" data-toggle="collapse" href=".project-service-rules-{{project.id}}" aria-expanded="false" aria-controls="collapseExample">
      {% trans 'Show Service Rules' %}
    </a>
    <a class="btn btn-default btn-xs" role="button" data-toggle="collapse" href=".project-site-rules-{{project.id}}" aria-expanded="false" aria-controls="collapseExample">
      {% trans 'Show Site Rules' %}
    </a>
  </div>
</div>
