Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Jul 10, 2023
1 parent 646c318 commit 8fcd3bb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 39 deletions.
1 change: 0 additions & 1 deletion resources/views/admin/_form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@include('core::admin._button-back', ['url' => $model->indexUrl(), 'title' => __('News')])
@include('core::admin._title', ['default' => __('New news')])
@component('core::admin._buttons-form', ['model' => $model])

@endcomponent
</div>

Expand Down
56 changes: 27 additions & 29 deletions resources/views/admin/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,33 @@
@section('title', __('News'))

@section('content')
<item-list url-base="/api/news" fields="id,image_id,date,status,title" table="news" title="news" include="image" :exportable="true" :searchable="['title']" :sorting="['-date']">
<template slot="add-button" v-if="$can('create news')">
@include('core::admin._button-create', ['module' => 'news'])
</template>

<item-list url-base="/api/news" fields="id,image_id,date,status,title" table="news" title="news" include="image" :exportable="true" :searchable="['title']" :sorting="['-date']">
<template slot="add-button" v-if="$can('create news')">
@include('core::admin._button-create', ['module' => 'news'])
</template>

<template slot="columns" slot-scope="{ sortArray }">
<item-list-column-header name="checkbox" v-if="$can('update news')||$can('delete news')"></item-list-column-header>
<item-list-column-header name="edit" v-if="$can('update news')"></item-list-column-header>
<item-list-column-header name="status_translated" sortable :sort-array="sortArray" :label="$t('Status')"></item-list-column-header>
<item-list-column-header name="image" :label="$t('Image')"></item-list-column-header>
<item-list-column-header name="date" sortable :sort-array="sortArray" :label="$t('Date')"></item-list-column-header>
<item-list-column-header name="title_translated" sortable :sort-array="sortArray" :label="$t('Title')"></item-list-column-header>
</template>

<template slot="table-row" slot-scope="{ model, checkedModels, loading }">
<td class="checkbox" v-if="$can('update news')||$can('delete news')">
<item-list-checkbox :model="model" :checked-models-prop="checkedModels" :loading="loading"></item-list-checkbox>
</td>
<td v-if="$can('update news')">
<item-list-edit-button :url="'/admin/news/'+model.id+'/edit'"></item-list-edit-button>
</td>
<td>
<item-list-status-button :model="model"></item-list-status-button>
</td>
<td><img :src="model.thumb" alt="" height="27" /></td>
<td>@{{ model.date | date }}</td>
<td v-html="model.title_translated"></td>
</template>
</item-list>
<template slot="columns" slot-scope="{ sortArray }">
<item-list-column-header name="checkbox" v-if="$can('update news')||$can('delete news')"></item-list-column-header>
<item-list-column-header name="edit" v-if="$can('update news')"></item-list-column-header>
<item-list-column-header name="status_translated" sortable :sort-array="sortArray" :label="$t('Status')"></item-list-column-header>
<item-list-column-header name="image" :label="$t('Image')"></item-list-column-header>
<item-list-column-header name="date" sortable :sort-array="sortArray" :label="$t('Date')"></item-list-column-header>
<item-list-column-header name="title_translated" sortable :sort-array="sortArray" :label="$t('Title')"></item-list-column-header>
</template>

<template slot="table-row" slot-scope="{ model, checkedModels, loading }">
<td class="checkbox" v-if="$can('update news')||$can('delete news')">
<item-list-checkbox :model="model" :checked-models-prop="checkedModels" :loading="loading"></item-list-checkbox>
</td>
<td v-if="$can('update news')">
<item-list-edit-button :url="'/admin/news/' + model.id + '/edit'"></item-list-edit-button>
</td>
<td>
<item-list-status-button :model="model"></item-list-status-button>
</td>
<td><img :src="model.thumb" alt="" height="27" /></td>
<td>@{{ model.date | date }}</td>
<td v-html="model.title_translated"></td>
</template>
</item-list>
@endsection
4 changes: 2 additions & 2 deletions resources/views/public/_list-item.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<li class="news-list-item">
<a class="news-list-item-link" href="{{ $news->uri() }}">
@empty(! $news->image)
@empty(!$news->image)
<img class="news-list-item-image" src="{{ $news->present()->image(600, 400) }}" width="300" height="200" alt="{{ $news->image->alt_attribute }}" />
@endempty

<div class="news-list-item-info">
<h2 class="news-list-item-title">{{ $news->title }}</h2>
<div class="news-list-item-date">{{ $news->present()->dateLocalized }}</div>
@empty(! $news->summary)
@empty(!$news->summary)
<div class="news-list-item-summary">{{ $news->summary }}</div>
@endempty
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/public/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@extends('pages::public.master')

@section('bodyClass', 'body-news body-news-index body-page body-page-'.$page->id)
@section('bodyClass', 'body-news body-news-index body-page body-page-' . $page->id)

@section('page')
<div class="page-body">
Expand Down
12 changes: 6 additions & 6 deletions resources/views/public/show.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@extends('core::public.master')

@section('title', $model->title.''.__('News').''.$websiteTitle)
@section('title', $model->title . '' . __('News') . '' . $websiteTitle)
@section('ogTitle', $model->title)
@section('description', $model->summary)
@section('ogImage', $model->present()->image(1200, 630))
@section('bodyClass', 'body-news body-news-'.$model->id.' body-page body-page-'.$page->id)
@section('bodyClass', 'body-news body-news-' . $model->id . ' body-page body-page-' . $page->id)

@section('content')
<article class="news">
Expand All @@ -19,21 +19,21 @@
</header>
<div class="news-body">
@include('news::public._json-ld', ['news' => $model])
@empty(! $model->summary)
@empty(!$model->summary)
<p class="news-summary">{!! nl2br($model->summary) !!}</p>
@endempty

@include('core::public._share-links')
@empty(! $model->image)
@empty(!$model->image)
<figure class="news-picture">
<img class="news-picture-image" src="{{ $model->present()->image(2000) }}" width="{{ $model->image->width }}" height="{{ $model->image->height }}" alt="" />
@empty(! $model->image->description)
@empty(!$model->image->description)
<figcaption class="news-picture-legend">{{ $model->image->description }}</figcaption>
@endempty
</figure>
@endempty

@empty(! $model->body)
@empty(!$model->body)
<div class="rich-content">{!! $model->present()->body !!}</div>
@endempty

Expand Down

0 comments on commit 8fcd3bb

Please sign in to comment.