<commit_before>@extends('backend.layout')

@section('title')
    <title>{{ Settings::blogTitle() }} | Posts</title>
@stop

@section('content')
    <section id="main">
        @include('backend.partials.sidebar-navigation')
        <section id="content">
            <div class="container">
                <div class="card">
                    <div class="card-header">
                        <ol class="breadcrumb">
                            <li><a href="{{ url('admin') }}">Home</a></li>
                            <li class="active">Posts</li>
                        </ol>
                        @include('shared.errors')
                        @include('shared.success')
                        <h2>Posts&nbsp;
                            <a href="{{ url('admin/post/create') }}"><i class="zmdi zmdi-plus-circle" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Create a new post"></i></a>

                            <small>This page provides a comprehensive overview of all your blog posts. Click the <span class="zmdi zmdi-edit text-primary"></span> icon next to each post to update its contents or the <span class="zmdi zmdi-search text-primary"></span> icon to see what it looks like to your readers.</small>
                        </h2>
                    </div>

                    <div class="table-responsive">
                        <table id="posts" class="table table-condensed table-vmiddle">
                            <thead>
                                <tr>
                                    <th data-column-id="id">ID</th>
                                    <th data-column-id="title">Title</th>
                                    <th data-column-id="subtitle">Subtitle</th>
                                    <th data-column-id="slug">Slug</th>
                                    <th data-column-id="published" data-type="date">Status</th>
                                    <th data-column-id="created" data-type="date" data-order="desc">Created</th>
                                    <th data-column-id="updated" data-type="date">Updated</th>
                                    <th data-column-id="commands" data-formatter="commands" data-sortable="false">Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach ($data as $post)
                                    <tr>
                                        <td>{{ $post->id }}</td>
                                        <td>{{ $post->title }}</td>
                                        <td>{{ str_limit($post->subtitle, config('blog.backend_trim_width')) }}</td>
                                        <td>{{ $post->slug }}</td>
                                        <td>{{ $post->is_draft === 1 ? '<span class="label label-primary">Draft</span>' : '<span class="label label-success">Published</span>' }}</td>
                                        <td>{{ $post->created_at->format('M d, Y') }}</td>
                                        <td>{{ $post->updated_at->format('M d, Y') }}</td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div><commit_msg>add dateformatter for human readable date<commit_after>@extends('backend.layout')

@section('title')
    <title>{{ Settings::blogTitle() }} | Posts</title>
@stop

@section('content')
    <section id="main">
        @include('backend.partials.sidebar-navigation')
        <section id="content">
            <div class="container">
                <div class="card">
                    <div class="card-header">
                        <ol class="breadcrumb">
                            <li><a href="{{ url('admin') }}">Home</a></li>
                            <li class="active">Posts</li>
                        </ol>
                        @include('shared.errors')
                        @include('shared.success')
                        <h2>Posts&nbsp;
                            <a href="{{ url('admin/post/create') }}"><i class="zmdi zmdi-plus-circle" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Create a new post"></i></a>

                            <small>This page provides a comprehensive overview of all your blog posts. Click the <span class="zmdi zmdi-edit text-primary"></span> icon next to each post to update its contents or the <span class="zmdi zmdi-search text-primary"></span> icon to see what it looks like to your readers.</small>
                        </h2>
                    </div>

                    <div class="table-responsive">
                        <table id="posts" class="table table-condensed table-vmiddle">
                            <thead>
                                <tr>
                                    <th data-column-id="id">ID</th>
                                    <th data-column-id="title">Title</th>
                                    <th data-column-id="subtitle">Subtitle</th>
                                    <th data-column-id="slug">Slug</th>
                                    <th data-column-id="published">Status</th>
                                    <th data-column-id="created" data-type="date" data-formatter="humandate" data-order="desc">Created</th>
                                    <th data-column-id="updated" data-type="date" data-formatter="humandate">Updated</th>
                                    <th data-column-id="commands" data-formatter="commands" data-sortable="false">Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach ($data as $post)
                                    <tr>
                                        <td>{{ $post->id }}</td>
                                        <td>{{ $post->title }}</td>
                                        <td>{{ str_limit($post->subtitle, config('blog.backend_trim_width')) }}</td>
                                        <td>{{ $post->slug }}</td>
                                        <td>{{ $post->is_draft === 1 ? '<span class="label label-primary">Draft</span>' : '<span class="label label-success">Published</span>' }}</td>
                                        <td>{{ $post->created_at->format('Y-m-d') }}</td>
                                        <td>{{ $post->updated_at->format('Y-m-d') }}</td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
{'fraction_non_alphanumeric': 0.14431164231961044, 'fraction_numerical': 0.0008853474988933156, 'mean_word_length': 1.1141609482220836, 'pattern_counts': {'":': 0, '<': 153, '<?xml version=': 0, '>': 171, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4254234', 'n_tokens_mistral': 1656, 'n_tokens_neox': 1557, 'n_words': 331}