mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
add extend all
This commit is contained in:
parent
7503c546e4
commit
a44b456398
@ -11,6 +11,7 @@ return [
|
|||||||
'approve' => "Approve",
|
'approve' => "Approve",
|
||||||
'decline' => 'Decline',
|
'decline' => 'Decline',
|
||||||
'extend' => 'Extend',
|
'extend' => 'Extend',
|
||||||
|
'extend_all' => 'Extend All',
|
||||||
'sub_category' => 'Sub Categories',
|
'sub_category' => 'Sub Categories',
|
||||||
'add_sub_category' => 'Add Sub Category',
|
'add_sub_category' => 'Add Sub Category',
|
||||||
'sub_cities' => 'Sub Cities',
|
'sub_cities' => 'Sub Cities',
|
||||||
|
|||||||
@ -10,7 +10,8 @@ return [
|
|||||||
'new_village' => 'Yeni köy',
|
'new_village' => 'Yeni köy',
|
||||||
'approve' => "Onayla",
|
'approve' => "Onayla",
|
||||||
'decline' => 'Reddet',
|
'decline' => 'Reddet',
|
||||||
'extend' => 'Uzat',
|
'extend' => 'Tarihi Güncelle',
|
||||||
|
'extend_all' => 'Tümünün Tarihini Güncelle',
|
||||||
'sub_category' => 'Alt Kategoriler',
|
'sub_category' => 'Alt Kategoriler',
|
||||||
'add_sub_category' => 'Alt Kategori Ekle',
|
'add_sub_category' => 'Alt Kategori Ekle',
|
||||||
'sub_cities' => 'Alt Şehirler',
|
'sub_cities' => 'Alt Şehirler',
|
||||||
|
|||||||
@ -30,6 +30,11 @@ class AdvsModule extends Module
|
|||||||
'new_adv' => [
|
'new_adv' => [
|
||||||
'href' => "/advs/create_adv",
|
'href' => "/advs/create_adv",
|
||||||
],
|
],
|
||||||
|
'extend_all' => [
|
||||||
|
'href' => "/admin/advs/extendAll",
|
||||||
|
'icon' => 'fa fa-calendar',
|
||||||
|
'type' => 'info'
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'assets_clear' => [
|
'assets_clear' => [
|
||||||
|
|||||||
@ -212,7 +212,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'as' => 'ajax::getAds',
|
'as' => 'ajax::getAds',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@getMyAds'
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@getMyAds'
|
||||||
],
|
],
|
||||||
|
'admin/advs/extendAll' => [
|
||||||
|
'as' => 'advs::extendAll',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@extendAll',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -257,4 +257,13 @@ class AdvsController extends AdminController
|
|||||||
<a href='" . $request->server('HTTP_REFERER') . "'><b>Return Back</b></a>";
|
<a href='" . $request->server('HTTP_REFERER') . "'><b>Return Back</b></a>";
|
||||||
echo "<br><a href='/admin'><b>Return Admin Panel</b></a>";
|
echo "<br><a href='/admin'><b>Return Admin Panel</b></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function extendAll()
|
||||||
|
{
|
||||||
|
$advs = $this->model->get();
|
||||||
|
$new_date = date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . setting_value('visiosoft.module.advs::default_published_time') . ' day'));
|
||||||
|
$advs->update(['finish_at' => $new_date]);
|
||||||
|
$this->messages->success(trans('visiosoft.module.advs::field.extended'));
|
||||||
|
return $this->redirect->to('admin/advs/advs');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user