index.edge

40 lines | 1.074 kB Blame History Raw Download
@layout('layouts.main')

@section('content')

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

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

<section class="box">
  <table class="table">
    <thead class="thead">
      <tr>
        <th>Theme Name</th>
        <th>Actions</th>
      </tr>
    </thead>
    <tbody class="tbody">
      @each(theme in themes)
      <tr>
        <td>{{ theme.name }}</td>
        <td>
          <form action="{{ route('/themes.destroy', { id: theme.id }) + '?_method=DELETE'}}" method="post">
            {{ csrfField() }}
            <button type="submit" name="button" class="is-small button is-danger is-pulled-left" onclick="return confirm('Are you sure you want to delete this theme?');">Delete</button>
          </form>
          &nbsp;
          <a href="{{route('/themes.edit', { id: theme.id })}}" class="button is-small is-warning">Edit</a>
        </td>
      </tr>
      @endeach
    </tbody>
  </table>
</section>

@endsection