<commit_before>{{#let (unique-id) as |templateId|}}
  <div
    class="school-vocabulary-manager"
    data-test-school-vocabulary-manager
    {{did-insert (perform this.load)}}
    {{did-update (perform this.load) @vocabulary.terms}}
    attributes...
  >
    {{#if this.load.isRunning}}
      <LoadingSpinner />
    {{else}}
      <div class="breadcrumbs" data-test-breadcrumbs>
        <span role="button" data-test-all {{on "click" (fn @manageVocabulary null)}}>
          {{t "general.allVocabularies"}}
        </span>
        <span data-test-vocabulary>
          {{@vocabulary.title}}
        </span>
      </div>
      <br>
      <div class="school-vocabulary-manager-title" data-test-title>
        <label for="title-{{templateId}}">
          {{t "general.title"}}:
        </label>
        {{#if @canUpdate}}
          <EditableField
            @value={{if this.title this.title (t "general.clickToEdit")}}
            @save={{perform this.changeTitle}}
            @close={{this.revertTitleChanges}}
            @saveOnEnter={{true}}
            @closeOnEscape={{true}} as |isSaving|
          >
            <Input
              id="title-{{templateId}}"
              @type="text"
              @value={{this.title}}
              disabled={{isSaving}}
              {{on "keyup" (fn this.addErrorDisplayFor "title")}}
            />
            <ValidationError @errors={{get-errors-for this.title}} />
          </EditableField>
        {{else}}
          {{this.title}}
        {{/if}}
        <span class="term-totals">({{t "general.countTotal" total=(get (await @vocabulary.terms) "length")}})</span>
      </div>
      <h5>
        {{t "general.terms"}}:
      </h5>
      <div class="terms" data-test-terms>
        {{#if this.newTerm}}
          <div class="saved-result">
            <span class="clickable link" role="button" {{on "click" (fn @manageTerm this.newTerm.id)}}>
              <FaIcon @icon="square-up-right" />
              {{this.newTerm.title}}
            </span>
            {{t "general.savedSuccessfully"}}
          </div>
        {{/if}}
        {{#if @canCreate}}
          <SchoolVocabularyNewTerm @createTerm={{this.createTerm}} @vocabulary={{@vocabulary}}/>
        {{/if}}
        <ul data-test-term-list>
          {{#each this.sortedTerms as |term|}}
            <li role="button" data-test-term {{on "click" (fn @manageTerm term.id)}}>
              {{term.title}}
              {{#if term.hasChildren}}
                <FaIcon @icon="asterisk" data-test-has-children @title={{t "general.thisTermHasSubTerms"}} />
              {{/if}}
              {{#unless term.active}}
                <em>
                  ({{t "general.inactive"}})
                </em>
              {{/unless}}
            </li>
          {{/each}}
        </ul>
      </div>
    {{/if}}
  </div>
{{/let}}<commit_msg>clickable list items and spans to buttons conversion.<commit_after>{{#let (unique-id) as |templateId|}}
  <div
    class="school-vocabulary-manager"
    data-test-school-vocabulary-manager
    {{did-insert (perform this.load)}}
    {{did-update (perform this.load) @vocabulary.terms}}
    attributes...
  >
    {{#if this.load.isRunning}}
      <LoadingSpinner />
    {{else}}
      <div class="breadcrumbs" data-test-breadcrumbs>
        <span>
          <button
            class="link-button"
            type="button"
            data-test-all
            {{on "click" (fn @manageVocabulary null)}}
          >
            {{t "general.allVocabularies"}}
          </button>
        </span>
        <span data-test-vocabulary>
          {{@vocabulary.title}}
        </span>
      </div>
      <br>
      <div class="school-vocabulary-manager-title" data-test-title>
        <label for="title-{{templateId}}">
          {{t "general.title"}}:
        </label>
        {{#if @canUpdate}}
          <EditableField
            @value={{if this.title this.title (t "general.clickToEdit")}}
            @save={{perform this.changeTitle}}
            @close={{this.revertTitleChanges}}
            @saveOnEnter={{true}}
            @closeOnEscape={{true}} as |isSaving|
          >
            <Input
              id="title-{{templateId}}"
              @type="text"
              @value={{this.title}}
              disabled={{isSaving}}
              {{on "keyup" (fn this.addErrorDisplayFor "title")}}
            />
            <ValidationError @errors={{get-errors-for this.title}} />
          </EditableField>
        {{else}}
          {{this.title}}
        {{/if}}
        <span class="term-totals">({{t "general.countTotal" total=(get (await @vocabulary.terms) "length")}})</span>
      </div>
      <h5>
        {{t "general.terms"}}:
      </h5>
      <div class="terms" data-test-terms>
        {{#if this.newTerm}}
          <div class="saved-result">
            <button
              class="link-button"
              type="button"
              {{on "click" (fn @manageTerm this.newTerm.id)}}
            >
              <FaIcon @icon="square-up-right" />
              {{this.newTerm.title}}
            </button>
            {{t "general.savedSuccessfully"}}
          </div>
        {{/if}}
        {{#if @canCreate}}
          <SchoolVocabularyNewTerm @createTerm={{this.createTerm}} @vocabulary={{@vocabulary}}/>
        {{/if}}
        <ul data-test-term-list>
          {{#each this.sortedTerms as |term|}}
            <button
              class="link-button"
              type="button"
              data-test-term
              {{on "click" (fn @manageTerm term.id)}}
            >
              {{term.title}}
              {{#if term.hasChildren}}
                <FaIcon @icon="asterisk" data-test-has-children @title={{t "general.thisTermHasSubTerms"}} />
              {{/if}}
              {{#unless term.active}}
                <em>
                  ({{t "general.inactive"}})
                </em>
              {{/unless}}
            </button>
          {{/each}}
        </ul>
      </div>
    {{/if}}
  </div>
{{/let}}
{'fraction_non_alphanumeric': 0.17429665390377894, 'fraction_numerical': 0.000665889795238888, 'mean_word_length': 1.6761692650334075, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3303386', 'n_tokens_mistral': 1848, 'n_tokens_neox': 1838, 'n_words': 325}