index.edge

48 lines | 1.518 kB Blame History Raw Download
@layout('layouts.main')

@section('content')

<section class="box is-full-width">
  <h3 class="is-size-3">Steward Actions</h3>
  <ul>
    <li><a href="{{ APP_URL() + route('/stewards/create') }}">Add Steward</a></li>
  </ul>
</section>

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

<section class="box">
  <table class="table">
    <thead class="thead">
      <tr>
        <th>Element</th>
        <th>Steward Name</th>
        <th>Steward Email</th>
        <th>Start Date</th>
        <th>End Date</th>
        <th>Action</th>
      </tr>
    </thead>
    <tbody class="tbody">
      @each(steward in stewards)
      <tr>
        <td>{{ steward.elements[0].name}}</td>
        <td>{{ steward.contact.first_name }} {{ steward.contact.last_name }}</td>
        <td>{{ steward.contact.email }}</td>
        <td>{{ steward.start_date ? TO_LOCALE(steward.start_date) : ''}}</td>
        <td>{{ steward.end_date ? TO_LOCALE(steward.end_date) : 'n/a' }}</td>
        <td>
          <form action="{{ APP_URL() + route('/stewards.destroy', { id: steward.id }) + '?_method=DELETE'}}" method="post">
            {{ csrfField() }}
            <button type="submit" name="button" class="is-small button is-danger" onclick="return confirm('Are you sure you want to delete this theme?');">Delete</button>
            &nbsp;
            <a href="{{APP_URL() + route('/stewards.edit', { id: steward.id })}}" class="button is-small is-warning">Edit</a>
          </form>
        </td>
      </tr>
      @endeach
    </tbody>
  </table>
</section>

@endsection