<commit_before>{{>page_errors}}
<div id="page-messages">
{{#each pageMessages}}
<div class="message-box">{{{this}}}</div>
{{/each}}
</div>
{{#if showLanguageNotice}}
{{> dismissible_notice icon="globe" messageKey="editing in language" id="language-notice-thing" csrfToken=csrfToken}}
{{/if}}
{{#if edit.label}}
  <h1 id="page-header">{{{__ titleKey}}}</h1>
  <form class="pure-form pure-form-aligned" method="post" action="">
  <input type="text" class="pure-input-1-2" id="thing-edit-label" name="thing-label" value="{{mlString thing.label false}}" placeholder="{{{__ "enter label"}}}" size="64" data-auto-trim>
  <input type="hidden" value="{{csrfToken}}" name="_csrf">
  <input type="hidden" name="thing-label-language" value="{{currentLanguage.langKey}}">
  <button type="submit" id="save" name="thing-action" value="save" class="pure-button pure-button-primary button-rounded" accesskey="s" title="{{{__ "accesskey" "s"}}}">{{{__ "save"}}}</button>
  <a class="cancel-link" href="/thing/{{thing.id}}">{{__ "cancel"}}</a>
  </form>
  <p>
{{else}}
  <h1 id="page-header">
  {{{getThingLabel thing}}}
  {{#if thing.userCanEdit}}
  <a href="/thing/{{thing.id}}/edit/label" id="add-label" class="pure-button button-rounded edit-button"><span class="fa fa-pencil spaced-icon"></span>
    {{#if (mlString thing.label)}}{{{__ "edit"}}}{{else}}{{{__ "add label"}}}{{/if}}
  </a>
  {{/if}}
  </h1>
{{/if}}

{{#if thing.urls}}
<span class="fa fa-external-link review-icon"></span>{{{link thing.urls.[0] (prettify thing.urls.[0])}}}
{{/if}}

{{#if thing.files}}
<p>
{{{__ "uploaded media"}}}
<ul>
{{#each thing.files}}
<li> {{{getFileLink this.name}}}<br>
  {{{mlString this.description}}}<br>
{{/each}}
</ul>
{{/if}}

<div id="thing">
<div id="thing-label"></div>
<div id="thing-short-desc"></div>
<div id="thing-aliases"></div>
<div id="thing-main-url"></div>
<div id="thing-other-urls"></div>
<div id="thing-data">
  {{#if thing.isA.book}}
  <div id="book-author" class="link-human"></div>
  <div id="book-title"></div>
  {{/if}}
  {{#if thing.isA.business}}
  <div id="business-address"></div>
  <div id="business-map"></div>
  <div id="business-hours"></div>
  {{/if}}
</div>
</div>
{{#if userReviews}}
<h2 class="sub-header-regular" id="your-review">{{{__ "your review"}}}</h2>
{{>feed thingFeed=true feedItems=userReviews noPagination=true}}
{{/if}}
{{#if user}}
{{#unless userReviews}}
{{#unless edit.label}}
<p>
<a href="/new/review/thing/{{thing.id}}" id="add-review" class="pure-button button-rounded"><span class="fa fa-plus-circle spaced-icon"></span>{{{__ "add your review"}}}</a>
{{/unless}}
{{/unless}}
{{#if thing.userCanUpload}}
<a href="/thing/{{thing.id}}/upload" id="upload" class="pure-button button-rounded"><span class="fa fa-picture-o spaced-icon"></span>{{__ "add media"}}</a>
{{/if}}
{{else}}
<br><br>
<b>{{{__ "sign in to review"}}}</b>
{{/if}}<commit_msg>Move upload button above user review<commit_after>{{>page_errors}}
<div id="page-messages">
{{#each pageMessages}}
<div class="message-box">{{{this}}}</div>
{{/each}}
</div>
{{#if showLanguageNotice}}
{{> dismissible_notice icon="globe" messageKey="editing in language" id="language-notice-thing" csrfToken=csrfToken}}
{{/if}}
{{#if edit.label}}
  <h1 id="page-header">{{{__ titleKey}}}</h1>
  <form class="pure-form pure-form-aligned" method="post" action="">
  <input type="text" class="pure-input-1-2" id="thing-edit-label" name="thing-label" value="{{mlString thing.label false}}" placeholder="{{{__ "enter label"}}}" size="64" data-auto-trim>
  <input type="hidden" value="{{csrfToken}}" name="_csrf">
  <input type="hidden" name="thing-label-language" value="{{currentLanguage.langKey}}">
  <button type="submit" id="save" name="thing-action" value="save" class="pure-button pure-button-primary button-rounded" accesskey="s" title="{{{__ "accesskey" "s"}}}">{{{__ "save"}}}</button>
  <a class="cancel-link" href="/thing/{{thing.id}}">{{__ "cancel"}}</a>
  </form>
  <p>
{{else}}
  <h1 id="page-header">
  {{{getThingLabel thing}}}
  {{#if thing.userCanEdit}}
  <a href="/thing/{{thing.id}}/edit/label" id="add-label" class="pure-button button-rounded edit-button"><span class="fa fa-pencil spaced-icon"></span>
    {{#if (mlString thing.label)}}{{{__ "edit"}}}{{else}}{{{__ "add label"}}}{{/if}}
  </a>
  {{/if}}
  </h1>
{{/if}}

{{#if thing.urls}}
<span class="fa fa-external-link review-icon"></span>{{{link thing.urls.[0] (prettify thing.urls.[0])}}}
{{/if}}

{{#if thing.files}}
<p>
{{{__ "uploaded media"}}}
<ul>
{{#each thing.files}}
<li> {{{getFileLink this.name}}}<br>
  {{{mlString this.description}}}<br>
{{/each}}
</ul>
{{/if}}

<div id="thing">
<div id="thing-label"></div>
<div id="thing-short-desc"></div>
<div id="thing-aliases"></div>
<div id="thing-main-url"></div>
<div id="thing-other-urls"></div>
<div id="thing-data">
  {{#if thing.isA.book}}
  <div id="book-author" class="link-human"></div>
  <div id="book-title"></div>
  {{/if}}
  {{#if thing.isA.business}}
  <div id="business-address"></div>
  <div id="business-map"></div>
  <div id="business-hours"></div>
  {{/if}}
</div>
</div>
{{#if user}}
{{#unless userReviews}}
{{#unless edit.label}}
<p>
<a href="/new/review/thing/{{thing.id}}" id="add-review" class="pure-button button-rounded"><span class="fa fa-plus-circle spaced-icon"></span>{{{__ "add your review"}}}</a>
{{/unless}}
{{/unless}}
{{#if thing.userCanUpload}}
<a href="/thing/{{thing.id}}/upload" id="upload" class="pure-button button-rounded"><span class="fa fa-picture-o spaced-icon"></span>{{__ "add media"}}</a>
{{/if}}
{{else}}
<br><br>
<b>{{{__ "sign in to review"}}}</b>
{{/if}}
{{#if userReviews}}
<h2 class="sub-header-regular" id="your-review">{{{__ "your review"}}}</h2>
{{>feed thingFeed=true feedItems=userReviews noPagination=true}}
{{/if}}
{'fraction_non_alphanumeric': 0.2731521550978016, 'fraction_numerical': 0.004154405400727021, 'mean_word_length': 5.978260869565218, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 147, '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': '1252603', 'n_tokens_mistral': 2216, 'n_tokens_neox': 2159, 'n_words': 418}