Reordering rule list page a bit
</div>
</div>
-{% if service.rule_set.count %}
+{% if service.rule_set.count or global_rule_set.count %}
<div class="panel panel-default">
<div class="panel-heading">Rules</div>
{% include "promgen/rule_block.html" with rule_list=service.rule_set.all show_edit=1 %}
+{% if global_rule_set.count %}
+ <div class="panel-body">
+ <a class="btn btn-default btn-sm" role="button" data-toggle="collapse" href="#show-global-rules" aria-expanded="false" aria-controls="collapseExample">
+ Show Common Rules
+ </a>
</div>
+{% include "promgen/rule_block.html" with rule_list=global_rule_set.all show_overwrite=service.id collapse="show-global-rules" %}
{% endif %}
-
-{% if global_rule_set.count %}
- <div class="panel panel-default">
- <div class="panel-heading">Global Rules</div>
-{% include "promgen/rule_block.html" with rule_list=global_rule_set.all show_overwrite=service.id %}
</div>
{% endif %}
