<commit_before>{{outlet}}

<div class="container upload-wrapper">
	<div class="page-header">
        <h2>Upload your photos</h2>
    </div>
    <div class="row">
		<div  class="bump modal-body">
			<h4>Select Album</h4>
			{{album-picker albums=model selectedAlbum=selectedAlbum}}

      {{#pl-uploader extensions="jpg jpeg png gif" action="http://localhost:1337/api/v1/uploads/photo" for="upload-photo" when-queued="queuePhoto" file-key="file_data" headers=requestHeaders as |queue features|}}
        {{#if features.drag-and-drop}}
          <div class="dropzone" id={{features.drag-and-drop.dropzone-id}}>
            {{#if features.drag-and-drop.drag-data}}
              {{#unless features.drag-and-drop.drag-data.valid}}
                Invalid File
              {{/unless}}
            {{else if queue.length}}
              {{#each controller.photos as |photo|}}
                <div class="dropzone-photo-preview file-preview-frame">
                  <img src={{photo.preview}} title={{photo.name}} style="max-width: 100%; max-height: 160px">
                  <div class="file-thumbnail-footer">
                    <div class="file-caption-name" title={{photo.name}}>{{photo.name}}</div>

                    <div class="file-actions">
                      <div class="file-footer-buttons">
                        <button type="button" class="kv-file-upload btn btn-xs btn-default" title="Upload file">
                          <i class="glyphicon glyphicon-upload text-info"></i>
                        </button>
                        <button {{action "deletePhoto" photo}} type="button" class="kv-file-remove btn btn-xs btn-default" title="Remove file">
                          <i class="glyphicon glyphicon-trash text-danger"></i>
                        </button>
                      </div>
                      <div class="file-upload-indicator" tabindex="-1" title="Not uploaded yet">
                        <i class="glyphicon glyphicon-hand-down text-warning"></i>
                      </div>
                    </div>
                  </div>
                </div>
              {{/each}}
            {{else}}
              <div id="upload-photo" class="dropzone-instructions">Drag & drop files here …</div>
            {{/if}}
          </div>
        {{else}}
          <div id="upload-photo" class="btn btn-info">Browse</div>
          {{#if queue.length}}
            {{#each events as |event|}}
              <div><img src={{event.preview}} style="max-width: 100px; max-height: 100px"></div>
              <div><span>{{event.filename}}</span></div>
            {{/each}}
          {{/if}}
        {{/if}}
      {{/pl-uploader}}
		 </div>
		<div class="modal-footer">
			{{#link-to "s.media"}}
				<button class="btn btn-info pull-left">
					<i class="glyphicon glyphicon-arrow-left" aria-hidden="true"></i>&nbsp;Back
				</button>
				<button class="btn btn-default kv-fileinput-upload pull-right" {{action "uploadPhotos" selectedAlbum}}>
					<i class="glyphicon glyphicon-upload"></i>&nbsp;Upload
				</button>
			{{/link-to}}
		</div>
	</div>
</div><commit_msg>Disable upload button unless album is selected<commit_after>{{outlet}}

<div class="container upload-wrapper">
	<div class="page-header">
        <h2>Upload your photos</h2>
    </div>
    <div class="row">
		<div  class="bump modal-body">
			<h4>Select Album</h4>
			{{album-picker albums=model selectedAlbum=selectedAlbum}}

      {{#pl-uploader extensions="jpg jpeg png gif" action="http://localhost:1337/api/v1/uploads/photo" for="upload-photo" when-queued="queuePhoto" file-key="file_data" headers=requestHeaders as |queue features|}}
        {{#if features.drag-and-drop}}
          <div class="dropzone" id={{features.drag-and-drop.dropzone-id}}>
            {{#if features.drag-and-drop.drag-data}}
              {{#unless features.drag-and-drop.drag-data.valid}}
                Invalid File
              {{/unless}}
            {{else if queue.length}}
              {{#each controller.photos as |photo|}}
                <div class="dropzone-photo-preview file-preview-frame">
                  <img src={{photo.preview}} title={{photo.name}} style="max-width: 100%; max-height: 160px">
                  <div class="file-thumbnail-footer">
                    <div class="file-caption-name" title={{photo.name}}>{{photo.name}}</div>

                    <div class="file-actions">
                      <div class="file-footer-buttons">
                        <button type="button" class="kv-file-upload btn btn-xs btn-default" title="Upload file">
                          <i class="glyphicon glyphicon-upload text-info"></i>
                        </button>
                        <button {{action "deletePhoto" photo}} type="button" class="kv-file-remove btn btn-xs btn-default" title="Remove file">
                          <i class="glyphicon glyphicon-trash text-danger"></i>
                        </button>
                      </div>
                      <div class="file-upload-indicator" tabindex="-1" title="Not uploaded yet">
                        <i class="glyphicon glyphicon-hand-down text-warning"></i>
                      </div>
                    </div>
                  </div>
                </div>
              {{/each}}
            {{else}}
              <div id="upload-photo" class="dropzone-instructions">Drag & drop files here …</div>
            {{/if}}
          </div>
        {{else}}
          <div id="upload-photo" class="btn btn-info">Browse</div>
          {{#if queue.length}}
            {{#each events as |event|}}
              <div><img src={{event.preview}} style="max-width: 100px; max-height: 100px"></div>
              <div><span>{{event.filename}}</span></div>
            {{/each}}
          {{/if}}
        {{/if}}
      {{/pl-uploader}}
		 </div>
		<div class="modal-footer">
			{{#link-to "s.media"}}
				<button class="btn btn-info pull-left">
					<i class="glyphicon glyphicon-arrow-left" aria-hidden="true"></i>&nbsp;Back
				</button>
				<button class="btn btn-default kv-fileinput-upload pull-right" {{action "uploadPhotos" selectedAlbum}} disabled={{unless selectedAlbum "true"}}>
					<i class="glyphicon glyphicon-upload"></i>&nbsp;Upload
				</button>
			{{/link-to}}
		</div>
	</div>
</div>
{'fraction_non_alphanumeric': 0.1693702290076336, 'fraction_numerical': 0.006997455470737914, 'mean_word_length': 1.9665094339622642, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 119, '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': '5618191', 'n_tokens_mistral': 1959, 'n_tokens_neox': 1781, 'n_words': 364}