mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
Merge pull request #885 from openclassify/muammertop
#2864 Request from walter for OC
This commit is contained in:
commit
e3b78842d8
@ -165,6 +165,7 @@ return [
|
|||||||
'edit' => 'Edit',
|
'edit' => 'Edit',
|
||||||
'approve' => 'Approve',
|
'approve' => 'Approve',
|
||||||
'passive' => "Passive",
|
'passive' => "Passive",
|
||||||
|
'sold' => 'Sold',
|
||||||
'offered_by' => 'Offered By',
|
'offered_by' => 'Offered By',
|
||||||
'more_ads_by' => 'More Ads By',
|
'more_ads_by' => 'More Ads By',
|
||||||
'click_phone' => 'Show phone number',
|
'click_phone' => 'Show phone number',
|
||||||
|
|||||||
@ -29,4 +29,5 @@ return [
|
|||||||
'this_ad_is_not_valid_anymore' => "This ad is not valid anymore!",
|
'this_ad_is_not_valid_anymore' => "This ad is not valid anymore!",
|
||||||
'approve_status_change' => "Your Ad's Status Has Been Set to Active!",
|
'approve_status_change' => "Your Ad's Status Has Been Set to Active!",
|
||||||
'passive_status_change' => "Your Ad's Status Has Been Set to Passive!",
|
'passive_status_change' => "Your Ad's Status Has Been Set to Passive!",
|
||||||
|
'sold_status_change' => "Your Ad's Status Has Been Set to Sold!",
|
||||||
];
|
];
|
||||||
|
|||||||
@ -20,6 +20,12 @@
|
|||||||
{{ trans('visiosoft.module.advs::field.passive') }}
|
{{ trans('visiosoft.module.advs::field.passive') }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if adv.status != 'sold' and adv.is_get_adv != '1' %}
|
||||||
|
<a class="dropdown-item" href="{{ route('visiosoft.module.advs::status',[adv.id,"sold"]) }}">
|
||||||
|
<i class="fa fa-gavel"></i>
|
||||||
|
{{ trans('visiosoft.module.advs::field.sold') }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ asset_add("styles.css", "visiosoft.module.advs::css/dropleft-edit.css") }}
|
{{ asset_add("styles.css", "visiosoft.module.advs::css/dropleft-edit.css") }}
|
||||||
|
|||||||
@ -980,9 +980,13 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
$this->adv_model->statusAds($id, $type);
|
$this->adv_model->statusAds($id, $type);
|
||||||
event(new ChangedStatusAd($ad));//Create Notify
|
event(new ChangedStatusAd($ad));//Create Notify
|
||||||
$message = $type === 'approved' ?
|
if ($type === 'approved') {
|
||||||
trans('visiosoft.module.advs::message.approve_status_change')
|
$message = trans('visiosoft.module.advs::message.approve_status_change');
|
||||||
: trans('visiosoft.module.advs::message.passive_status_change');
|
} elseif ($type === 'sold') {
|
||||||
|
$message = trans('visiosoft.module.advs::message.sold_status_change');
|
||||||
|
} else {
|
||||||
|
trans('visiosoft.module.advs::message.passive_status_change');
|
||||||
|
}
|
||||||
$this->messages->success($message);
|
$this->messages->success($message);
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
@ -1263,4 +1267,13 @@ class AdvsController extends PublicController
|
|||||||
$this->messages->success(trans('visiosoft.module.advs::message.extended', ['number' => $adsExtended]));
|
$this->messages->success(trans('visiosoft.module.advs::message.extended', ['number' => $adsExtended]));
|
||||||
return $this->redirect->back();
|
return $this->redirect->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function sold($id, Request $request, AdvModel $advModel)
|
||||||
|
{
|
||||||
|
if ($request->sold == 'sold') {
|
||||||
|
$advModel->find($id)->update(['status' => 'sold']);
|
||||||
|
} elseif ($request->sold = 'not-sold') {
|
||||||
|
$advModel->find($id)->update(['status' => 'approved']);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user