Skip to content

Commit

Permalink
Merge pull request #219 from vuchl/master
Browse files Browse the repository at this point in the history
Solves #215
  • Loading branch information
austintoddj authored Oct 11, 2016
2 parents 536e307 + 3e8b5d6 commit acd5646
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions resources/views/backend/post/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<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="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>
Expand All @@ -46,8 +46,8 @@
<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>
<td>{{ $post->created_at->format('Y-m-d') }}</td>
<td>{{ $post->updated_at->format('Y-m-d') }}</td>
</tr>
@endforeach
</tbody>
Expand Down
5 changes: 4 additions & 1 deletion resources/views/backend/post/partials/datatable.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
return "<a href='{{ url('admin/post') }}/" + row.id + "/edit'><button type='button' class='btn btn-icon command-edit waves-effect waves-circle'><span class='zmdi zmdi-edit'></span></button></a> " +
" <a href='{{ url('blog') }}/" + row.slug + "' target='_blank'><button type='button' class='btn btn-icon command-delete waves-effect waves-circle'><span class='zmdi zmdi-search'></span></button></a>";
},
"humandate": function(row, column) {
return moment(row.created).format("MMMM, Do YYYY");
}
}
});
});
</script>
</script>

0 comments on commit acd5646

Please sign in to comment.