
    <!-- IAM managed policy partial -->
    <script id="services.iam.policies.partial" type="text/x-handlebars-template">
      <div class="list-group-item active">
        <h4 class="list-group-item-heading">{{name}}</h4>
      </div>
      <div class="list-group-item">
        <div class="list-group-item-text">Arn: {{arn}}</div>
        {{> accordion_policy document = PolicyDocument policy_path = (concat 'iam.policies' @key 'PolicyDocument')}}
      </div>
      <div class="list-group-item">
        <h4 class="list-group-item-heading">Attached entities</h4>
        <ul>
          {{#each attached_to}}
            <li>{{make_title @key}}</li>
            <ul>
              {{#each this}}
                <li><a href="javascript:showObject('services.iam.{{@../key}}.{{id}}')">{{name}}</a></li>
              {{/each}}
            </ul>
          {{/each}}
        </ul>
      </div>
    </script>
    <script>
      Handlebars.registerPartial("services.iam.policies", $("#services\\.iam\\.policies\\.partial").html());
    </script>

    <!-- Single IAM managed policy template -->
    <script id="services.iam.policy.template" type="text/x-handlebars-template">
        <div style="text-align: right; padding-right: 10px; text-weight: bold;"><a href="javascript:hidePopup()">X</a></div>
        {{> services.iam.policies}}
    </script>
    <script>
        var single_iam_policy_template = Handlebars.compile($("#services\\.iam\\.policy\\.template").html());
    </script>

