mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify
This commit is contained in:
commit
b0c6ced413
@ -105,4 +105,18 @@
|
||||
|
||||
#filterModal {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.result-text {
|
||||
font-size: 13px;
|
||||
margin: 0 -15px;
|
||||
}
|
||||
|
||||
.result-text span:first-child {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.result-text span:last-child {
|
||||
color: #8f0100;
|
||||
font-weight: 500;
|
||||
}
|
||||
@ -173,5 +173,13 @@ $('.ad-info-right-bar-video').tooltip({
|
||||
html: true
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#listFilterForm").submit(function(e) {
|
||||
const inputs = $('#listFilterForm :input');
|
||||
[...inputs].forEach((input) => {
|
||||
if ($(input).val() == ""
|
||||
|| $(input).prop("checked") == false
|
||||
|| $(input).find(':selected').val() == "") {
|
||||
$(input).prop('disabled', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -263,6 +263,8 @@ return [
|
||||
"no_location" => "No location is selected.",
|
||||
"continue" => 'Continue',
|
||||
"gallery" => 'Gallery',
|
||||
"ads" => 'Ads',
|
||||
"were_found" => 'were found.',
|
||||
|
||||
// Pending screen
|
||||
'pending_message_1' => 'The Ad is in the Approval Process',
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
{% extends layout('list') %}
|
||||
|
||||
{% block styles %}
|
||||
{{ asset_style("visiosoft.module.advs::css/list.css") }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section>
|
||||
|
||||
@ -15,7 +19,15 @@
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="section recommended-classified">
|
||||
|
||||
{% if catText %}
|
||||
<div class="result-text border py-2 px-3 mb-3 d-none d-sm-block">
|
||||
<p class="mb-0">
|
||||
<span>"{{ catText }}"</span>
|
||||
<span>{{ advs.total }} {{ trans('visiosoft.module.advs::field.ads')|lower }}</span>
|
||||
{{ trans('visiosoft.module.advs::field.were_found') }}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row breadcrumb list-header">
|
||||
|
||||
<div class="col-md-6 my-2 d-none d-sm-block">
|
||||
@ -61,7 +73,6 @@
|
||||
</script>
|
||||
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/list.js") }}
|
||||
{{ asset_add("styles.css", "visiosoft.module.advs::css/list.css") }}
|
||||
|
||||
{% endblock %}
|
||||
{% block customjs %}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{% set formHtml %}
|
||||
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get">
|
||||
<form action="{{ url_route('visiosoft.module.advs::list') }}" method="get" id="listFilterForm">
|
||||
{% endset %}
|
||||
{% set catSlug = null %}
|
||||
{% set citySlug = null %}
|
||||
@ -12,7 +12,7 @@
|
||||
{% endif %}
|
||||
{% if catSlug %}
|
||||
{% set formHtml %}
|
||||
<form action="{{ url_route('adv_list_seo', [catSlug, citySlug]) }}" method="get">
|
||||
<form action="{{ url_route('adv_list_seo', [catSlug, citySlug]) }}" method="get" id="listFilterForm">
|
||||
{% endset %}
|
||||
{% endif %}
|
||||
{{ formHtml }}
|
||||
|
||||
@ -279,9 +279,26 @@ class AdvsController extends PublicController
|
||||
|
||||
$viewType = $this->requestHttp->cookie('viewType');
|
||||
|
||||
if (!isset($allCats)) {
|
||||
if (count($mainCats) == 1 || count($mainCats) == 2) {
|
||||
$catText = end($mainCats)['val'];
|
||||
} elseif (count($mainCats) > 2) {
|
||||
$catArray = array_slice($mainCats, 2);
|
||||
$catText = '';
|
||||
$loop = 0;
|
||||
foreach ($catArray as $cat) {
|
||||
$catText = !$loop ? $catText . $cat['val'] : $catText . ' ' . $cat['val'];
|
||||
$loop++;
|
||||
}
|
||||
}
|
||||
$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',
|
||||
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges', 'seenList',
|
||||
'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats');
|
||||
'user', 'featured_advs', 'viewType', 'topfields', 'selectDropdown', 'selectRange', 'selectImage', 'ranges',
|
||||
'seenList', 'searchedCountry', 'radio', 'categoryId', 'cityId', 'allCats', 'catText');
|
||||
|
||||
return $this->viewTypeBasedRedirect($viewType, $compact);
|
||||
}
|
||||
|
||||
@ -15,27 +15,27 @@ function phoneMask(fields) {
|
||||
})
|
||||
});
|
||||
|
||||
var fields_arr = fields.split(',');
|
||||
$.each(fields_arr, function (index, value) {
|
||||
maskPhone($(value).attr('name'))
|
||||
});
|
||||
// var fields_arr = fields.split(',');
|
||||
// $.each(fields_arr, function (index, value) {
|
||||
// maskPhone($(value).attr('name'))
|
||||
// });
|
||||
|
||||
|
||||
$(fields).on('countrychange', function (e) {
|
||||
maskPhone($(this).attr('name'))
|
||||
});
|
||||
// $(fields).on('countrychange', function (e) {
|
||||
// maskPhone($(this).attr('name'))
|
||||
// });
|
||||
|
||||
function maskPhone(name) {
|
||||
if ( $("input[name='" + name + "']").length ) {
|
||||
var currentMask = $("input[name='" + name + "']").attr('placeholder');
|
||||
if(currentMask) {
|
||||
$("input[name='" + name + "']").mask(currentMask.replace(/[0-9+]/ig, '9'), {
|
||||
autoclear: true,
|
||||
clearIncomplete: true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// function maskPhone(name) {
|
||||
// if ( $("input[name='" + name + "']").length ) {
|
||||
// var currentMask = $("input[name='" + name + "']").attr('placeholder');
|
||||
// if(currentMask) {
|
||||
// $("input[name='" + name + "']").mask(currentMask.replace(/[0-9+]/ig, '9'), {
|
||||
// autoclear: true,
|
||||
// clearIncomplete: true
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -50,4 +50,10 @@ return [
|
||||
'secure_e-commerce_ads' => 'Secure e-Commerce Ads',
|
||||
'sms' => 'Send Text Message (SMS)',
|
||||
'mail' => 'Send Mail',
|
||||
|
||||
// Register instruction seed
|
||||
'register_instructions' => 'Register Instructions',
|
||||
'list' => 'List',
|
||||
'instruction_description' => 'Instruction Description',
|
||||
'instruction_list' => 'Instruction List',
|
||||
];
|
||||
@ -34,29 +34,10 @@
|
||||
</div>
|
||||
|
||||
{{ addBlock('register/corporate-register')|raw }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-6 py-3 pr-0 instructions d-none d-md-block">
|
||||
<div class="border personal-advantages py-5 px-5">
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
{% if setting_value('visiosoft.theme.base::register_page_instruction_logo') %}
|
||||
<img class="mr-3"
|
||||
src="{{ file(setting_value('visiosoft.theme.base::register_page_instruction_logo')).url }}">
|
||||
{% endif %}
|
||||
<h4 class="mb-0">
|
||||
{{ trans('visiosoft.theme.base::field.personal_registration_header') }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
{{ trans('visiosoft.theme.base::field.personal_registration_body') }}
|
||||
</div>
|
||||
<ul class="pl-4">
|
||||
<li>{{ trans('visiosoft.theme.base::field.personal_registration_list_1') }}</li>
|
||||
<li>{{ trans('visiosoft.theme.base::field.personal_registration_list_2') }}</li>
|
||||
<li>{{ trans('visiosoft.theme.base::field.personal_registration_list_3') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ blocks('register-instructions') }}
|
||||
|
||||
{{ addBlock('register/instructions')|raw }}
|
||||
|
||||
|
||||
@ -8,8 +8,11 @@
|
||||
<!-- Meta Tags -->
|
||||
|
||||
<title>
|
||||
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
|
||||
›
|
||||
{% set showTitle = template.showTitle is same as(false) ? false : true %}
|
||||
{% if showTitle %}
|
||||
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
|
||||
›
|
||||
{% endif %}
|
||||
{{ trans(template.meta_title) }}
|
||||
</title>
|
||||
|
||||
|
||||
17
addons/default/visiosoft/base-theme/src/BaseThemeSeeder.php
Normal file
17
addons/default/visiosoft/base-theme/src/BaseThemeSeeder.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php namespace Visiosoft\BaseTheme;
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||
use Visiosoft\BaseTheme\Seed\RegisterInstructionSeeder;
|
||||
|
||||
class BaseThemeSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the seeder.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Register Instruction Seeder
|
||||
$this->call(RegisterInstructionSeeder::class);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
<?php namespace Visiosoft\BaseTheme\Seed;
|
||||
|
||||
use Anomaly\BlocksModule\Area\Contract\AreaRepositoryInterface;
|
||||
use Anomaly\BlocksModule\Type\Contract\TypeRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Assignment\Contract\AssignmentRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Field\Contract\FieldRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Anomaly\BlocksModule\Block\Contract\BlockRepositoryInterface;
|
||||
|
||||
class RegisterInstructionSeeder extends Seeder
|
||||
{
|
||||
|
||||
private $areaRepository;
|
||||
private $blocksTypeRepository;
|
||||
private $fieldRepository;
|
||||
private $assignmentRepository;
|
||||
private $streamRepository;
|
||||
private $blockRepository;
|
||||
|
||||
public function __construct(
|
||||
AreaRepositoryInterface $areaRepository,
|
||||
TypeRepositoryInterface $blocksTypeRepository,
|
||||
FieldRepositoryInterface $fieldRepository,
|
||||
AssignmentRepositoryInterface $assignmentRepository,
|
||||
StreamRepositoryInterface $streamRepository,
|
||||
BlockRepositoryInterface $blockRepository
|
||||
) {
|
||||
$this->areaRepository = $areaRepository;
|
||||
$this->blocksTypeRepository = $blocksTypeRepository;
|
||||
$this->fieldRepository = $fieldRepository;
|
||||
$this->assignmentRepository = $assignmentRepository;
|
||||
$this->streamRepository = $streamRepository;
|
||||
$this->blockRepository = $blockRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Create block area
|
||||
if ($registerInstructionsArea = $this->areaRepository->findBySlug('register-instructions')) {
|
||||
$registerInstructionsArea->delete();
|
||||
}
|
||||
$registerInstructionsArea = $this->areaRepository->create([
|
||||
'name' => trans('visiosoft.theme.base::field.register_instructions'),
|
||||
'slug' => 'register-instructions',
|
||||
]);
|
||||
|
||||
// Create block type
|
||||
if ($blockType = $this->blocksTypeRepository->getModel()->withTrashed()->where('slug', 'list')->first()) {
|
||||
$blockType->forceDelete();
|
||||
}
|
||||
$blockType = $this->blocksTypeRepository->create([
|
||||
'name' => trans('visiosoft.theme.base::field.list'),
|
||||
'slug' => 'list',
|
||||
'category' => 'other',
|
||||
'content_layout' => '<div class="border {{ block.area.slug == \'register-instructions\' ? \'personal-advantages\' : \'corporate-advantages\' }} py-5 px-5">
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
{% if setting_value(\'visiosoft.theme.base::register_page_instruction_logo\') %}
|
||||
<img class="mr-3" src="{{ file(setting_value(\'visiosoft.theme.base::register_page_instruction_logo\')).url }}">
|
||||
{% endif %}
|
||||
<h4 class="mb-0">
|
||||
{{ block.title }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
{{ block.instruction_description }}
|
||||
</div>
|
||||
<ul class="pl-4">
|
||||
{% for listItem in block.instruction_list.values %}
|
||||
<li>{{ listItem }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>',
|
||||
'wrapper_layout' => '{% extends "anomaly.module.blocks::types.wrapper" %}'
|
||||
]);
|
||||
|
||||
// Create block stream
|
||||
if ($listBlock = $this->streamRepository->findBySlugAndNamespace('list_blocks', 'blocks')) {
|
||||
$listBlock->delete();
|
||||
}
|
||||
$listBlock = $this->streamRepository->create([
|
||||
'name' => trans('visiosoft.theme.base::field.list'),
|
||||
'namespace' => 'blocks',
|
||||
'slug' => 'list_blocks',
|
||||
'prefix' => 'blocks_',
|
||||
'translatable' => 1,
|
||||
]);
|
||||
|
||||
// Create block fields
|
||||
$blocksFields = [
|
||||
'instruction_description' => [
|
||||
'name' => trans('visiosoft.theme.base::field.instruction_description'),
|
||||
'namespace' => 'blocks',
|
||||
'slug' => 'instruction_description',
|
||||
'type' => 'anomaly.field_type.text',
|
||||
"config" => [
|
||||
"type" => "text",
|
||||
]
|
||||
],
|
||||
'instruction_list' => [
|
||||
'name' => trans('visiosoft.theme.base::field.instruction_list'),
|
||||
'namespace' => 'blocks',
|
||||
'slug' => 'instruction_list',
|
||||
'type' => 'visiosoft.field_type.list',
|
||||
"config" => [
|
||||
"type" => "text",
|
||||
]
|
||||
]
|
||||
];
|
||||
foreach ($blocksFields as $blocksField) {
|
||||
if ($field = $this->fieldRepository->findBySlugAndNamespace($blocksField['slug'], $blocksField['namespace'])) {
|
||||
$field->delete();
|
||||
}
|
||||
$field = $this->fieldRepository->create([
|
||||
'name' => $blocksField['name'],
|
||||
'namespace' => $blocksField['namespace'],
|
||||
'slug' => $blocksField['slug'],
|
||||
'type' => $blocksField['type'],
|
||||
'locked' => 0,
|
||||
"config" => $blocksField['config']
|
||||
]);
|
||||
$this->assignmentRepository->create([
|
||||
'stream_id' => $listBlock->getId(),
|
||||
'field_id' => $field->id,
|
||||
'label' => $blocksField['name'],
|
||||
'translatable' => 1,
|
||||
]);
|
||||
}
|
||||
|
||||
// Add default instructions
|
||||
$blockFieldId = $this->fieldRepository->findBySlugAndNamespace('blocks', 'blocks')->getId();
|
||||
$block = $this->blockRepository->create([
|
||||
'title' => trans('visiosoft.theme.base::field.personal_registration_header'),
|
||||
'field' => $blockFieldId,
|
||||
'extension' => 'anomaly.extension.list_block',
|
||||
'display_title' => false,
|
||||
]);
|
||||
$blockInfo = app('Anomaly\Streams\Platform\Model\Blocks\BlocksListBlocksEntryModel')->newQuery()->create([
|
||||
'instruction_description' => trans('visiosoft.theme.base::field.personal_registration_body'),
|
||||
'instruction_list' => [
|
||||
trans('visiosoft.theme.base::field.personal_registration_list_1'),
|
||||
trans('visiosoft.theme.base::field.personal_registration_list_2'),
|
||||
trans('visiosoft.theme.base::field.personal_registration_list_3'),
|
||||
]
|
||||
]);
|
||||
$block->update([
|
||||
'area_id' => $registerInstructionsArea->getId(),
|
||||
'area_type' => get_class($registerInstructionsArea),
|
||||
'entry_id' => $blockInfo->id,
|
||||
'entry_type' => get_class($blockInfo),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -41,13 +41,15 @@ class AddViewAdsButton
|
||||
protected function addViewAdsButton(UserTableBuilder $builder)
|
||||
{
|
||||
$buttons = $builder->getButtons();
|
||||
$dropdown = array_merge($buttons['settings']['dropdown'], [
|
||||
"ads" => [
|
||||
"text" => trans('visiosoft.theme.defaultadmin::button.view_ads'),
|
||||
"href" => "admin/advs?filter_User={entry.id}"
|
||||
]
|
||||
]);
|
||||
$buttons['settings']['dropdown'] = $dropdown;
|
||||
$builder->setButtons($buttons);
|
||||
if (isset($buttons['settings'])) {
|
||||
$dropdown = array_merge($buttons['settings']['dropdown'], [
|
||||
"ads" => [
|
||||
"text" => trans('visiosoft.theme.defaultadmin::button.view_ads'),
|
||||
"href" => "admin/advs?filter_User={entry.id}"
|
||||
]
|
||||
]);
|
||||
$buttons['settings']['dropdown'] = $dropdown;
|
||||
$builder->setButtons($buttons);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -78,6 +78,7 @@
|
||||
"ammadeuss/laravel-html-dom-parser": "^1.1",
|
||||
"visiosoft/decimal-field_type": "~2.1.0",
|
||||
"visiosoft/integer-field_type": "~2.1.0",
|
||||
"visiosoft/list-field_type": "*",
|
||||
"guzzlehttp/guzzle": "~6.3.3"
|
||||
},
|
||||
"replace": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user