<commit_before>{{!
    Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
    Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
    Created By: <EMAIL>
    Maintained By: <EMAIL>
}}

{{#is_allowed_to_map parent_instance model.shortName}}
{{#if allow_mapping_or_creating}}
{{^is_profile parent_instance}}
<li class="tree-footer tree-item tree-item-add">
  <div class="row-fluid">
    <div class="span12 section-expandable">

      {{#if model.root_object}}
      <a
        class="section-add"
        href="javascript://"
        rel="tooltip"
        data-placement="left"
        data-toggle="multitype-modal-selector"
        data-join-option-type="{{model.shortName}}"
        data-join-object-id="{{parent_instance.id}}"
        data-join-object-type="{{parent_instance.constructor.shortName}}"
        data-exclude-option-types="{{exclude_option_types}}"
        data-original-title="Map {{firstnonempty title_singular model.title_singular 'Object'}} to this {{firstnonempty parent_instance.constructor.title_singular 'Object'}}">
        + {{model.title_singular}}
      </a>
      {{#if null}}
      <span class="section-expander">
        <a href="javascript://" data-toggle="modal-ajax-form" data-modal-reset="reset" data-modal-class="modal-wide" data-object-singular="{{parent_instance.constructor.model_singular}}" data-object-plural="{{parent_instance.constructor.table_plural}}" >
          <i class="grcicon-add-black"></i>
          Create Object
        </a>
      </span>
      {{/if}}
      {{else}}
      <a
        class="section-add section-sticky"
        href="javascript://"
        rel="tooltip"
        data-placement="left"
        data-toggle="multitype-modal-selector"
        data-join-object-id="{{parent_instance.id}}"
        data-join-object-type="{{parent_instance.constructor.shortName}}"
        data-exclude-option-types="{{exclude_option_types}}"
        data-original-title="Map {{firstnonempty title_singular model.title_singular 'Object'}} to this {{firstnonempty parent_instance.constructor.title_singular 'Object'}}"
        data-object-params='{{#if_equals parent_instance.constructor.shortName "Section"}}{ "section": { "id": {{parent_instance.id}}, "title": "{{json_escape parent_instance.title}}", "description": "{{json_escape parent_instance.description}}" } }{{/if_equals}}'>
        + Object
      </a>
      {{#if_equals parent_instance.constructor.shortName "Section"}}
      <span class="section-expander">
        &nbsp;
        &nbsp;
        <a 
          href="javascript://" 
          data-toggle="modal-ajax-form" 
          data-modal-reset="reset" 
          data-dirty="#category_objectives, #combo" 
          data-route="category_objectives" 
          data-modal-class="modal-wide" 
          data-object-singular="Objective" 
          data-object-plural="objectives"
          data-object-params='{ "section": { "id": {{parent_instance.id}}, "title": "{{json_escape parent_instance.title}}" }, "description": "{{json_escape parent_instance.description}}" }'>
          + Objective
        </a>
      </span>
      {{/if_equals}}
      {{/if}}
    </div>
  </div>
</li>
{{/is_profile}}
{{/if}}
{{/is_allowed_to_map}}
<commit_msg>Blocked tree footers from being included for responses that are rendered on non-Audit/Program/Person pages<commit_after>{{!
    Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
    Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
    Created By: <EMAIL>
    Maintained By: <EMAIL>
}}

{{#is_allowed_to_map parent_instance model.shortName}}
{{#if allow_mapping_or_creating}}
{{^is_profile parent_instance}}
{{#with_page_object_as 'page_object'}}
{{! Blocks the footer if this is mapping an object to a Response on a non-Audit/Program/Person page }}
{{#if_helpers '\
  ^if_match' parent_instance.constructor.shortName 'Response' '\
  or #if_match' page_object.constructor.shortName 'Audit|Program|Person' '\
'}}
<li class="tree-footer tree-item tree-item-add">
  <div class="row-fluid">
    <div class="span12 section-expandable">

      {{#if model.root_object}}
      <a
        class="section-add"
        href="javascript://"
        rel="tooltip"
        data-placement="left"
        data-toggle="multitype-modal-selector"
        data-join-option-type="{{model.shortName}}"
        data-join-object-id="{{parent_instance.id}}"
        data-join-object-type="{{parent_instance.constructor.shortName}}"
        data-exclude-option-types="{{exclude_option_types}}"
        data-original-title="Map {{firstnonempty title_singular model.title_singular 'Object'}} to this {{firstnonempty parent_instance.constructor.title_singular 'Object'}}">
        + {{model.title_singular}}
      </a>
      {{#if null}}
      <span class="section-expander">
        <a href="javascript://" data-toggle="modal-ajax-form" data-modal-reset="reset" data-modal-class="modal-wide" data-object-singular="{{parent_instance.constructor.model_singular}}" data-object-plural="{{parent_instance.constructor.table_plural}}" >
          <i class="grcicon-add-black"></i>
          Create Object
        </a>
      </span>
      {{/if}}
      {{else}}
      <a
        class="section-add section-sticky"
        href="javascript://"
        rel="tooltip"
        data-placement="left"
        data-toggle="multitype-modal-selector"
        data-join-object-id="{{parent_instance.id}}"
        data-join-object-type="{{parent_instance.constructor.shortName}}"
        data-exclude-option-types="{{exclude_option_types}}"
        data-original-title="Map {{firstnonempty title_singular model.title_singular 'Object'}} to this {{firstnonempty parent_instance.constructor.title_singular 'Object'}}"
        data-object-params='{{#if_equals parent_instance.constructor.shortName "Section"}}{ "section": { "id": {{parent_instance.id}}, "title": "{{json_escape parent_instance.title}}", "description": "{{json_escape parent_instance.description}}" } }{{/if_equals}}'>
        + Object
      </a>
      {{#if_equals parent_instance.constructor.shortName "Section"}}
      <span class="section-expander">
        &nbsp;
        &nbsp;
        <a 
          href="javascript://" 
          data-toggle="modal-ajax-form" 
          data-modal-reset="reset" 
          data-dirty="#category_objectives, #combo" 
          data-route="category_objectives" 
          data-modal-class="modal-wide" 
          data-object-singular="Objective" 
          data-object-plural="objectives"
          data-object-params='{ "section": { "id": {{parent_instance.id}}, "title": "{{json_escape parent_instance.title}}" }, "description": "{{json_escape parent_instance.description}}" }'>
          + Objective
        </a>
      </span>
      {{/if_equals}}
      {{/if}}
    </div>
  </div>
</li>
{{/if_helpers}}
{{/with_page_object_as}}
{{/is_profile}}
{{/if}}
{{/is_allowed_to_map}}

{'fraction_non_alphanumeric': 0.16421780466724287, 'fraction_numerical': 0.0023048112935753384, 'mean_word_length': 3.277880468268638, 'pattern_counts': {'":': 16, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '254475', 'n_tokens_mistral': 2144, 'n_tokens_neox': 2084, 'n_words': 353}