index.edge

61 lines | 1.969 kB Blame History Raw Download
@layout('layouts.main')

@section('content')

<h1 class="is-size-3">Data Submissions</h1>

<p>There are {{ submissions.length }} total submissions.</p>

@each(submission in submissions)
<section class="box"> 

  <section>
    <h2 class="is-size-4 is-marginless">
      {{ submission.name }} 
      <span class="is-pulled-right">
        <span class="tag">T: {{ submission.element.theme.name }}</span>
        <span class="tag">E: {{ submission.element.name }}</span>
      </span>
    </h2>
  </section>

  <hr style="margin: 8px"/>

  <section class="columns is-marginless">
    <div class="column is-8">
      <p>
        A submission for {{ submission.element.name }} was received on {{ TO_LOCALE(submission.upload_date) }} 
        from {{ submission.steward.contact.fullname }}.
      </p>
      <p>
        Current Status: <span class="tag">{{ submission.status.status }}</span>
      </p>
      <p class="is-size-7">
        Submission Added: {{ submission.created_at}}
      </p>
      <p class="is-size-7">
        Last Modified: {{ submission.updated_at}}
      </p>
    </div>
    <div class ="column is-4">
      <ul class="is-marginless" style="list-style: none">
        <li>      
          <a href="{{APP_URL() + route('/submissions.view', { id: submission.id })}}" class="button is-small is-fullwidth is-info">View Submission</a>
        </li>
        <li>
          <a href="{{APP_URL() + route('/submissions.edit', { id: submission.id })}}" class="button is-small is-fullwidth is-warning">Edit Submission</a>
        </li>
        <li>
          <form action="{{ APP_URL() + route('/submissions.destroy', { id: submission.id }) + '?_method=DELETE'}}" method="post">
            {{ csrfField() }}
            <button type="submit" name="button" class="button is-small is-fullwidth is-danger" onclick="return confirm('Are you sure you want to delete this submission?');">Delete Submission</button>
          </form>
        </li>
      </ul>
    </div>
  </section>

</section>
@endeach

@endsection