<commit_before>{{!
    Copyright (C) 2014 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>
}}

<custom-attributes instance="instance" load="true">
  {{#if instance.custom_attribute_definitions.length}}
    {{#iterate_by_two instance.custom_attribute_definitions}}
      <div class="row-fluid wrap-row">
      {{#list}}
        <div class="span6">
          <div data-custom-attribute="{{id}}" data-type="{{attribute_type}}">
            {{#with_value_for_id id}}
              {{#switch attribute_type}}
              {{#case 'Checkbox'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="checkbox"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                ></inline-edit>
              {{/case}}
              {{#case 'Rich Text'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="text"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                ></inline-edit>
              {{/case}}
              {{#case 'Dropdown'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="dropdown"
                  mandatory="mandatory"
                  values="multi_choice_options"
                  placeholder="placeholder"
                  helptext="helptext"
                ></inline-edit>
              {{/case}}
              {{#case 'Date'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="date"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                ></inline-edit>
              {{/case}}
              {{#case 'Text'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="input"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                ></inline-edit>
              {{/case}}
              {{#case 'Map:Person'}}
                {{#with_object_for_id id}}
                  <inline-edit
                    instance="instance"
                    ca-id="id"
                    value="object"
                    label="title"
                    type="person"
                    mandatory="mandatory"
                    placeholder="placeholder"
                    helptext="helptext"
                  ></inline-edit>
                {{/with_object_for_id}}
              {{/case}}
              {{#default}}
                <h6>{{title}}</h6>
                {{value}}
              {{/default}}
              {{/switch}}
            {{/with_value_for_id}}
          </div>
        </div>
      {{/list}}
      </div><commit_msg>Mark custom attributes read only if user doesn't have permission<commit_after>{{!
    Copyright (C) 2014 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>
}}

<custom-attributes instance="instance" load="true">
  {{#if instance.custom_attribute_definitions.length}}
    {{#iterate_by_two instance.custom_attribute_definitions}}
      <div class="row-fluid wrap-row">
      {{#list}}
        <div class="span6">
          <div data-custom-attribute="{{id}}" data-type="{{attribute_type}}">
            {{#with_value_for_id id}}
              {{#switch attribute_type}}
              {{#case 'Checkbox'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="checkbox"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                  {{^is_allowed 'update' instance context='for'}}
                    readonly
                  {{/is_allowed}}
                ></inline-edit>
              {{/case}}
              {{#case 'Rich Text'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="text"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                  {{^is_allowed 'update' instance context='for'}}
                    readonly
                  {{/is_allowed}}
                ></inline-edit>
              {{/case}}
              {{#case 'Dropdown'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="dropdown"
                  mandatory="mandatory"
                  values="multi_choice_options"
                  placeholder="placeholder"
                  helptext="helptext"
                  {{^is_allowed 'update' instance context='for'}}
                    readonly
                  {{/is_allowed}}
                ></inline-edit>
              {{/case}}
              {{#case 'Date'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="date"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                  {{^is_allowed 'update' instance context='for'}}
                    readonly
                  {{/is_allowed}}
                ></inline-edit>
              {{/case}}
              {{#case 'Text'}}
                <inline-edit
                  instance="instance"
                  ca-id="id"
                  value="value"
                  label="title"
                  type="input"
                  mandatory="mandatory"
                  placeholder="placeholder"
                  helptext="helptext"
                  {{^is_allowed 'update' instance context='for'}}
                    readonly
                  {{/is_allowed}}
                ></inline-edit>
              {{/case}}
              {{#case 'Map:Person'}}
                {{#with_object_for_id id}}
                  <inline-edit
                    instance="instance"
                    ca-id="id"
                    value="object"
                    label="title"
                    type="person"
                    mandatory="mandatory"
                    placeholder="placeholder"
                    helptext="helptext"
                    {{^is_allowed 'update' instance context='for'}}
                      readonly
                    {{/is_allowed}}
                  ></inline-edit>
                {{/with_object_for_id}}
              {{/case}}
              {{#default}}
                <h6>{{title}}</h6>
                {{value}}
              {{/default}}
              {{/switch}}
            {{/with_value_for_id}}
          </div>
        </div>
      {{/list}}
      </div>
{'fraction_non_alphanumeric': 0.12112240957652208, 'fraction_numerical': 0.002316900501995109, 'mean_word_length': 1.0664893617021276, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, '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': '6717127', 'n_tokens_mistral': 1927, 'n_tokens_neox': 1785, 'n_words': 318}