This commit is contained in:
Diatrex 2020-02-20 15:27:52 +03:00
commit cb79828f42
7 changed files with 22 additions and 9 deletions

View File

@ -13,7 +13,7 @@ $(document).ready(function () {
$(this).val(all[all.length-1])
})
const filter = {};
var filter = {};
filter.getCats = (catId, divId) => {
$.ajax({
type: 'get',

View File

@ -1,4 +1,4 @@
const filter = {};
var filter = {};
filter.checkUser = () => {
$.ajax({

View File

@ -7,7 +7,7 @@ function hideLoader() {
}
const filter = {};
var filter = {};
// TODO will be unified

View File

@ -97,14 +97,22 @@
style="max-height: 300px;">
<div class="row p-3 m-0">
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="photo"
<input class="form-check-input" type="checkbox"
{% if app.request.get('photo') == true %}
checked
{% endif %}
value="true" name="photo"
id="photo">
<label class="form-check-label" for="photo">
{{ trans("visiosoft.module.advs::field.ads_with_photo.name") }}
</label>
</div>
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="video"
<input class="form-check-input" type="checkbox"
{% if app.request.get('video') == true %}
checked
{% endif %}
value="true" name="video"
id="video">
<label class="form-check-label" for="video">
{{ trans("visiosoft.module.advs::field.ads_with_video.name") }}
@ -177,7 +185,7 @@
{% for currency in active_currencies %}
<option {% if app.request.get('currency') == currency %}
selected
{% endif %}value="{{ currency }}">{{ currency }}</option>
{% endif %}value="{{ currency }}">{{ currency_symbol(currency) }}</option>
{% endfor %}
</select>
</div>

View File

@ -168,7 +168,8 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
public function popularAdvs()
{
return $this->getAdv()->orderBy('count_show_ad', 'desc')->limit(10)->get();
return $this->getAdv()->where('status', 'approved')
->orderBy('count_show_ad', 'desc')->limit(10)->get();
}
public function advsofDay()

View File

@ -47,7 +47,11 @@ class CategoryController extends AdminController
$this->messages->error('Selected category has no sub-categories.');
return back();
}
$table->setTableEntries($categories);
if($request->view != "trash")
{
$table->setTableEntries($categories);
}
return $table->render();
}

View File

@ -82,7 +82,7 @@
<div class="modal-header">
<input type="text" id="searchLocation" class="form-control"
placeholder="{{ trans('visiosoft.module.location::message.placeholder') }}">
<button type="button" class="close filter-modal-close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close filter-modal-close">
<span aria-hidden="true">&times;</span>
</button>
</div>