
    <!-- IAM managed policy partial -->
    <script id="services.iam.managed_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">
        {{add_policy_path this 'managed_policies' @key}}
        {{> services.iam.policy}}
      </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.managed_policies", $("#services\\.iam\\.managed_policies\\.partial").html());
    </script>

    <!-- Single IAM managed policy template -->
    <script id="services.iam.managed_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.managed_policies}}
    </script>
    <script>
        var single_iam_managed_policy_template = Handlebars.compile($("#services\\.iam\\.managed_policy\\.template").html());
    </script>

