change icons, css, add routing to merchandise, add mail templater, fixes
This commit is contained in:
49
app/Datatables/Admin/Core/Mail/MailTemplatesDataTable.php
Normal file
49
app/Datatables/Admin/Core/Mail/MailTemplatesDataTable.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Datatables\Admin\Core\Mail;
|
||||
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Core\Mail\MailTemplate;
|
||||
use App\Repositories\Core\Auth\Users;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
|
||||
class MailTemplatesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'mail_templates';
|
||||
|
||||
public $sortedColumn = 0;
|
||||
|
||||
public $sortedOrder = 'desc';
|
||||
|
||||
public $stateSave = true;
|
||||
|
||||
public function query(MailTemplate $model)
|
||||
{
|
||||
return $this->buildQuery($model);
|
||||
}
|
||||
|
||||
public function getHtmlButtons()
|
||||
{
|
||||
$buttons = '';
|
||||
if (Users::hasPermission('mail_templates_view')) {
|
||||
$buttons .= self::getButtonShow();
|
||||
}
|
||||
if (Users::hasPermission('mail_templates_update')) {
|
||||
$buttons .= self::getButtonEdit();
|
||||
}
|
||||
if (Users::hasPermission('mail_templates_delete')) {
|
||||
$buttons .= self::getButtonDel();
|
||||
}
|
||||
|
||||
return $buttons;
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('subject')->title(__('Core.subject')),
|
||||
Column::make('mailable')->title(__('Mailable')),
|
||||
$this->makeColumnButtons()->width('60'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user