mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
#1011 Ad post preview page
This commit is contained in:
parent
9cf13cde5a
commit
0f8d4b9781
@ -0,0 +1,63 @@
|
|||||||
|
.preview-wrapper {
|
||||||
|
border: 4px solid #999;
|
||||||
|
}
|
||||||
|
.preview-wrapper:before, .preview-wrapper:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: -30px;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0 39px 30px 39px;
|
||||||
|
border-color: transparent transparent #999 transparent;
|
||||||
|
margin-left: -39px;
|
||||||
|
}
|
||||||
|
.preview-wrapper:after {
|
||||||
|
top: inherit;
|
||||||
|
bottom: -30px;
|
||||||
|
border-width: 30px 39px 0 39px;
|
||||||
|
border-color: #999 transparent transparent transparent;
|
||||||
|
}
|
||||||
|
.preview-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
opacity: .07;
|
||||||
|
background-color: #000;
|
||||||
|
z-index: 400;
|
||||||
|
}
|
||||||
|
.preview-paragraph {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.preview-actions {
|
||||||
|
margin-top: 3em;
|
||||||
|
margin-bottom: 4em;
|
||||||
|
}
|
||||||
|
.preview-edit {
|
||||||
|
color: #438ed8;
|
||||||
|
background: #f7f7f7;
|
||||||
|
border: 1px solid #f7f7f7;
|
||||||
|
}
|
||||||
|
.preview-edit:hover {
|
||||||
|
background: #eaeaea;
|
||||||
|
border-color: #eaeaea;
|
||||||
|
color: #438ed8;
|
||||||
|
}
|
||||||
|
.preview-continue {
|
||||||
|
border-radius: 2px;
|
||||||
|
color: #fff;
|
||||||
|
background: #438ed8;
|
||||||
|
}
|
||||||
|
.preview-continue:hover {
|
||||||
|
background: #3c7fc1;
|
||||||
|
border-color: #3c7fc1;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
#compare-sidebar, .dropleft-edit {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
@ -270,5 +270,11 @@ return [
|
|||||||
'pending_message_3' => 'Estimated Waiting Time',
|
'pending_message_3' => 'Estimated Waiting Time',
|
||||||
'pending_message_4' => 'The time spent in the approval process will be added to the doping time.',
|
'pending_message_4' => 'The time spent in the approval process will be added to the doping time.',
|
||||||
'pending_message_5' => 'No transactions can be made from the call center regarding the ad in the approval process.',
|
'pending_message_5' => 'No transactions can be made from the call center regarding the ad in the approval process.',
|
||||||
'hours' => 'hours'
|
'hours' => 'hours',
|
||||||
|
|
||||||
|
// Preview page
|
||||||
|
'preview_text' => [
|
||||||
|
'part_1' => 'If the following information about your ad is correct, click the "Continue" button and go to the next step.',
|
||||||
|
'part_2' => 'If not, click the "Edit" button.',
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
{% if setting_value('visiosoft.theme.base::breadcrumbs') %}
|
||||||
|
<!-- breadcrumb -->
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/breadcrumb" %}
|
||||||
|
<!-- breadcrumb -->
|
||||||
|
{% endif %}
|
||||||
|
<h2 class="title">
|
||||||
|
{{ adv.title }}
|
||||||
|
{{ addBlock('ad-detail/title/action',{'adv_id':adv.id})|raw }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<!--detail-ad -->
|
||||||
|
<div class="section slider mb-4">
|
||||||
|
<div class="row">
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/slider" %}
|
||||||
|
<div class="col-md-5">
|
||||||
|
{% if setting_value('visiosoft.theme.base::ad_details') %}
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/detail" %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--detail-ad -->
|
||||||
|
|
||||||
|
{% if setting_value('visiosoft.theme.base::ad_details_tab') %}
|
||||||
|
|
||||||
|
{% if blocks('ad-item-content-block-area') is null %}
|
||||||
|
{% include "visiosoft.module.advs::ad-detail/partials/content" %}
|
||||||
|
{% else %}
|
||||||
|
{{ blocks('ad-item-content-block-area') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ addBlock('ad-detail/widget', {'price': adv.price, 'id': adv.id})|raw }}
|
||||||
|
{% endif %}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
{% extends "theme::layouts/default" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="pt-5">
|
||||||
|
<p class="preview-paragraph">
|
||||||
|
{{ trans('visiosoft.module.advs::field.preview_text.part_1') }}
|
||||||
|
<br>
|
||||||
|
{{ trans('visiosoft.module.advs::field.preview_text.part_2') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="preview-actions text-center">
|
||||||
|
{% if isActiveDopings %}
|
||||||
|
{% set continueLink = url_route('add_doping', [adv.id]) %}
|
||||||
|
{% else %}
|
||||||
|
{% set continueLink = url_route('visiosoft.module.advs::edit_adv', [adv.id]) %}
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}"
|
||||||
|
class="btn preview-edit shadow-sm border">
|
||||||
|
{{ trans('visiosoft.module.advs::field.edit') }}
|
||||||
|
</a>
|
||||||
|
<a href="{{ continueLink }}" class="btn preview-continue shadow-sm ml-4">
|
||||||
|
{{ trans('visiosoft.module.advs::field.continue') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="preview-wrapper position-relative">
|
||||||
|
{% include "visiosoft.module.advs::new-ad/preview/partials/preview-window" %}
|
||||||
|
<div class="preview-overlay position-absolute"></div>
|
||||||
|
</div>
|
||||||
|
<div class="preview-actions text-center">
|
||||||
|
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}" class="btn preview-edit shadow-sm border">
|
||||||
|
{{ trans('visiosoft.module.advs::field.edit') }}
|
||||||
|
</a>
|
||||||
|
<a href="{{ continueLink }}" class="btn preview-continue shadow-sm ml-4">
|
||||||
|
{{ trans('visiosoft.module.advs::field.continue') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ asset_add("styles.css", "visiosoft.module.advs::css/detail.css") }}
|
||||||
|
{{ asset_add("styles.css", "visiosoft.module.advs::css/preview.css") }}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@ -125,6 +125,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'as' => 'adv_detail_seo',
|
'as' => 'adv_detail_seo',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@view'
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@view'
|
||||||
],
|
],
|
||||||
|
'advs/preview/{id}' => [
|
||||||
|
'as' => 'advs_preview',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@preview'
|
||||||
|
],
|
||||||
'advs/map?country={country}&city[]={city}&district={districts}' => [
|
'advs/map?country={country}&city[]={city}&district={districts}' => [
|
||||||
'as' => 'visiosoft.module.advs::show_ad_map_location',
|
'as' => 'visiosoft.module.advs::show_ad_map_location',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@map'
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@map'
|
||||||
@ -151,7 +155,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
],
|
],
|
||||||
'advs/my_advs' => 'Visiosoft\AdvsModule\Http\Controller\advsController@myAdvs',
|
'advs/my_advs' => 'Visiosoft\AdvsModule\Http\Controller\advsController@myAdvs',
|
||||||
'advs/my_advs/{params}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@myAdvs',
|
'advs/my_advs/{params}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@myAdvs',
|
||||||
'advs/edit_advs/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@edit',
|
'advs/edit_advs/{id}' => [
|
||||||
|
'as' => 'visiosoft.module.advs::edit_adv',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@edit',
|
||||||
|
],
|
||||||
'advs/status/{id},{type}' => [
|
'advs/status/{id},{type}' => [
|
||||||
'as' => 'visiosoft.module.advs::status',
|
'as' => 'visiosoft.module.advs::status',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@statusAds'
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@statusAds'
|
||||||
|
|||||||
@ -387,6 +387,38 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function preview($id)
|
||||||
|
{
|
||||||
|
$categories = array();
|
||||||
|
$categories_id = array();
|
||||||
|
|
||||||
|
$adv = $this->adv_repository->getListItemAdv($id);
|
||||||
|
|
||||||
|
for ($i = 1; $i <= 10; $i++) {
|
||||||
|
$cat = "cat" . $i;
|
||||||
|
if ($adv->$cat != null) {
|
||||||
|
$item = $this->category_repository->getItem($adv->$cat);
|
||||||
|
if (!is_null($item)) {
|
||||||
|
$categories['cat' . $i] = [
|
||||||
|
'name' => $item->name,
|
||||||
|
'id' => $item->id
|
||||||
|
];
|
||||||
|
$categories_id[] = $item->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->adv_model->is_enabled('customfields')) {
|
||||||
|
$features = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->view($adv);
|
||||||
|
}
|
||||||
|
|
||||||
|
$isActiveDopings = $this->adv_model->is_enabled('dopings');
|
||||||
|
|
||||||
|
return $this->view->make('visiosoft.module.advs::new-ad/preview/preview',
|
||||||
|
compact('adv', 'categories', 'features', 'isActiveDopings'));
|
||||||
|
}
|
||||||
|
|
||||||
public function getLocations()
|
public function getLocations()
|
||||||
{
|
{
|
||||||
$table = $this->requestHttp->table;
|
$table = $this->requestHttp->table;
|
||||||
@ -591,11 +623,7 @@ class AdvsController extends PublicController
|
|||||||
$events->dispatch(new EditAd($request->update_id, $settings, $adv));//Update Notify
|
$events->dispatch(new EditAd($request->update_id, $settings, $adv));//Update Notify
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isActiveDopings) {
|
return redirect(route('advs_preview', [$request->update_id]));
|
||||||
return redirect(route('add_doping', [$request->update_id]));
|
|
||||||
} else {
|
|
||||||
return redirect('/advs/adv/' . $request->update_id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* New Create Adv */
|
/* New Create Adv */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user