mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
commit
489bf014aa
@ -83,10 +83,8 @@ class AdvsModulePlugin extends Plugin
|
||||
}
|
||||
|
||||
$advModel = new AdvModel();
|
||||
return $advModel->newQuery()
|
||||
->where('advs_advs.created_by_id', $user->id)
|
||||
->where('status', 'passive')
|
||||
->get();
|
||||
|
||||
return $advModel->pendingAdvsByUser()->get();
|
||||
}
|
||||
),
|
||||
new \Twig_SimpleFunction(
|
||||
|
||||
@ -247,10 +247,11 @@ class AdvsController extends PublicController
|
||||
|
||||
if ($categoryId) {
|
||||
$seo_keywords = $this->category_model->getMeta_keywords($categoryId->id);
|
||||
$seo_description = $this->category_model->getMeta_description($categoryId->id);
|
||||
$seo_description = $this->category_model->getMeta_description($categoryId->id) . ' ' .
|
||||
implode(',', $seo_keywords);
|
||||
$seo_title = $this->category_model->getMeta_title($categoryId->id);
|
||||
|
||||
$this->template->set('meta_keywords', implode(',', $seo_keywords));
|
||||
$this->template->set('og_description', $seo_description);
|
||||
$this->template->set('meta_description', $seo_description);
|
||||
$this->template->set('meta_title', $seo_title);
|
||||
|
||||
@ -299,7 +300,6 @@ class AdvsController extends PublicController
|
||||
}
|
||||
$this->template->set('showTitle', false);
|
||||
$this->template->set('meta_title', $catText);
|
||||
$this->template->set('meta_description', $catText);
|
||||
}
|
||||
|
||||
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request', 'param',
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="generator" content="{{ config_get('streams::distribution.name') }}"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<meta name="description" content="{{ setting_value('streams::description')|slice(0,160) }}"/>
|
||||
<meta name="description" content="{{ template.get('meta_description', setting_value('streams::description'))|slice(0,160) }}"/>
|
||||
<!-- Meta Tags -->
|
||||
|
||||
<title>
|
||||
|
||||
@ -94,7 +94,11 @@ $('.profile-advs-tab a').on('click', function () {
|
||||
getMyAdvs($(this).attr('data-type'))
|
||||
});
|
||||
|
||||
getMyAdvs('approved');
|
||||
const urlString = window.location.href;
|
||||
const url = new URL(urlString);
|
||||
let type = url.searchParams.get("type");
|
||||
type = type ? type : 'approved';
|
||||
getMyAdvs(type);
|
||||
|
||||
|
||||
function addAdsRow(id, href, image, name, price, city, country, cat1, cat2, status) {
|
||||
|
||||
@ -11,22 +11,21 @@
|
||||
<div class="col-md-12 bg-light advs-section">
|
||||
<nav class="profile-advs-tab">
|
||||
<div class="nav nav-tabs nav-fill" id="nav-tab" role="tablist">
|
||||
<a class="nav-item nav-link active text-dark" data-type="approved" id="nav-approved-tab"
|
||||
data-toggle="tab"
|
||||
href="#nav-approved"
|
||||
{% set type = app.request.get('type') ?: 'approved' %}
|
||||
<a class="nav-item nav-link text-dark{{ type == 'approved' ? ' active' : '' }}"
|
||||
data-type="approved" id="nav-approved-tab" data-toggle="tab" href="#nav-approved"
|
||||
role="tab" aria-controls="nav-detail" aria-selected="true">
|
||||
{{ trans('visiosoft.module.advs::field.my_ads.name') }}
|
||||
</a>
|
||||
<a class="nav-item nav-link text-dark" data-type="pending" id="nav-pending-tab"
|
||||
data-toggle="tab"
|
||||
href="#nav-pending"
|
||||
<a class="nav-item nav-link text-dark{{ type == 'pending' ? ' active' : '' }}"
|
||||
data-type="pending" id="nav-pending-tab" data-toggle="tab" href="#nav-pending"
|
||||
role="tab" aria-controls="nav-pending" aria-selected="true">
|
||||
{{ trans('visiosoft.module.advs::field.pending_adv.name') }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="bg-dark p-2 mt-2 rounded">
|
||||
<a href="/advs/create_adv" class="btn btn-success">
|
||||
<a href="{{ url_route('advs::create_adv') }}" class="btn btn-success">
|
||||
<i class="fas fa-plus-circle"></i>
|
||||
{{ trans("visiosoft.theme.base::button.post_ad.name") }}
|
||||
</a>
|
||||
@ -35,14 +34,14 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="tab-content py-3 px-3 px-sm-0" id="nav-tabContent">
|
||||
<div class="tab-pane fade show active" id="nav-approved" role="tabpanel"
|
||||
aria-labelledby="nav-approved-tab">
|
||||
<div class="tab-pane fade{{ type == 'approved' ? ' show active' : '' }}" id="nav-approved"
|
||||
role="tabpanel" aria-labelledby="nav-approved-tab">
|
||||
</div>
|
||||
<div class="tab-pane fade show" id="nav-pending" role="tabpanel"
|
||||
aria-labelledby="nav-pending-tab">
|
||||
<div class="tab-pane fade{{ type == 'pending' ? ' show active' : '' }}" id="nav-pending"
|
||||
role="tabpanel" aria-labelledby="nav-pending-tab">
|
||||
</div>
|
||||
<div class="tab-pane fade show" id="nav-passive" role="tabpanel"
|
||||
aria-labelledby="nav-passive-tab">
|
||||
<div class="tab-pane fade" id="nav-passive"
|
||||
role="tabpanel" aria-labelledby="nav-passive-tab">
|
||||
</div>
|
||||
|
||||
<!-- Pagination links -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user