index.edge

44 lines | 1.216 kB Blame History Raw Download
@layout('layouts.main')

@section('content')

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

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

<section class="box">
  <table class="table">
    <thead class="thead">
      <tr>
        <th>Name</th>
        <th>Email</th>
        <th>Phone</th>
        <th>Type</th>
        <th>Action</th>
      </tr>
    </thead>
    <tbody class="tbody">
      @each(organization in organizations)
      <tr>
        <td>{{ organization.name }}</td>
        <td>{{ organization.email }}</td>
        <td>{{ organization.phone }}</td>
        <td>{{ organization.type.type }}</td>
        <td>
          <form action="{{ APP_URL() + route('/organizations.destroy', { id: organization.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>
          </form>
        </td>
      </tr>
      @endeach
    </tbody>
  </table>
</section>

@endsection