<commit_before>@extends('layouts.admin')

@section('title') Static Pages @endsection

@section('content')

<table class="table table-striped">
  <thead>
    <tr>
      <th>Action</th>
      <th>Page URL</th>
      <th>Title</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
@foreach ($pages as $page)
    <tr>
      <td style="width:10%;white-space:nowrap">
        <a href='{{ URL::route("sysop.pages.edit", [$page->id]) }}' title="Edit" class="btn"><i class="icon-edit"></i></a>
        <a href='{{ URL::route("sysop.pages.destroy", [$page->id]) }}' title="Delete" class="btn btn-danger delete" data-page="{{ $page->slug }}"><i class="icon-remove icon-white"></i></a>
      </td>
      <td style="vertical-align:middle">{{ Html::linkRoute('sysop.pages.show', $page->slug, [$page->id]) }}</td>
      <td style="vertical-align:middle">{{ Html::linkRoute('sysop.pages.show', $page->title, [$page->id]) }}</td>
      <td>
@if ($page->is_visible)
          <i class="icon-eye-open" title="Visible"></i>
@else
          <i class="icon-eye-close" title="Hidden"></i>
@endif
      </td>
@endforeach
    </tr>
  </tbody>
</table>

<a href='{{ URL::route("sysop.pages.create") }}' class="btn btn-success" style="color:white"><i class="icon-plus icon-white"></i> New</a>
@endsection

@section('scripts')
<script>
$(function(){
  $('.delete').on('click', function(event) {
    var href = $(this).attr('href');
    var page = $(this).data('page');
    if (confirm('Delete "' + page + '"?')) {
      $.ajax({<commit_msg>Fix placement of foreach loop<commit_after>@extends('layouts.admin')

@section('title') Static Pages @endsection

@section('content')

<table class="table table-striped">
  <thead>
    <tr>
      <th>Action</th>
      <th>Page URL</th>
      <th>Title</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
@foreach ($pages as $page)
    <tr>
      <td style="width:10%;white-space:nowrap">
        <a href='{{ URL::route("sysop.pages.edit", [$page->id]) }}' title="Edit" class="btn"><i class="icon-edit"></i></a>
        <a href='{{ URL::route("sysop.pages.destroy", [$page->id]) }}' title="Delete" class="btn btn-danger delete" data-page="{{ $page->slug }}"><i class="icon-remove icon-white"></i></a>
      </td>
      <td style="vertical-align:middle">{{ Html::linkRoute('sysop.pages.show', $page->slug, [$page->id]) }}</td>
      <td style="vertical-align:middle">{{ Html::linkRoute('sysop.pages.show', $page->title, [$page->id]) }}</td>
      <td>
@if ($page->is_visible)
        <i class="icon-eye-open" title="Visible"></i>
@else
        <i class="icon-eye-close" title="Hidden"></i>
@endif
      </td>
    </tr>
@endforeach
  </tbody>
</table>

<a href='{{ URL::route("sysop.pages.create") }}' class="btn btn-success" style="color:white"><i class="icon-plus icon-white"></i> New</a>
@endsection

@section('scripts')
<script>
$(function(){
  $('.delete').on('click', function(event) {
    var href = $(this).attr('href');
    var page = $(this).data('page');
    if (confirm('Delete "' + page + '"?')) {
      $.ajax({
{'fraction_non_alphanumeric': 0.25659630606860157, 'fraction_numerical': 0.0013192612137203166, 'mean_word_length': 3.7914691943127963, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 105, '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': '4537957', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1080, 'n_words': 203}