<commit_before><template name="Edit">

  <div class="genre-title-section">

    <div class="contents">

      <div class="apps-title large">APP EDIT</div>

    </div>

  </div>

  {{#with app}}
  <form class="edit-box clearfix validation">

    {{#if parentApp.notes}}

      <h3 class="title inline-block">Notes to the Author: </h3>

      <div class="spacer clearfix"></div>

      <textarea class="note-entry" data-field="note-entry"></textarea>

      <div class="spacer clearfix"></div>

      {{> appNotesBox notes=parentApp.notes}}

      <div class="spacer clearfix"></div>

    {{/if}}

    <div class="right-float on-top">

      <div class="button-block">
        {{#if lastEdit}}
          <div class="message">
            <i class="green icon-approved_dark"></i>SAVED AT {{dateFormat lastEdit 'H:mm, DD MMM YYYY'}}
          </div>
        {{/if}}
        {{#if submitted}}
          <div class="message">
            <a href="/appsByMe">SUBMITTED ON <span class="date">{{dateFormat submitted 'DD MMM YYYY'}}</span></a>
          </div>
        {{else}}
          <div class="sandstorm-button neutral" data-action="submit-app">
            SUBMIT APP FOR REVIEW
          </div>
        {{/if}}
        <div class="sandstorm-button neutral" data-action="save-app">
          SAVE EDITS
        </div>
        <div class="sandstorm-button neutral" data-action="discard-edits">
          DISCARD EDITS
        </div>
        <i class="icon-garbage" data-action="delete-app"></i>
      </div>

    </div>

    <div class="section clearfix">

      <h3 class="title">Application File</h3>

      <div class="half-col">

        {{> fileBox version="update"}}

      </div>

      <div class="half-col">

        <h3 class="title" data-invalid={{validate 'name'}}>Title</h3>
        {{#if changedOriginal}}<div class="admin-field">{{parentApp.name}}</div>{{/if}}
        {{#if fieldEdit 'name'}}
          <input type="text" data-field="name" value="{{name}}" required />
        {{else}}
          <div data-alt-field="name">{{name}}</div>
        {{/if}}

        <h3 class="title">Author</h3>
        <div class="read-only">{{getUsername author}}</div>

      </div>

    </div>

    <div class="divider"></div>

    <div class="section">

      <div class="half-col">

        <h4 class="mini-title">Ported by</h4>
        <div class="read-only">{{getUsername author}}</div>

        <h4 class="mini-title" data-invalid={{validate 'codeLink'}}>Code URL</h4>
        {{#if changedOriginal}}<div class="admin-field">{{verboseNone parentApp.codeLink}}</div>{{/if}}
        {{#if fieldEdit 'codeLink'}}
          <input type="text" data-field="codeLink" value="{{codeLink}}" pattern="https?://.+" />
        {{else}}
          <div data-alt-field="codeLink">{{verboseNone codeLink}}</div>
        {{/if}}

        <h4 class="mini-title" data-invalid={{validate 'license'}}>License</h4>
        {{#if changedOriginal}}<div class="admin-field">{{verboseNone parentApp.license}}</div>{{/if}}
        {{#if fieldEdit 'license'}}
          <input type="text" data-field="license" value="{{license}}" />
        {{else}}
          <div data-alt-field="license">{{verboseNone license}}</div>
        {{/if}}

        <h4 class="mini-title" data-invalid={{validate 'version'}}>Version</h4>
        <div data-alt-field="">{{verboseNone getLatestVersion}}</div>

      </div>

      <div class="half-col">

        <h4 class="mini-title" data-invalid={{validate 'webLink'}}>Website</h4>
        {{#if changedOriginal}}<div class="admin-field">{{verboseNone parentApp.webLink}}</div>{{/if}}
        {{#if fieldEdit 'webLink'}}
          <input type="text" data-field="webLink" value="{{webLink}}" />
        {{else}}
          <div data-alt-field="webLink">{{verboseNone webLink}}</div>
        {{/if}}

        {{> connectButton service="github"}}
        {{> connectButton service="google"}}

      </div>

      {{#if newVersion}}
        <h4 class="mini-title left-float">Version Changes</h4>

        <div class="version-changes"><commit_msg>added version input back to edit page<commit_after><template name="Edit">

  <div class="genre-title-section">

    <div class="contents">

      <div class="apps-title large">APP EDIT</div>

    </div>

  </div>

  {{#with app}}
  <form class="edit-box clearfix validation">

    {{#if parentApp.notes}}

      <h3 class="title inline-block">Notes to the Author: </h3>

      <div class="spacer clearfix"></div>

      <textarea class="note-entry" data-field="note-entry"></textarea>

      <div class="spacer clearfix"></div>

      {{> appNotesBox notes=parentApp.notes}}

      <div class="spacer clearfix"></div>

    {{/if}}

    <div class="right-float on-top">

      <div class="button-block">
        {{#if lastEdit}}
          <div class="message">
            <i class="green icon-approved_dark"></i>SAVED AT {{dateFormat lastEdit 'H:mm, DD MMM YYYY'}}
          </div>
        {{/if}}
        {{#if submitted}}
          <div class="message">
            <a href="/appsByMe">SUBMITTED ON <span class="date">{{dateFormat submitted 'DD MMM YYYY'}}</span></a>
          </div>
        {{else}}
          <div class="sandstorm-button neutral" data-action="submit-app">
            SUBMIT APP FOR REVIEW
          </div>
        {{/if}}
        <div class="sandstorm-button neutral" data-action="save-app">
          SAVE EDITS
        </div>
        <div class="sandstorm-button neutral" data-action="discard-edits">
          DISCARD EDITS
        </div>
        <i class="icon-garbage" data-action="delete-app"></i>
      </div>

    </div>

    <div class="section clearfix">

      <h3 class="title">Application File</h3>

      <div class="half-col">

        {{> fileBox version="update"}}

      </div>

      <div class="half-col">

        <h3 class="title" data-invalid={{validate 'name'}}>Title</h3>
        {{#if changedOriginal}}<div class="admin-field">{{parentApp.name}}</div>{{/if}}
        {{#if fieldEdit 'name'}}
          <input type="text" data-field="name" value="{{name}}" required />
        {{else}}
          <div data-alt-field="name">{{name}}</div>
        {{/if}}

        <h3 class="title">Author</h3>
        <div class="read-only">{{getUsername author}}</div>

      </div>

    </div>

    <div class="divider"></div>

    <div class="section">

      <div class="half-col">

        <h4 class="mini-title">Ported by</h4>
        <div class="read-only">{{getUsername author}}</div>

        <h4 class="mini-title" data-invalid={{validate 'codeLink'}}>Code URL</h4>
        {{#if changedOriginal}}<div class="admin-field">{{verboseNone parentApp.codeLink}}</div>{{/if}}
        {{#if fieldEdit 'codeLink'}}
          <input type="text" data-field="codeLink" value="{{codeLink}}" pattern="https?://.+" />
        {{else}}
          <div data-alt-field="codeLink">{{verboseNone codeLink}}</div>
        {{/if}}

        <h4 class="mini-title" data-invalid={{validate 'license'}}>License</h4>
        {{#if changedOriginal}}<div class="admin-field">{{verboseNone parentApp.license}}</div>{{/if}}
        {{#if fieldEdit 'license'}}
          <input type="text" data-field="license" value="{{license}}" />
        {{else}}
          <div data-alt-field="license">{{verboseNone license}}</div>
        {{/if}}

        <h4 class="mini-title" data-invalid={{validate 'version'}}>Version</h4>
        {{#if fieldEdit 'latestVersion'}}
          <input type="text" data-action="update-version" data-version-field="number" value="{{lastVersionNumber.number}}" />
        {{else}}
          <div data-alt-field="latestVersion" data-action="update-version">{{verboseNone lastVersionNumber.number}}</div>
        {{/if}}

      </div>

      <div class="half-col">

        <h4 class="mini-title" data-invalid={{validate 'webLink'}}>Website</h4>
        {{#if changedOriginal}}<div class="admin-field">{{verboseNone parentApp.webLink}}</div>{{/if}}
        {{#if fieldEdit 'webLink'}}
          <input type="text" data-field="webLink" value="{{webLink}}" />
        {{else}}
          <div data-alt-field="webLink">{{verboseNone webLink}}</div>
        {{/if}}

        {{> connectButton service="github"}}
        {{> connectButton service="google"}}

      </div>

      {{#if newVersion}}
        <h4 class="mini-title left-float">Version Changes</h4>

        <div class="version-changes">
{'fraction_non_alphanumeric': 0.19935460738615993, 'fraction_numerical': 0.0047806860284450815, 'mean_word_length': 2.668566418237615, 'pattern_counts': {'":': 0, '<': 200, '<?xml version=': 0, '>': 208, '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': '6941319', 'n_tokens_mistral': 2720, 'n_tokens_neox': 2582, 'n_words': 502}