mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify
This commit is contained in:
commit
2167dfebf0
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||||
|
|
||||||
|
class VisiosoftModuleAdvsAddDocFilesField extends Migration
|
||||||
|
{
|
||||||
|
protected $delete = false;
|
||||||
|
|
||||||
|
protected $stream = [
|
||||||
|
'slug' => 'advs',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fields = [
|
||||||
|
'doc_files' => [
|
||||||
|
'type' => 'visiosoft.field_type.media',
|
||||||
|
'config' => [
|
||||||
|
'folders' => ["ads_documents"],
|
||||||
|
'mode' => 'upload',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $assignments = [
|
||||||
|
'doc_files'
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -46,4 +46,9 @@ return [
|
|||||||
'write',
|
'write',
|
||||||
'delete',
|
'delete',
|
||||||
],
|
],
|
||||||
|
'status' => [
|
||||||
|
'read',
|
||||||
|
'write',
|
||||||
|
'delete',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -22,14 +22,16 @@ return [
|
|||||||
'fields' => [
|
'fields' => [
|
||||||
'latest-limit',
|
'latest-limit',
|
||||||
'popular_ads_limit',
|
'popular_ads_limit',
|
||||||
|
'ads_image_limit',
|
||||||
'default_view_type',
|
'default_view_type',
|
||||||
'price_area_hidden',
|
'price_area_hidden',
|
||||||
'hide_listing_standard_price',
|
'hide_listing_standard_price',
|
||||||
'hide_zero_price',
|
'hide_zero_price',
|
||||||
'auto_approve',
|
'auto_approve',
|
||||||
'estimated_pending_time',
|
'estimated_pending_time',
|
||||||
'default_published_time',
|
'default_published_time',
|
||||||
'default_GET',
|
'default_GET',
|
||||||
|
'get_categories',
|
||||||
'listing_page_image',
|
'listing_page_image',
|
||||||
'show_ads_count',
|
'show_ads_count',
|
||||||
],
|
],
|
||||||
@ -82,6 +84,7 @@ return [
|
|||||||
'translations' => [
|
'translations' => [
|
||||||
'title' => 'visiosoft.module.advs::section.translations',
|
'title' => 'visiosoft.module.advs::section.translations',
|
||||||
'fields' => [
|
'fields' => [
|
||||||
|
'lang_switcher_for_browser',
|
||||||
'override_text',
|
'override_text',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|||||||
@ -153,12 +153,12 @@ return [
|
|||||||
'mode' => 'checkbox'
|
'mode' => 'checkbox'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'price_area_hidden' => [
|
'price_area_hidden' => [
|
||||||
'type' => 'anomaly.field_type.boolean',
|
'type' => 'anomaly.field_type.boolean',
|
||||||
'config' => [
|
'config' => [
|
||||||
'default_value' => false,
|
'default_value' => false,
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'enabled_currencies' => [
|
'enabled_currencies' => [
|
||||||
'bind' => 'streams::currencies.enabled',
|
'bind' => 'streams::currencies.enabled',
|
||||||
'env' => 'ADV_ENABLED_CURRENCIES',
|
'env' => 'ADV_ENABLED_CURRENCIES',
|
||||||
@ -351,15 +351,34 @@ return [
|
|||||||
'env' => 'OVERRIDE_TEXT',
|
'env' => 'OVERRIDE_TEXT',
|
||||||
],
|
],
|
||||||
'steps_color' => [
|
'steps_color' => [
|
||||||
"type" => "anomaly.field_type.colorpicker",
|
"type" => "anomaly.field_type.colorpicker",
|
||||||
"config" => [
|
"config" => [
|
||||||
"default_value" => '#209579',
|
"default_value" => '#209579',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'create_ad_button_color' => [
|
'create_ad_button_color' => [
|
||||||
"type" => "anomaly.field_type.colorpicker",
|
"type" => "anomaly.field_type.colorpicker",
|
||||||
"config" => [
|
"config" => [
|
||||||
"default_value" => '#00a651',
|
"default_value" => '#00a651',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'ads_image_limit' => [
|
||||||
|
"type" => "anomaly.field_type.integer",
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 25
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'lang_switcher_for_browser' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'bind' => 'advs.lang_switcher_for_browser',
|
||||||
|
'env' => 'LANG_SWITCHER_FOR_BROWSER',
|
||||||
|
],
|
||||||
|
'get_categories' => [
|
||||||
|
'type' => 'anomaly.field_type.checkboxes',
|
||||||
|
'config' => [
|
||||||
|
'options' => function (\Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface $categoryRepository) {
|
||||||
|
return $categoryRepository->mainCats()->pluck('name', 'id')->all();
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -44,4 +44,8 @@
|
|||||||
|
|
||||||
select[name=filter_User] + .select2 {
|
select[name=filter_User] + .select2 {
|
||||||
min-width: 20rem;
|
min-width: 20rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-collapse {
|
||||||
|
padding-left: 15px !important;
|
||||||
}
|
}
|
||||||
@ -224,4 +224,58 @@ a.sort-by-open-dropdown:hover {
|
|||||||
|
|
||||||
#listFilterForm .card-header {
|
#listFilterForm .card-header {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-3{
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.py-1 {
|
||||||
|
padding-top: 3px!important;
|
||||||
|
padding-bottom: 3px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.px-2 {
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-link {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-3 {
|
||||||
|
padding: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchbut {
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main > div > nav {
|
||||||
|
padding-bottom: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb {
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
.subbreadcrumb small , .sort-by-selected-text{
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-thumbnail {
|
||||||
|
padding: 0px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.products-list p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-collapse {
|
||||||
|
padding-left: 15px !important;
|
||||||
}
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
function getUrlParameter(sParam) {
|
||||||
|
var sPageURL = window.location.search.substring(1),
|
||||||
|
sURLVariables = sPageURL.split('&'),
|
||||||
|
sParameterName,
|
||||||
|
i;
|
||||||
|
|
||||||
|
for (i = 0; i < sURLVariables.length; i++) {
|
||||||
|
sParameterName = sURLVariables[i].split('=');
|
||||||
|
|
||||||
|
if (sParameterName[0] === sParam) {
|
||||||
|
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (getUrlParameter('view') === "advanced") {
|
||||||
|
$('.fast-update').on('change', function () {
|
||||||
|
var advanced_value = $(this).val(), advanced_entry_id = $(this).data('entry_id'),
|
||||||
|
advanced_column = $(this).data('column'), advanced_type = $(this).attr('type');
|
||||||
|
|
||||||
|
if (advanced_type === "checkbox") {
|
||||||
|
advanced_value = ($(this).prop('checked')) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
crudAjax({
|
||||||
|
'advanced_column': advanced_column,
|
||||||
|
'advanced_entry_id': advanced_entry_id,
|
||||||
|
'advanced_value': advanced_value
|
||||||
|
}, advanced_update_url, 'POST')
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -43,4 +43,5 @@ return [
|
|||||||
'fast_create' => 'Fast create',
|
'fast_create' => 'Fast create',
|
||||||
'publish' => 'Publish',
|
'publish' => 'Publish',
|
||||||
'import' => 'Import',
|
'import' => 'Import',
|
||||||
|
'new_status' => 'New Status',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -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',
|
||||||
@ -209,6 +210,7 @@ return [
|
|||||||
'corporate_info' => 'Corporate Info',
|
'corporate_info' => 'Corporate Info',
|
||||||
'featured_ads' => "Featured Ads",
|
'featured_ads' => "Featured Ads",
|
||||||
'trending_ads' => 'Trendind Ads',
|
'trending_ads' => 'Trendind Ads',
|
||||||
|
'search_ad_result_prefix' => 'on',
|
||||||
'search_ads_result_message' => [
|
'search_ads_result_message' => [
|
||||||
'name' => ':count ads found for :name search',
|
'name' => ':count ads found for :name search',
|
||||||
],
|
],
|
||||||
@ -280,6 +282,7 @@ return [
|
|||||||
"no_location" => "No location is selected.",
|
"no_location" => "No location is selected.",
|
||||||
"continue" => 'Continue',
|
"continue" => 'Continue',
|
||||||
"gallery" => 'Gallery',
|
"gallery" => 'Gallery',
|
||||||
|
"ad" => 'Ad',
|
||||||
"ads" => 'Ads',
|
"ads" => 'Ads',
|
||||||
"were_found" => 'were found.',
|
"were_found" => 'were found.',
|
||||||
|
|
||||||
@ -316,6 +319,7 @@ return [
|
|||||||
'congratulations' => 'Congratulations',
|
'congratulations' => 'Congratulations',
|
||||||
'ad_desc' => 'Ad Description',
|
'ad_desc' => 'Ad Description',
|
||||||
'upload_photos' => 'Upload Photos',
|
'upload_photos' => 'Upload Photos',
|
||||||
|
'upload_files' => 'Upload Files',
|
||||||
'additional_fields' => 'Additional Fields',
|
'additional_fields' => 'Additional Fields',
|
||||||
'ad_location' => 'Ad Location',
|
'ad_location' => 'Ad Location',
|
||||||
|
|
||||||
|
|||||||
@ -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!",
|
||||||
];
|
];
|
||||||
|
|||||||
@ -97,4 +97,12 @@ return [
|
|||||||
'delete' => 'Can delete option configuration?',
|
'delete' => 'Can delete option configuration?',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'status' => [
|
||||||
|
'name' => 'Status',
|
||||||
|
'option' => [
|
||||||
|
'read' => 'Can read status?',
|
||||||
|
'write' => 'Can create/edit status?',
|
||||||
|
'delete' => 'Can delete status?',
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -56,4 +56,7 @@ return [
|
|||||||
'title' => 'Configuration',
|
'title' => 'Configuration',
|
||||||
],
|
],
|
||||||
'translations' => 'Translations',
|
'translations' => 'Translations',
|
||||||
|
'status' => [
|
||||||
|
'title' => 'Status',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -219,4 +219,12 @@ return [
|
|||||||
'name' => 'Create Ad Button Color',
|
'name' => 'Create Ad Button Color',
|
||||||
'instructions' => 'Changes the button that shows up when the new ad category selection is finished.'
|
'instructions' => 'Changes the button that shows up when the new ad category selection is finished.'
|
||||||
],
|
],
|
||||||
|
'lang_switcher_for_browser' => [
|
||||||
|
'name' => 'Lang Switcher For Browser',
|
||||||
|
'instructions' => 'Allows you to choose browser language as active language'
|
||||||
|
],
|
||||||
|
'get_categories' => [
|
||||||
|
'name' => 'GET Categories',
|
||||||
|
'instructions' => 'It represents the categories in which the GET property will be valid.'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -31,4 +31,7 @@ return [
|
|||||||
'option_configuration' => [
|
'option_configuration' => [
|
||||||
'name' => 'Configuration',
|
'name' => 'Configuration',
|
||||||
],
|
],
|
||||||
|
'status' => [
|
||||||
|
'name' => 'Status',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'unfinished' => 'Unfinished',
|
'unfinished' => 'Unfinished',
|
||||||
|
'advanced' => 'Advanced',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -210,6 +210,7 @@ return [
|
|||||||
'corporate_info' => 'Kurumsal Bilgiler',
|
'corporate_info' => 'Kurumsal Bilgiler',
|
||||||
'featured_ads' => "Öne Çıkan İlanlar",
|
'featured_ads' => "Öne Çıkan İlanlar",
|
||||||
'trending_ads' => 'Popüler İlanlar',
|
'trending_ads' => 'Popüler İlanlar',
|
||||||
|
'search_ad_result_prefix' => 'Aramanızda',
|
||||||
'search_ads_result_message' => [
|
'search_ads_result_message' => [
|
||||||
'name' => ':name aramanızda :count adet ilan bulunmuştur.
|
'name' => ':name aramanızda :count adet ilan bulunmuştur.
|
||||||
',
|
',
|
||||||
@ -219,7 +220,7 @@ return [
|
|||||||
'view_cart' => 'Sepeti Görüntüle',
|
'view_cart' => 'Sepeti Görüntüle',
|
||||||
'no_ads' => 'İlan bulunamadı!',
|
'no_ads' => 'İlan bulunamadı!',
|
||||||
'show_display_mode' => [
|
'show_display_mode' => [
|
||||||
'map' => 'harita',
|
'map' => 'Harita',
|
||||||
'list' => 'Liste',
|
'list' => 'Liste',
|
||||||
],
|
],
|
||||||
'advs_list_table_thead' => [
|
'advs_list_table_thead' => [
|
||||||
@ -282,6 +283,7 @@ return [
|
|||||||
"no_location" => "Lokasyon eklenmemiş.",
|
"no_location" => "Lokasyon eklenmemiş.",
|
||||||
"continue" => 'Devam Et',
|
"continue" => 'Devam Et',
|
||||||
"gallery" => 'Galeri',
|
"gallery" => 'Galeri',
|
||||||
|
"ad" => 'İlan',
|
||||||
"ads" => 'İlanlar',
|
"ads" => 'İlanlar',
|
||||||
"were_found" => 'bulundu.',
|
"were_found" => 'bulundu.',
|
||||||
|
|
||||||
|
|||||||
@ -219,4 +219,12 @@ return [
|
|||||||
'name' => 'Reklam Düğmesi Rengi Oluştur',
|
'name' => 'Reklam Düğmesi Rengi Oluştur',
|
||||||
'instructions' => 'Yeni reklam kategorisi seçimi bittiğinde görünen düğmeyi değiştirir.'
|
'instructions' => 'Yeni reklam kategorisi seçimi bittiğinde görünen düğmeyi değiştirir.'
|
||||||
],
|
],
|
||||||
|
'lang_switcher_for_browser' => [
|
||||||
|
'name' => 'Tarayıcı Diline Geç',
|
||||||
|
'instructions' => 'Seçili aktif bir dil olmadığında tarayıcı dilini aktif dil olarak seçmenize izin verir'
|
||||||
|
],
|
||||||
|
'get_categories' => [
|
||||||
|
'name' => 'GET Kategorileri',
|
||||||
|
'instructions' => 'GET özelliğinin geçerli olacağı kategorileri temsil eder.'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'unfinished' => 'Bitmemiş',
|
'unfinished' => 'Bitmemiş',
|
||||||
|
'advanced' => 'Gelişmiş',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -36,6 +36,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--detail-ad -->
|
<!--detail-ad -->
|
||||||
|
|
||||||
|
<ul class="docs list-unstyled">
|
||||||
|
{% for doc in adv.doc_files %}
|
||||||
|
<li><a class="text-dark small" href="{{ doc.url }}"><i class="fa fa-lg fa-download small"></i> {{ doc.name }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% if setting_value('visiosoft.theme.base::ad_details_tab') %}
|
{% if setting_value('visiosoft.theme.base::ad_details_tab') %}
|
||||||
|
|
||||||
{% if blocks('ad-item-content-block-area') is null %}
|
{% if blocks('ad-item-content-block-area') is null %}
|
||||||
|
|||||||
@ -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") }}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
<p>
|
|
||||||
{% if(adv.map_Val == "") %}
|
{% if(adv.map_Val == "") %}
|
||||||
{{ trans('visiosoft.module.advs::field.no_location') }}
|
{{ trans('visiosoft.module.advs::field.no_location') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -51,4 +50,3 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
{{ asset_add("scripts.js", "streams::js/table/table.js") }}
|
||||||
|
|
||||||
|
{% if not actions.empty() %}
|
||||||
|
{{ asset_add("scripts.js", "streams::js/table/actions.js") }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if table.options.sortable %}
|
||||||
|
{{ asset_add("scripts.js", "streams::js/table/sortable.js") }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="{{ table.options.container_class ?: 'container-fluid' }}">
|
||||||
|
|
||||||
|
{{ view("streams::table/partials/filters", {'table': table}) }}
|
||||||
|
{{ view("streams::table/partials/views", {'table': table}) }}
|
||||||
|
|
||||||
|
{{ view(table.options.heading ?: "streams::table/partials/heading", {'table': table}) }}
|
||||||
|
|
||||||
|
{% if not table.rows.empty() %}
|
||||||
|
{% block card %}
|
||||||
|
<div class="card">
|
||||||
|
|
||||||
|
{{ form_open({ 'url': url_full() }) }}
|
||||||
|
<div class="table-stack">
|
||||||
|
<table
|
||||||
|
class="
|
||||||
|
{{ table.options.class ?: 'table' }}
|
||||||
|
{{ table.options.sortable ? 'table--sortable' }}
|
||||||
|
"
|
||||||
|
{{ table.options.sortable ? 'data-sortable' }}
|
||||||
|
{{ html_attributes(table.options.attributes) }}>
|
||||||
|
|
||||||
|
{{ view("streams::table/partials/header", {'table': table}) }}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<tbody>
|
||||||
|
{% for row in table.rows %}
|
||||||
|
<tr id="{{ loop.index }}" class="{{ row.class }}">
|
||||||
|
|
||||||
|
{% if table.options.sortable %}
|
||||||
|
<td>
|
||||||
|
{{ icon('fa fa-arrows handle') }}
|
||||||
|
<input type="hidden" name="{{ row.table.options.prefix }}order[]" value="{{ row.key }}"/>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not table.actions.empty() %}
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" data-toggle="action" name="{{ row.table.options.prefix }}id[]" value="{{ row.key }}"/>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for column in row.columns %}
|
||||||
|
<td data-title="{{ trans(column.heading) }}"
|
||||||
|
class="{{ column.class }}" {{ html_attributes(column.attributes) }}>
|
||||||
|
{{ (column.attributes.html) ? column.attributes.html|raw : column.value|raw }}
|
||||||
|
</td>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<td class="text-lg-right">
|
||||||
|
<nobr>{{ buttons(row.buttons)|raw }}</nobr>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{{ view("streams::table/partials/footer", {'table': table}) }}
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{ form_close() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{% block no_results %}
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-block card-body">
|
||||||
|
{{ trans(table.options.get('no_results_message', 'streams::message.no_results')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var advanced_update_url = "{{ url_route('visiosoft.module.advs::ajax_advanced_update') }}";
|
||||||
|
</script>
|
||||||
@ -26,8 +26,9 @@
|
|||||||
"{{ catText }}"
|
"{{ catText }}"
|
||||||
</h1>
|
</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{{ trans('visiosoft.module.advs::field.search_ad_result_prefix')|lower }}
|
||||||
<span>
|
<span>
|
||||||
{{ advs.total }} {{ trans('visiosoft.module.advs::field.ads')|lower }}
|
{{ advs.total }} {{ trans('visiosoft.module.advs::field.ad')|lower }}
|
||||||
</span>
|
</span>
|
||||||
{{ trans('visiosoft.module.advs::field.were_found') }}
|
{{ trans('visiosoft.module.advs::field.were_found') }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<div class="row text-center list-view-type justify-content-center">
|
<div class="row text-center list-view-type justify-content-center subbreadcrumb">
|
||||||
<div class="col-4 col-md-3">
|
<div class="col-4 col-md-3">
|
||||||
{% if setting_value('visiosoft.module.location::list_page_location') %}
|
{% if setting_value('visiosoft.module.location::list_page_location') %}
|
||||||
<button onclick="changeViewType('{{ url_route('visiosoft.module.advs::view_type', ['map']) }}')"
|
<button onclick="changeViewType('{{ url_route('visiosoft.module.advs::view_type', ['map']) }}')"
|
||||||
@ -15,14 +15,14 @@
|
|||||||
<small class="d-md-none d-lg-inline">{{ trans('visiosoft.module.advs::field.show_list_view.name') }}</small>
|
<small class="d-md-none d-lg-inline">{{ trans('visiosoft.module.advs::field.show_list_view.name') }}</small>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 list-table-view d-none d-md-block">
|
<div class="col-3 col-md-3 list-table-view d-none d-md-block">
|
||||||
<button onclick="changeViewType('{{ url_route('visiosoft.module.advs::view_type', ['table']) }}')"
|
<button onclick="changeViewType('{{ url_route('visiosoft.module.advs::view_type', ['table']) }}')"
|
||||||
class="border-0 text-dark d-flex align-items-center justify-content-center">
|
class="border-0 text-dark d-flex align-items-center justify-content-center">
|
||||||
<img src="{{ img('visiosoft.module.advs::images/table-icon.svg').url }}" alt="table icon" class="mr-1">
|
<img src="{{ img('visiosoft.module.advs::images/table-icon.svg').url }}" alt="table icon" class="mr-1">
|
||||||
<small class="d-md-none d-lg-inline">{{ trans('visiosoft.module.advs::field.show_table_view.name') }}</small>
|
<small class="d-md-none d-lg-inline">{{ trans('visiosoft.module.advs::field.show_table_view.name') }}</small>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-md-3 pr-0">
|
<div class="col-4 col-md-3">
|
||||||
<button onclick="changeViewType('{{ url_route('visiosoft.module.advs::view_type', ['gallery']) }}')"
|
<button onclick="changeViewType('{{ url_route('visiosoft.module.advs::view_type', ['gallery']) }}')"
|
||||||
class="mx-auto border-0 text-dark d-flex align-items-center justify-content-center">
|
class="mx-auto border-0 text-dark d-flex align-items-center justify-content-center">
|
||||||
<img src="{{ img('visiosoft.module.advs::images/gallery-icon.svg').url }}" alt="gallery icon" class="mr-1">
|
<img src="{{ img('visiosoft.module.advs::images/gallery-icon.svg').url }}" alt="gallery icon" class="mr-1">
|
||||||
|
|||||||
@ -55,9 +55,9 @@
|
|||||||
<button class="btn btn-link text-dark d-flex align-items-center"
|
<button class="btn btn-link text-dark d-flex align-items-center"
|
||||||
data-toggle="collapse" data-target="#dateContainer"
|
data-toggle="collapse" data-target="#dateContainer"
|
||||||
aria-expanded="true" aria-controls="dateContainer">
|
aria-expanded="true" aria-controls="dateContainer">
|
||||||
<img src="{{ img('visiosoft.module.advs::images/date-icon.svg').url }}"
|
{# <img src="{{ img('visiosoft.module.advs::images/date-icon.svg').url }}"#}
|
||||||
class="mr-2"
|
{# class="mr-2"#}
|
||||||
alt="date icon">
|
{# alt="date icon">#}
|
||||||
<span>{{ trans("visiosoft.module.advs::field.date.name") }}</span>
|
<span>{{ trans("visiosoft.module.advs::field.date.name") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
@ -113,7 +113,7 @@
|
|||||||
<button class="btn btn-link text-dark" data-toggle="collapse"
|
<button class="btn btn-link text-dark" data-toggle="collapse"
|
||||||
data-target="#mediaContainer"
|
data-target="#mediaContainer"
|
||||||
aria-expanded="true" aria-controls="mediaContainer">
|
aria-expanded="true" aria-controls="mediaContainer">
|
||||||
<i class="fa fa-camera"></i>
|
{# <i class="fa fa-camera"></i>#}
|
||||||
{{ trans("visiosoft.module.advs::field.photo.name") }}
|
{{ trans("visiosoft.module.advs::field.photo.name") }}
|
||||||
, {{ trans("visiosoft.module.advs::field.video.name") }}
|
, {{ trans("visiosoft.module.advs::field.video.name") }}
|
||||||
</button>
|
</button>
|
||||||
@ -159,7 +159,7 @@
|
|||||||
<button class="btn btn-link text-dark" data-toggle="collapse"
|
<button class="btn btn-link text-dark" data-toggle="collapse"
|
||||||
data-target="#mapContainer"
|
data-target="#mapContainer"
|
||||||
aria-expanded="true" aria-controls="mapContainer">
|
aria-expanded="true" aria-controls="mapContainer">
|
||||||
<i class="fa fa-map"></i>
|
{# <i class="fa fa-map"></i>#}
|
||||||
{{ trans("visiosoft.module.advs::field.map.name") }}
|
{{ trans("visiosoft.module.advs::field.map.name") }}
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
@ -187,7 +187,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-primary text-center" id="submitHeading">
|
<div class="card-header bg-primary text-center" id="submitHeading">
|
||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
<button class="btn btn-link text-white w-100">
|
<button class="btn btn-link text-white w-100 searchbut">
|
||||||
<i class="fas fa-search"></i>
|
<i class="fas fa-search"></i>
|
||||||
{{ trans("visiosoft.module.advs::field.search") }}
|
{{ trans("visiosoft.module.advs::field.search") }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
<button class="btn btn-link text-dark d-flex align-items-center" data-toggle="collapse"
|
<button class="btn btn-link text-dark d-flex align-items-center" data-toggle="collapse"
|
||||||
data-target="#price"
|
data-target="#price"
|
||||||
aria-expanded="true" aria-controls="price">
|
aria-expanded="true" aria-controls="price">
|
||||||
<img src="{{ img('visiosoft.module.advs::images/price-icon.svg').url }}" alt="price icon"
|
{# <img src="{{ img('visiosoft.module.advs::images/price-icon.svg').url }}" alt="price icon"#}
|
||||||
class="mr-2">
|
{# class="mr-2">#}
|
||||||
<span>{{ trans("visiosoft.module.advs::field.price.name") }}</span>
|
<span>{{ trans("visiosoft.module.advs::field.price.name") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
|
|||||||
@ -178,11 +178,20 @@
|
|||||||
<div class="row form-group images">
|
<div class="row form-group images">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{{ form.fields.files.input |raw }}
|
{{ form.fields.files.input |raw }}
|
||||||
|
<input name="doc_files" value="{{ form.fields.doc_files.value.pluck('id').all()|join(',') }}" hidden>
|
||||||
|
{% for docs in form.fields.doc_files.value %}
|
||||||
|
<div class="doc_list small">
|
||||||
|
{{ docs.name }}
|
||||||
|
<a id="{{ docs.id }}" href="javascript:void(0)" onclick="deleteDocs({{ docs.id }})" class="text-dark">
|
||||||
|
<i class="fa fa-trash text-danger"></i>
|
||||||
|
</a><br>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if count(custom_fields) %}
|
{% if custom_fields and count(custom_fields) %}
|
||||||
<h5 class="mt-5 pb-1 border-bottom">
|
<h5 class="mt-5 pb-1 border-bottom">
|
||||||
{{ trans('visiosoft.module.advs::field.additional_fields') }}
|
{{ trans('visiosoft.module.advs::field.additional_fields') }}
|
||||||
</h5>
|
</h5>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ addBlock('new-ad/steps/step', {'step': step})|raw }}
|
{{ addBlock('new-ad/steps/step', _context)|raw }}
|
||||||
|
|
||||||
<div class="step col">
|
<div class="step col">
|
||||||
<div class="bullet d-flex align-items-center justify-content-center mx-auto"></div>
|
<div class="bullet d-flex align-items-center justify-content-center mx-auto"></div>
|
||||||
|
|||||||
@ -1,8 +1,29 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule\Adv;
|
<?php namespace Visiosoft\AdvsModule\Adv;
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Entry\EntryCollection;
|
use Anomaly\Streams\Platform\Entry\EntryCollection;
|
||||||
|
use Illuminate\Container\Container;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
use Illuminate\Pagination\Paginator;
|
||||||
|
|
||||||
class AdvCollection extends EntryCollection
|
class AdvCollection extends EntryCollection
|
||||||
{
|
{
|
||||||
|
public function paginate($pageSize = null)
|
||||||
|
{
|
||||||
|
$pageSize = $pageSize ?: setting_value('streams::per_page');
|
||||||
|
$page = Paginator::resolveCurrentPage('page');
|
||||||
|
|
||||||
|
$total = $this->count();
|
||||||
|
|
||||||
|
return self::paginator($this->forPage($page, $pageSize), $total, $pageSize, $page, [
|
||||||
|
'path' => Paginator::resolveCurrentPath(),
|
||||||
|
'pageName' => 'page',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function paginator($items, $total, $perPage, $currentPage, $options)
|
||||||
|
{
|
||||||
|
return Container::getInstance()->makeWith(LengthAwarePaginator::class, compact(
|
||||||
|
'items', 'total', 'perPage', 'currentPage', 'options'
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule\Adv;
|
<?php namespace Visiosoft\AdvsModule\Adv;
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Image\Command\MakeImageInstance;
|
use Anomaly\Streams\Platform\Image\Command\MakeImageInstance;
|
||||||
|
use Anomaly\Streams\Platform\Message\MessageBag;
|
||||||
use Anomaly\Streams\Platform\Model\Advs\AdvsCustomFieldsEntryModel;
|
use Anomaly\Streams\Platform\Model\Advs\AdvsCustomFieldsEntryModel;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use GuzzleHttp\Client;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Visiosoft\AdvsModule\Adv\Contract\AdvInterface;
|
use Visiosoft\AdvsModule\Adv\Contract\AdvInterface;
|
||||||
@ -112,10 +112,9 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
|||||||
public function foreignCurrency($currency, $price, $isUpdate, $settings)
|
public function foreignCurrency($currency, $price, $isUpdate, $settings)
|
||||||
{
|
{
|
||||||
$currencies = setting_value('visiosoft.module.advs::enabled_currencies');
|
$currencies = setting_value('visiosoft.module.advs::enabled_currencies');
|
||||||
|
$messages = app(MessageBag::class);
|
||||||
$foreign_currency = array();
|
$foreign_currency = array();
|
||||||
|
|
||||||
$client = new Client();
|
|
||||||
|
|
||||||
foreach ($currencies as $currencyIn) {
|
foreach ($currencies as $currencyIn) {
|
||||||
if ($currencyIn == $currency) {
|
if ($currencyIn == $currency) {
|
||||||
$foreign_currency[$currency] = (int)$price;
|
$foreign_currency[$currency] = (int)$price;
|
||||||
@ -123,8 +122,14 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
|||||||
try {
|
try {
|
||||||
$url = $currency . "_" . $currencyIn;
|
$url = $currency . "_" . $currencyIn;
|
||||||
$freeCurrencyKey = $settings->value('visiosoft.module.advs::free_currencyconverterapi_key');
|
$freeCurrencyKey = $settings->value('visiosoft.module.advs::free_currencyconverterapi_key');
|
||||||
$response = $client->get('http://free.currencyconverterapi.com/api/v6/convert?q='
|
|
||||||
. $url . '&compact=y&apiKey=' . $freeCurrencyKey);
|
$client = new \GuzzleHttp\Client();
|
||||||
|
$response = $client->request('GET', 'http://free.currencyconverterapi.com/api/v6/convert', ['query' => [
|
||||||
|
'q' => $url,
|
||||||
|
'compact' => 'y',
|
||||||
|
'apiKey' => $freeCurrencyKey
|
||||||
|
]]);
|
||||||
|
|
||||||
if ($response->getStatusCode() == '200') {
|
if ($response->getStatusCode() == '200') {
|
||||||
$response = (array)\GuzzleHttp\json_decode($response->getBody()->getContents());
|
$response = (array)\GuzzleHttp\json_decode($response->getBody()->getContents());
|
||||||
if (!empty($response)) {
|
if (!empty($response)) {
|
||||||
@ -132,8 +137,11 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
|||||||
$foreign_currency[$currencyIn] = $price * $rate;
|
$foreign_currency[$currencyIn] = $price * $rate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\GuzzleHttp\Exception\ClientException $e) {
|
||||||
$this->messages->error((!is_null($e->getMessage())) ? $e->getMessage() : trans('streams::error.500.message'));
|
$response = $e->getResponse();
|
||||||
|
$responseBodyAsString = $response->getBody()->getContents();
|
||||||
|
$response = json_decode($responseBodyAsString, true);
|
||||||
|
$messages->error($response['error']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule\Adv;
|
<?php namespace Visiosoft\AdvsModule\Adv;
|
||||||
|
|
||||||
|
use Visiosoft\AdvsModule\Adv\Command\DeleteOptionConfiguration;
|
||||||
|
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||||
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
||||||
|
|
||||||
class AdvObserver extends EntryObserver
|
class AdvObserver extends EntryObserver
|
||||||
{
|
{
|
||||||
|
public function deleting(EntryInterface $entry)
|
||||||
|
{
|
||||||
|
$this->dispatch(new DeleteOptionConfiguration($entry));
|
||||||
|
|
||||||
|
parent::deleting($entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ use Anomaly\Streams\Platform\Entry\EntryRepository;
|
|||||||
use Visiosoft\CatsModule\Category\CategoryModel;
|
use Visiosoft\CatsModule\Category\CategoryModel;
|
||||||
use Visiosoft\LocationModule\City\CityModel;
|
use Visiosoft\LocationModule\City\CityModel;
|
||||||
use Visiosoft\LocationModule\Country\CountryModel;
|
use Visiosoft\LocationModule\Country\CountryModel;
|
||||||
|
use Visiosoft\LocationModule\District\DistrictModel;
|
||||||
|
|
||||||
class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||||
{
|
{
|
||||||
@ -101,20 +102,26 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
if (!empty($param['user'])) {
|
if (!empty($param['user'])) {
|
||||||
$query = $query->where('advs_advs.created_by_id', $param['user']);
|
$query = $query->where('advs_advs.created_by_id', $param['user']);
|
||||||
}
|
}
|
||||||
|
$currency = setting_value('streams::currency');
|
||||||
|
|
||||||
if (!empty($param['currency'])) {
|
if (!empty($param['currency'])) {
|
||||||
if (!empty($param['min_price'])) {
|
$currency = $param['currency'];
|
||||||
$num = $param['min_price'];
|
|
||||||
$int = (int)$num;
|
|
||||||
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') >=" . $int;
|
|
||||||
$query = $query->whereRaw($column);
|
|
||||||
}
|
|
||||||
if (!empty($param['max_price'])) {
|
|
||||||
$num = $param['max_price'];
|
|
||||||
$int = (int)$num;
|
|
||||||
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
|
|
||||||
$query = $query->whereRaw($column);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($param['min_price'])) {
|
||||||
|
$num = $param['min_price'];
|
||||||
|
$int = (int)$num;
|
||||||
|
$column = "JSON_EXTRACT(foreign_currencies, '$." . $currency . "') >= " . $int;
|
||||||
|
$query = $query->whereRaw($column);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($param['max_price'])) {
|
||||||
|
$num = $param['max_price'];
|
||||||
|
$int = (int)$num;
|
||||||
|
$column = "JSON_EXTRACT(foreign_currencies, '$." . $currency . "') <= " . $int;
|
||||||
|
$query = $query->whereRaw($column);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($param['date'])) {
|
if (!empty($param['date'])) {
|
||||||
if ($param['date'] === 'day') {
|
if ($param['date'] === 'day') {
|
||||||
$query = $query->where('advs_advs.publish_at', '>=', Carbon::now()->subDay());
|
$query = $query->where('advs_advs.publish_at', '>=', Carbon::now()->subDay());
|
||||||
@ -215,12 +222,16 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
{
|
{
|
||||||
$country = CountryModel::query()->where('location_countries.id', $adv->country_id)->first();
|
$country = CountryModel::query()->where('location_countries.id', $adv->country_id)->first();
|
||||||
$city = CityModel::query()->where('location_cities.id', $adv->city)->first();
|
$city = CityModel::query()->where('location_cities.id', $adv->city)->first();
|
||||||
|
$district = DistrictModel::query()->where('location_districts.id', $adv->district)->first();
|
||||||
if ($country != null) {
|
if ($country != null) {
|
||||||
$adv->setAttribute('country_name', $country->name);
|
$adv->setAttribute('country_name', $country->name);
|
||||||
}
|
}
|
||||||
if ($city != null) {
|
if ($city != null) {
|
||||||
$adv->setAttribute('city_name', $city->name);
|
$adv->setAttribute('city_name', $city->name);
|
||||||
}
|
}
|
||||||
|
if ($district != null) {
|
||||||
|
$adv->setAttribute('district_name', $district->name);
|
||||||
|
}
|
||||||
return $adv;
|
return $adv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,14 +471,22 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
return $advs->update(['finish_at' => $newDate]);
|
return $advs->update(['finish_at' => $newDate]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getByUsersIDs($usersIDs)
|
public function getByUsersIDs($usersIDs, $status = 'approved', $withDraft = false)
|
||||||
{
|
{
|
||||||
return $this
|
$ads = $this
|
||||||
->newQuery()
|
->newQuery()
|
||||||
->whereIn('advs_advs.created_by_id', $usersIDs)
|
->whereIn('advs_advs.created_by_id', $usersIDs)
|
||||||
->where('advs_advs.slug', '!=', "")
|
|
||||||
->where('advs_advs.status', 'approved')
|
|
||||||
->where('advs_advs.finish_at', '>', date('Y-m-d H:i:s'));
|
->where('advs_advs.finish_at', '>', date('Y-m-d H:i:s'));
|
||||||
|
|
||||||
|
if ($status) {
|
||||||
|
$ads = $ads->where('advs_advs.status', 'approved');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$withDraft) {
|
||||||
|
$ads = $ads->where('advs_advs.slug', '!=', "");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ads;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPopular()
|
public function getPopular()
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
<?php namespace Visiosoft\AdvsModule\Adv\Command;
|
||||||
|
|
||||||
|
use Visiosoft\AdvsModule\Adv\Contract\AdvInterface;
|
||||||
|
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationRepositoryInterface;
|
||||||
|
|
||||||
|
class DeleteOptionConfiguration
|
||||||
|
{
|
||||||
|
protected $ad;
|
||||||
|
|
||||||
|
public function __construct(AdvInterface $ad)
|
||||||
|
{
|
||||||
|
$this->ad = $ad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handle(OptionConfigurationRepositoryInterface $optionConfigurationRepository)
|
||||||
|
{
|
||||||
|
$optionConfigurationRepository->deleteAdsConfigs($this->ad->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -45,7 +45,7 @@ interface AdvRepositoryInterface extends EntryRepositoryInterface
|
|||||||
|
|
||||||
public function extendAds($allAds, $isAdmin = false);
|
public function extendAds($allAds, $isAdmin = false);
|
||||||
|
|
||||||
public function getByUsersIDs($usersIDs);
|
public function getByUsersIDs($usersIDs, $status = 'approved', $withDraft = false);
|
||||||
|
|
||||||
public function getPopular();
|
public function getPopular();
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,8 @@ class AdvFormBuilder extends FormBuilder
|
|||||||
'class' => 'hidden d-none mapVal'
|
'class' => 'hidden d-none mapVal'
|
||||||
],
|
],
|
||||||
'files',
|
'files',
|
||||||
'popular_adv',
|
'doc_files',
|
||||||
|
'popular_adv',
|
||||||
'adv_day',
|
'adv_day',
|
||||||
'product_options_value'
|
'product_options_value'
|
||||||
];
|
];
|
||||||
|
|||||||
@ -19,6 +19,11 @@ class AdvTableBuilder extends TableBuilder
|
|||||||
'slug' => 'all',
|
'slug' => 'all',
|
||||||
'text' => 'streams::view.all',
|
'text' => 'streams::view.all',
|
||||||
],
|
],
|
||||||
|
'advanced' => [
|
||||||
|
'view' => All::class,
|
||||||
|
'slug' => 'advanced',
|
||||||
|
'text' => 'module::view.advanced',
|
||||||
|
],
|
||||||
'trash',
|
'trash',
|
||||||
'unfinished' => [
|
'unfinished' => [
|
||||||
'view' => unfinished::class
|
'view' => unfinished::class
|
||||||
@ -74,6 +79,7 @@ class AdvTableBuilder extends TableBuilder
|
|||||||
'order_by' => [
|
'order_by' => [
|
||||||
'id' => 'DESC',
|
'id' => 'DESC',
|
||||||
],
|
],
|
||||||
|
'table_view' => 'visiosoft.module.advs::admin/table/table'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,6 +87,10 @@ class AdvTableBuilder extends TableBuilder
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $assets = [];
|
protected $assets = [
|
||||||
|
'scripts.js' => [
|
||||||
|
'visiosoft.module.advs::js/admin/advanced.js'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule\Adv\Table;
|
<?php namespace Visiosoft\AdvsModule\Adv\Table;
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||||
|
use Anomaly\Streams\Platform\Entry\EntryModel;
|
||||||
use Visiosoft\CatsModule\Category\CategoryModel;
|
use Visiosoft\CatsModule\Category\CategoryModel;
|
||||||
|
|
||||||
class AdvTableColumns
|
class AdvTableColumns
|
||||||
@ -8,11 +9,11 @@ class AdvTableColumns
|
|||||||
|
|
||||||
public function handle(AdvTableBuilder $builder)
|
public function handle(AdvTableBuilder $builder)
|
||||||
{
|
{
|
||||||
$builder->setColumns([
|
$columns = [
|
||||||
'cover_photo' => [
|
'cover_photo' => [
|
||||||
'value' => function (EntryInterface $entry) {
|
'value' => function (EntryInterface $entry) {
|
||||||
return "<img width='80px' src='" . $entry->AddAdsDefaultCoverImage($entry)->cover_photo . "' >";
|
return "<img width='80px' src='" . $entry->AddAdsDefaultCoverImage($entry)->cover_photo . "' >";
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
'name' => [
|
'name' => [
|
||||||
@ -59,7 +60,36 @@ class AdvTableColumns
|
|||||||
'created_by' => [
|
'created_by' => [
|
||||||
'value' => 'entry.created_by.name',
|
'value' => 'entry.created_by.name',
|
||||||
],
|
],
|
||||||
]);
|
];
|
||||||
|
|
||||||
|
if ($builder->isActiveView('advanced')) {
|
||||||
|
|
||||||
|
unset($columns['created_by'], $columns['country']);
|
||||||
|
$columns['is_get_adv'] = [
|
||||||
|
'attributes' => [
|
||||||
|
'html' => function (EntryModel $entry) {
|
||||||
|
$checked = ($entry->is_get_adv) ? 'checked' : '';
|
||||||
|
return '<input style="min-width:120px" type="checkbox" class="form-control fast-update" ' . $checked . ' data-column="is_get_adv" data-entry_id="' . $entry->getId() . '">';
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'class' => 'advs-price',
|
||||||
|
];
|
||||||
|
$columns['standard_price'] = [
|
||||||
|
'attributes' => [
|
||||||
|
'html' => function (EntryModel $entry) {
|
||||||
|
return '<input style="min-width:120px" type="number" min="0" class="form-control fast-update" value="' . $entry->standard_price . '" data-column="standard_price" data-entry_id="' . $entry->getId() . '">';
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'class' => 'advs-price',
|
||||||
|
];
|
||||||
|
$columns['price']['attributes'] = [
|
||||||
|
'html' => function (EntryModel $entry) {
|
||||||
|
return '<input style="min-width:120px" type="number" min="0" class="form-control fast-update" value="' . $entry->price . '" data-column="price" data-entry_id="' . $entry->getId() . '">';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$builder->setColumns($columns);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,9 @@ class ConvertCurrency extends ActionHandler
|
|||||||
|
|
||||||
foreach ($selected as $id) {
|
foreach ($selected as $id) {
|
||||||
$entry = $model->newQuery()->find($id);
|
$entry = $model->newQuery()->find($id);
|
||||||
$model->foreignCurrency($entry->currency, $entry->price, $id, $settingRepository);
|
if ($entry) {
|
||||||
|
$model->foreignCurrency($entry->currency, $entry->price, $id, $settingRepository);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($selected) {
|
if ($selected) {
|
||||||
$this->messages->success(trans('visiosoft.module.advs::message.currency_converted'));
|
$this->messages->success(trans('visiosoft.module.advs::message.currency_converted'));
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php namespace Visiosoft\AdvsModule\Adv\Table\Views;
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Ui\Table\Component\View\Query\AllQuery;
|
||||||
|
use Anomaly\Streams\Platform\Ui\Table\Component\View\View;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
|
||||||
|
class Advanced extends View
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $slug = 'advanced';
|
||||||
|
|
||||||
|
protected $text = 'visiosoft.module.advs::view.advanced';
|
||||||
|
|
||||||
|
protected $query = AllQuery::class;
|
||||||
|
|
||||||
|
public function onQuerying(Builder $query)
|
||||||
|
{
|
||||||
|
$query->where('slug', "");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -120,4 +120,22 @@ class AdvsModulePlugin extends Plugin
|
|||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the filters.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getFilters()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
new \Twig_SimpleFilter(
|
||||||
|
'ksort',
|
||||||
|
function (array $array) {
|
||||||
|
ksort($array);
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@assetsClear',
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@assetsClear',
|
||||||
],
|
],
|
||||||
'admin/advs-users/choose/{advId}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@choose',
|
'admin/advs-users/choose/{advId}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@choose',
|
||||||
|
'admin/advs/ajax/advanced/advanced-update' => [
|
||||||
|
'as' => 'visiosoft.module.advs::ajax_advanced_update',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@advancedUpdate',
|
||||||
|
],
|
||||||
'admin/class/actions/{id}/{type}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@actions',
|
'admin/class/actions/{id}/{type}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@actions',
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -204,4 +204,17 @@ class AdvsController extends AdminController
|
|||||||
{
|
{
|
||||||
return Excel::download(new AdvsExport(), 'advs-' . time() . '.xlsx');
|
return Excel::download(new AdvsExport(), 'advs-' . time() . '.xlsx');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function advancedUpdate()
|
||||||
|
{
|
||||||
|
if ($this->request->has('advanced_column') and $this->request->has('advanced_entry_id') and $this->request->has('advanced_value')) {
|
||||||
|
$entry_id = $this->request->get('advanced_entry_id');
|
||||||
|
$column = $this->request->get('advanced_column');
|
||||||
|
$value = $this->request->get('advanced_value');
|
||||||
|
if ($entry = $this->advRepository->find($entry_id)) {
|
||||||
|
$entry->setAttribute($column, $value);
|
||||||
|
$entry->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,29 +1,27 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule\Http\Controller\Admin;
|
<?php namespace Visiosoft\AdvsModule\Http\Controller\Admin;
|
||||||
|
|
||||||
|
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationRepositoryInterface;
|
||||||
use Visiosoft\AdvsModule\OptionConfiguration\Form\OptionConfigurationFormBuilder;
|
use Visiosoft\AdvsModule\OptionConfiguration\Form\OptionConfigurationFormBuilder;
|
||||||
use Visiosoft\AdvsModule\OptionConfiguration\Table\OptionConfigurationTableBuilder;
|
use Visiosoft\AdvsModule\OptionConfiguration\Table\OptionConfigurationTableBuilder;
|
||||||
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
||||||
|
|
||||||
class OptionConfigurationController extends AdminController
|
class OptionConfigurationController extends AdminController
|
||||||
{
|
{
|
||||||
|
public function index(
|
||||||
/**
|
OptionConfigurationTableBuilder $table,
|
||||||
* Display an index of existing entries.
|
OptionConfigurationRepositoryInterface $optionConfigurationRepository
|
||||||
*
|
)
|
||||||
* @param OptionConfigurationTableBuilder $table
|
|
||||||
* @return \Symfony\Component\HttpFoundation\Response
|
|
||||||
*/
|
|
||||||
public function index(OptionConfigurationTableBuilder $table)
|
|
||||||
{
|
{
|
||||||
|
// Remove deleted ad's configuration
|
||||||
|
$unusedConfigs = $optionConfigurationRepository->getUnusedConfigs();
|
||||||
|
|
||||||
|
if (count($unusedConfigs)) {
|
||||||
|
$optionConfigurationRepository->deleteUnusedConfigs($unusedConfigs);
|
||||||
|
}
|
||||||
|
|
||||||
return $table->render();
|
return $table->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new entry.
|
|
||||||
*
|
|
||||||
* @param OptionConfigurationFormBuilder $form
|
|
||||||
* @return \Symfony\Component\HttpFoundation\Response
|
|
||||||
*/
|
|
||||||
public function create(OptionConfigurationFormBuilder $form)
|
public function create(OptionConfigurationFormBuilder $form)
|
||||||
{
|
{
|
||||||
$form->setOption('redirect', route('visiosoft.module.advs::configrations.index'));
|
$form->setOption('redirect', route('visiosoft.module.advs::configrations.index'));
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule\Http\Controller;
|
<?php namespace Visiosoft\AdvsModule\Http\Controller;
|
||||||
|
|
||||||
|
use Anomaly\FilesModule\File\Contract\FileRepositoryInterface;
|
||||||
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
||||||
use Anomaly\Streams\Platform\Http\Controller\PublicController;
|
use Anomaly\Streams\Platform\Http\Controller\PublicController;
|
||||||
use Anomaly\Streams\Platform\Message\MessageBag;
|
use Anomaly\Streams\Platform\Message\MessageBag;
|
||||||
@ -521,6 +522,7 @@ class AdvsController extends PublicController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$features = null;
|
||||||
if ($this->adv_model->is_enabled('customfields')) {
|
if ($this->adv_model->is_enabled('customfields')) {
|
||||||
$features = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->view($adv);
|
$features = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->view($adv);
|
||||||
}
|
}
|
||||||
@ -780,7 +782,8 @@ class AdvsController extends PublicController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$adv->is_get_adv = $request->is_get_adv;
|
$get_categories = in_array($adv->cat1, setting_value('visiosoft.module.advs::get_categories'));
|
||||||
|
$adv->is_get_adv = ($request->is_get_adv and $get_categories) ? true : false;
|
||||||
$adv->save();
|
$adv->save();
|
||||||
|
|
||||||
//algolia Search Module
|
//algolia Search Module
|
||||||
@ -980,9 +983,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 +1270,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']);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -7,4 +7,10 @@ interface OptionConfigurationRepositoryInterface extends EntryRepositoryInterfac
|
|||||||
public function createConfigration($ad_id,$price,$currency,$stock,$option_json);
|
public function createConfigration($ad_id,$price,$currency,$stock,$option_json);
|
||||||
|
|
||||||
public function getConf($ad_id);
|
public function getConf($ad_id);
|
||||||
|
|
||||||
|
public function getUnusedConfigs();
|
||||||
|
|
||||||
|
public function deleteUnusedConfigs($adsIDs);
|
||||||
|
|
||||||
|
public function deleteAdsConfigs($adID);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,4 +70,24 @@ class OptionConfigurationRepository extends EntryRepository implements OptionCon
|
|||||||
|
|
||||||
return $configurations;
|
return $configurations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUnusedConfigs()
|
||||||
|
{
|
||||||
|
return $this->newQuery()
|
||||||
|
->leftJoin('advs_advs as ads', 'advs_option_configuration.parent_adv_id', 'ads.id')
|
||||||
|
->whereNull('ads.id')
|
||||||
|
->orWhereNotNull('deleted_at')
|
||||||
|
->pluck('parent_adv_id')
|
||||||
|
->all();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteUnusedConfigs($adsIDs)
|
||||||
|
{
|
||||||
|
return $this->newQuery()->whereIn('parent_adv_id', $adsIDs)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteAdsConfigs($adID)
|
||||||
|
{
|
||||||
|
return $this->newQuery()->where('parent_adv_id', $adID)->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
<button class="btn btn-link text-dark d-flex align-items-center" data-toggle="collapse"
|
<button class="btn btn-link text-dark d-flex align-items-center" data-toggle="collapse"
|
||||||
data-target="#location" aria-expanded="true" aria-controls="location">
|
data-target="#location" aria-expanded="true" aria-controls="location">
|
||||||
<img src="{{ img('visiosoft.module.location::images/location-icon.svg').url }}" class="mr-2"
|
{# <img src="{{ img('visiosoft.module.location::images/location-icon.svg').url }}" class="mr-2"#}
|
||||||
alt="location icon">
|
{# alt="location icon">#}
|
||||||
<span>{{ trans("visiosoft.module.location::addon.title") }}</span>
|
<span>{{ trans("visiosoft.module.location::addon.title") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
|
|||||||
@ -3,6 +3,7 @@ Dropzone.autoDiscover = false;
|
|||||||
$("div#myDrop").dropzone({url: "/file/post"});
|
$("div#myDrop").dropzone({url: "/file/post"});
|
||||||
|
|
||||||
var uploaded = $('input[name="files"]').val().split(',').map(Number);
|
var uploaded = $('input[name="files"]').val().split(',').map(Number);
|
||||||
|
var docsUploaded = $('input[name="doc_files"]').val().split(',').map(Number);
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
@ -16,12 +17,13 @@ $(function () {
|
|||||||
var dropzone = new Dropzone('.dropzone:not(data-initialized)',
|
var dropzone = new Dropzone('.dropzone:not(data-initialized)',
|
||||||
{
|
{
|
||||||
paramName: 'upload',
|
paramName: 'upload',
|
||||||
|
maxFiles: imageCount,
|
||||||
resizeWidth: settings_image['resize_width'],
|
resizeWidth: settings_image['resize_width'],
|
||||||
resizeHeight: settings_image['resize_height'],
|
resizeHeight: settings_image['resize_height'],
|
||||||
autoProcessQueue: true,
|
autoProcessQueue: true,
|
||||||
parallelUploads: 1,
|
parallelUploads: 1,
|
||||||
resizeMethod: 'contain',
|
resizeMethod: 'contain',
|
||||||
resizeQuality: 0.8,
|
resizeQuality: 0.9,
|
||||||
url: REQUEST_ROOT_PATH + '/streams/media-field_type/handle',
|
url: REQUEST_ROOT_PATH + '/streams/media-field_type/handle',
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRF-TOKEN': CSRF_TOKEN
|
'X-CSRF-TOKEN': CSRF_TOKEN
|
||||||
@ -33,8 +35,7 @@ $(function () {
|
|||||||
formData.append('folder', element.data('folder'));
|
formData.append('folder', element.data('folder'));
|
||||||
},
|
},
|
||||||
renameFile: function (file) {
|
renameFile: function (file) {
|
||||||
let newName = new Date().getTime() + '_' + file.name;
|
return new Date().getTime() + '_' + file.name.replace(/ /g, '_');
|
||||||
return newName;
|
|
||||||
},
|
},
|
||||||
accept: function (file, done) {
|
accept: function (file, done) {
|
||||||
$.get(REQUEST_ROOT_PATH + '/streams/media-field_type/exists/' + element.data('folder'), {'file': file.name}, function (data) {
|
$.get(REQUEST_ROOT_PATH + '/streams/media-field_type/exists/' + element.data('folder'), {'file': file.name}, function (data) {
|
||||||
@ -67,23 +68,28 @@ $(function () {
|
|||||||
dropzone.on('success', function (file) {
|
dropzone.on('success', function (file) {
|
||||||
|
|
||||||
var response = JSON.parse(file.xhr.response);
|
var response = JSON.parse(file.xhr.response);
|
||||||
|
var mimeType = response.mime_type.split('/')
|
||||||
|
if (mimeType[0] === 'image'){
|
||||||
|
uploaded.push(response.id);
|
||||||
|
|
||||||
uploaded.push(response.id);
|
$('.media-selected-wrapper').load(
|
||||||
|
REQUEST_ROOT_PATH + '/streams/media-field_type/selected?uploaded=' + uploaded.join(','),
|
||||||
|
function () {
|
||||||
|
$('input[name="files"]').val(uploaded.join(','))
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
$('.media-selected-wrapper').load(
|
file.previewElement.querySelector('[data-dz-uploadprogress]').setAttribute('class', 'progress progress-success');
|
||||||
REQUEST_ROOT_PATH + '/streams/media-field_type/selected?uploaded=' + uploaded.join(','),
|
|
||||||
function () {
|
|
||||||
$('input[name="files"]').val(uploaded.join(','))
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
file.previewElement.querySelector('[data-dz-uploadprogress]').setAttribute('class', 'progress progress-success');
|
setTimeout(function () {
|
||||||
|
|
||||||
setTimeout(function () {
|
addAppendByData(uploaded[0])
|
||||||
|
file.previewElement.remove();
|
||||||
addAppendByData(uploaded[0])
|
}, 500);
|
||||||
file.previewElement.remove();
|
} else {
|
||||||
}, 500);
|
docsUploaded.push(response.id);
|
||||||
|
$('input[name="doc_files"]').val(docsUploaded.join(','))
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// When file fails to upload.
|
// When file fails to upload.
|
||||||
@ -109,6 +115,13 @@ function deleteImage(e, id) {
|
|||||||
$('.imageList').find('div[data-id="' + id + '"]').remove()
|
$('.imageList').find('div[data-id="' + id + '"]').remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deleteDocs(id) {
|
||||||
|
var key_item = $.inArray(id, docsUploaded);
|
||||||
|
docsUploaded.splice(key_item, 1);
|
||||||
|
$('input[name="doc_files"]').val(docsUploaded.join(','))
|
||||||
|
$('.doc_list').find('#' + id).remove()
|
||||||
|
}
|
||||||
|
|
||||||
function rotateImage(e, id) {
|
function rotateImage(e, id) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
@ -150,4 +163,4 @@ function updateQueryStringParameter(uri, key, value) {
|
|||||||
} else {
|
} else {
|
||||||
return uri + separator + key + "=" + value;
|
return uri + separator + key + "=" + value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
var imageCount = {{ field_type.value|length < setting_value('visiosoft.module.advs::ads_image_limit')
|
||||||
|
? setting_value('visiosoft.module.advs::ads_image_limit') - field_type.value|length
|
||||||
|
: 0 }}
|
||||||
|
|
||||||
var settings_image = {
|
var settings_image = {
|
||||||
'resize_width':"{{ setting_value('visiosoft.module.advs::full_image_width') }}",
|
'resize_width':"{{ setting_value('visiosoft.module.advs::full_image_width') }}",
|
||||||
'resize_height':"{{ setting_value('visiosoft.module.advs::full_image_height') }}"
|
'resize_height':"{{ setting_value('visiosoft.module.advs::full_image_height') }}"
|
||||||
|
|||||||
@ -50,94 +50,104 @@ class UploadController extends AdminController
|
|||||||
|
|
||||||
public function upload()
|
public function upload()
|
||||||
{
|
{
|
||||||
$file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($this->request->get('folder')));
|
$doc_folder = app(FolderRepositoryInterface::class)->findBySlug('ads_documents')->id;
|
||||||
|
$mimes = explode('/', $this->request->file('upload')->getMimeType());
|
||||||
|
|
||||||
|
if ($mimes[0] == 'image'){
|
||||||
|
$file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($this->request->get('folder')));
|
||||||
|
} else {
|
||||||
|
$file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($doc_folder));
|
||||||
|
}
|
||||||
|
|
||||||
if ($file) {
|
if ($file) {
|
||||||
|
if ($mimes[0] == 'image'){
|
||||||
|
|
||||||
$settings_key = [
|
$settings_key = [
|
||||||
'image_resize_backend',
|
'image_resize_backend',
|
||||||
'full_image_width',
|
'full_image_width',
|
||||||
'full_image_height',
|
'full_image_height',
|
||||||
'medium_image_width',
|
'medium_image_width',
|
||||||
'medium_image_height',
|
'medium_image_height',
|
||||||
'thumbnail_width',
|
'thumbnail_width',
|
||||||
'thumbnail_height',
|
'thumbnail_height',
|
||||||
'add_canvas',
|
'add_canvas',
|
||||||
'image_canvas_width',
|
'image_canvas_width',
|
||||||
'image_canvas_height',
|
'image_canvas_height',
|
||||||
'watermark_type',
|
'watermark_type',
|
||||||
'watermark_text',
|
'watermark_text',
|
||||||
'watermark_image',
|
'watermark_image',
|
||||||
'watermark_position'
|
'watermark_position'
|
||||||
];
|
];
|
||||||
|
|
||||||
$settings_value = array();
|
$settings_value = array();
|
||||||
|
|
||||||
foreach ($settings_key as $key) {
|
foreach ($settings_key as $key) {
|
||||||
$settings_value[$key] = setting_value('visiosoft.module.advs::' . $key);
|
$settings_value[$key] = setting_value('visiosoft.module.advs::' . $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$fullImg = WaterMark::make($this->request->file('upload')->getRealPath());
|
$fullImg = WaterMark::make($this->request->file('upload')->getRealPath());
|
||||||
|
|
||||||
if ($settings_value['image_resize_backend']) {
|
if ($settings_value['image_resize_backend']) {
|
||||||
$fullImg = $fullImg->resize(null, $settings_value['full_image_height'],
|
$fullImg = $fullImg->resize(null, $settings_value['full_image_height'],
|
||||||
function ($constraint) {
|
function ($constraint) {
|
||||||
$constraint->aspectRatio();
|
$constraint->aspectRatio();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$mdImg = WaterMark::make($this->request->file('upload')->getRealPath())
|
$mdImg = WaterMark::make($this->request->file('upload')->getRealPath())
|
||||||
->resize(null, $settings_value['medium_image_height'], function ($constraint) {
|
->resize(null, $settings_value['medium_image_height'], function ($constraint) {
|
||||||
$constraint->aspectRatio();
|
$constraint->aspectRatio();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if ($settings_value['add_canvas']) {
|
if ($settings_value['add_canvas']) {
|
||||||
|
|
||||||
$fullImg->resizeCanvas(
|
$fullImg->resizeCanvas(
|
||||||
$settings_value['image_canvas_width'], $settings_value['image_canvas_height'],
|
$settings_value['image_canvas_width'], $settings_value['image_canvas_height'],
|
||||||
'center', false, 'fff'
|
'center', false, 'fff'
|
||||||
);
|
);
|
||||||
|
|
||||||
$mdImg->resizeCanvas(
|
$mdImg->resizeCanvas(
|
||||||
$settings_value['medium_image_width'], $settings_value['medium_image_height'],
|
$settings_value['medium_image_width'], $settings_value['medium_image_height'],
|
||||||
'center', false, 'fff'
|
'center', false, 'fff'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$image_types = array('full' => $fullImg, 'medium' => $mdImg);
|
$image_types = array('full' => $fullImg, 'medium' => $mdImg);
|
||||||
|
|
||||||
foreach ($image_types as $key => $image) {
|
foreach ($image_types as $key => $image) {
|
||||||
|
|
||||||
if ($settings_value['watermark_type'] == 'image') {
|
if ($settings_value['watermark_type'] == 'image') {
|
||||||
|
|
||||||
if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
|
if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
|
||||||
$watermark = WaterMark::make(app_storage_path() . '/files-module/local/' . $watermarkimage->path());
|
$watermark = WaterMark::make(app_storage_path() . '/files-module/local/' . $watermarkimage->path());
|
||||||
$image->insert($watermark, $settings_value['watermark_position']);
|
$image->insert($watermark, $settings_value['watermark_position']);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$v = "top";
|
$v = "top";
|
||||||
$h = "center";
|
$h = "center";
|
||||||
$w = $image->width() / 2;
|
$w = $image->width() / 2;
|
||||||
$h1 = $image->height() / 2;
|
$h1 = $image->height() / 2;
|
||||||
$font_size = $w / 20;
|
$font_size = $w / 20;
|
||||||
$image->text($settings_value['watermark_text'], $w, $h1, function ($font) use ($v, $h, $font_size) {
|
$image->text($settings_value['watermark_text'], $w, $h1, function ($font) use ($v, $h, $font_size) {
|
||||||
$font->file(public_path('Antonio-Bold.ttf'));
|
$font->file(public_path('Antonio-Bold.ttf'));
|
||||||
$font->size($font_size);
|
$font->size($font_size);
|
||||||
$font->align($h);
|
$font->align($h);
|
||||||
$font->valign($v);
|
$font->valign($v);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ($key === "full") {
|
if ($key === "full") {
|
||||||
$fileName = $file->getAttributes()['name'];
|
$fileName = $file->getAttributes()['name'];
|
||||||
} else {
|
} else {
|
||||||
$fileName = 'md-' . $file->getAttributes()['name'];
|
$fileName = 'md-' . $file->getAttributes()['name'];
|
||||||
|
|
||||||
$this->createFile($this->request->get('folder'),$fileName,$image);
|
$this->createFile($this->request->get('folder'),$fileName,$image);
|
||||||
}
|
}
|
||||||
$image->save(app_storage_path() . '/files-module/local/images/' . $fileName);
|
$image->save(app_storage_path() . '/files-module/local/images/' . $fileName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $this->response->json($file->getAttributes());
|
return $this->response->json($file->getAttributes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,15 +183,15 @@ class UploadController extends AdminController
|
|||||||
return response()->json(['status' => 'error']);
|
return response()->json(['status' => 'error']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createFile($folder, $filename, $image)
|
public function createFile($folder, $filename, $image = null)
|
||||||
{
|
{
|
||||||
$this->files->create([
|
$this->files->create([
|
||||||
'folder_id' => $folder,
|
'folder_id' => $folder,
|
||||||
'name' => $filename,
|
'name' => $filename,
|
||||||
'disk_id' => 1,
|
'disk_id' => 1,
|
||||||
'size' => $image->filesize(),
|
'size' => $image->filesize(),
|
||||||
'mime_type' => $image->mime,
|
'mime_type' => $image->mime,
|
||||||
'extension' => $image->extension,
|
'extension' => $image->extension,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ return [
|
|||||||
'show_checkbox_terms_on_register',
|
'show_checkbox_terms_on_register',
|
||||||
'register_protection_url',
|
'register_protection_url',
|
||||||
'register_privacy_url',
|
'register_privacy_url',
|
||||||
|
'hide_register_type_profile',
|
||||||
'show_education_profession',
|
'show_education_profession',
|
||||||
'education',
|
'education',
|
||||||
'state_of_education',
|
'state_of_education',
|
||||||
|
|||||||
@ -60,6 +60,13 @@ return [
|
|||||||
'mode' => 'checkbox'
|
'mode' => 'checkbox'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'hide_register_type_profile' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'config' => [
|
||||||
|
'default_value' => false,
|
||||||
|
'mode' => 'checkbox'
|
||||||
|
]
|
||||||
|
],
|
||||||
"education" => "anomaly.field_type.tags",
|
"education" => "anomaly.field_type.tags",
|
||||||
"state_of_education" => "anomaly.field_type.tags",
|
"state_of_education" => "anomaly.field_type.tags",
|
||||||
"profession" => "anomaly.field_type.tags",
|
"profession" => "anomaly.field_type.tags",
|
||||||
|
|||||||
@ -1,2 +1,9 @@
|
|||||||
<?xml version="1.0"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="512px" height="512px"><g><g id="Address"><path d="M13,10H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V11A1,1,0,0,0,13,10Zm-1,4H10V12h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M17,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H17a1,1,0,0,0-1,1v4A1,1,0,0,0,17,16Zm1-4h2v2H18Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M25,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H25a1,1,0,0,0-1,1v4A1,1,0,0,0,25,16Zm1-4h2v2H26Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M33,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H33a1,1,0,0,0-1,1v4A1,1,0,0,0,33,16Zm1-4h2v2H34Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M41,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H41a1,1,0,0,0-1,1v4A1,1,0,0,0,41,16Zm1-4h2v2H42Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,18H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V19A1,1,0,0,0,13,18Zm-1,4H10V20h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,26H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V27A1,1,0,0,0,13,26Zm-1,4H10V28h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,34H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V35A1,1,0,0,0,13,34Zm-1,4H10V36h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,42H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V43A1,1,0,0,0,13,42Zm-1,4H10V44h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M17,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H17a1,1,0,0,0-1,1v4A1,1,0,0,0,17,24Zm1-4h2v2H18Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M25,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H25a1,1,0,0,0-1,1v4A1,1,0,0,0,25,24Zm1-4h2v2H26Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M33,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H33a1,1,0,0,0-1,1v4A1,1,0,0,0,33,24Zm1-4h2v2H34Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M41,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H41a1,1,0,0,0-1,1v4A1,1,0,0,0,41,24Zm1-4h2v2H42Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M50,28.051V8h1a1,1,0,0,0,1-1V3a1,1,0,0,0-1-1H3A1,1,0,0,0,2,3V7A1,1,0,0,0,3,8H4V53a1,1,0,0,0,1,1H41.751a72.309,72.309,0,0,0,6.542,7.707,1,1,0,0,0,1.414,0C50.209,61.205,62,49.318,62,41A13.008,13.008,0,0,0,50,28.051ZM4,4H50V6H4ZM6,8H48V28.051A13.008,13.008,0,0,0,36,41a11.625,11.625,0,0,0,.441,3H36V27a1,1,0,0,0-1-1H19a1,1,0,0,0-1,1V44H17a1,1,0,0,0-1,1v3a1,1,0,0,0-1,1v3H6ZM34,44H32V31a1,1,0,0,0-1-1H23a1,1,0,0,0-1,1V44H20V28H34Zm-4,0H24V32h6Zm7.109,2c.265.665.572,1.333.906,2H18V46ZM17,52V50H39.1c.4.677.817,1.346,1.251,2Zm32,7.558C46.466,56.869,38,47.4,38,41a11,11,0,0,1,22,0C60,47.4,51.534,56.869,49,59.558Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M49,32a9,9,0,1,0,9,9A9.011,9.011,0,0,0,49,32Zm0,16a7,7,0,1,1,7-7A7.008,7.008,0,0,1,49,48Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/></g></g> </svg>
|
<g id="address" transform="translate(-551 -13941)">
|
||||||
|
<rect id="Rectangle_2604" data-name="Rectangle 2604" width="22" height="22" transform="translate(551 13941)" fill="#fff" opacity="0"/>
|
||||||
|
<g id="Group_3507" data-name="Group 3507" transform="translate(69.891 90.662)">
|
||||||
|
<path id="address_1_" data-name="address (1)" d="M7.688,17.24v1.95l-.471-.381a31.6,31.6,0,0,1-3.563-3.484C1.229,12.542,0,10.044,0,7.9V7.687a7.688,7.688,0,0,1,15.376,0V7.9c0,.18-.01.363-.027.548l-1.5-1.372A6.188,6.188,0,0,0,1.5,7.687V7.9c0,3.623,4.668,8.009,6.188,9.341Zm0-12.741A3.188,3.188,0,1,1,4.5,7.687,3.191,3.191,0,0,1,7.688,4.5Zm0,1.5A1.688,1.688,0,1,0,9.376,7.687,1.69,1.69,0,0,0,7.688,6Z" transform="translate(483 13852.001)" fill="#505050"/>
|
||||||
|
<path id="address_2_" data-name="address (2)" d="M53.095,54.693a.756.756,0,0,1-1.068.048l-.095-.087v2.5a2.132,2.132,0,0,1-2.129,2.13H45.554a2.132,2.132,0,0,1-2.129-2.13V54.689l-.057.052a.756.756,0,1,1-1.02-1.116l3.9-3.568a2.133,2.133,0,0,1,2.893,0l2.5,2.286a.757.757,0,0,1,.078.071l1.324,1.211a.756.756,0,0,1,.048,1.068Zm-2.675-1.421-2.3-2.1a.628.628,0,0,0-.852,0l-2.334,2.133v3.85a.618.618,0,0,0,.617.618H49.8a.618.618,0,0,0,.616-.618Zm0,0" transform="translate(448.87 13812.108)" fill="#505050"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -1,2 +1,12 @@
|
|||||||
<?xml version="1.0"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="512px" viewBox="0 0 512 512" width="512px"><g><path d="m512 256c0-141.488281-114.496094-256-256-256-141.488281 0-256 114.496094-256 256 0 140.234375 113.539062 256 256 256 141.875 0 256-115.121094 256-256zm-256-226c124.617188 0 226 101.382812 226 226 0 45.585938-13.558594 89.402344-38.703125 126.515625-100.96875-108.609375-273.441406-108.804687-374.59375 0-25.144531-37.113281-38.703125-80.929687-38.703125-126.515625 0-124.617188 101.382812-226 226-226zm-168.585938 376.5c89.773438-100.695312 247.421876-100.671875 337.167969 0-90.074219 100.773438-247.054687 100.804688-337.167969 0zm0 0" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m256 271c49.625 0 90-40.375 90-90v-30c0-49.625-40.375-90-90-90s-90 40.375-90 90v30c0 49.625 40.375 90 90 90zm-60-120c0-33.085938 26.914062-60 60-60s60 26.914062 60 60v30c0 33.085938-26.914062 60-60 60s-60-26.914062-60-60zm0 0" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/></g> </svg>
|
<g id="profile" transform="translate(-551 -13874)">
|
||||||
|
<g id="Group_3523" data-name="Group 3523">
|
||||||
|
<rect id="Rectangle_2607" data-name="Rectangle 2607" width="22" height="22" transform="translate(551 13874)" fill="#fff" opacity="0"/>
|
||||||
|
<g id="social" transform="translate(552.5 13875.662)">
|
||||||
|
<g id="Group_2839" data-name="Group 2839" transform="translate(0)">
|
||||||
|
<path id="Path_4053" data-name="Path 4053" d="M19.346,16.619a.758.758,0,0,0-1.483.309.792.792,0,0,1-.16.664.77.77,0,0,1-.606.288H2.3a.77.77,0,0,1-.606-.288.791.791,0,0,1-.16-.664A8.371,8.371,0,0,1,9.5,10.3q.1,0,.2,0t.2,0A8.334,8.334,0,0,1,16.63,14a.758.758,0,1,0,1.259-.844,9.855,9.855,0,0,0-5.106-3.88,5.152,5.152,0,1,0-6.167,0A9.854,9.854,0,0,0,.05,16.619,2.3,2.3,0,0,0,2.3,19.395H17.1a2.3,2.3,0,0,0,2.25-2.776ZM6.061,5.152A3.637,3.637,0,1,1,9.882,8.784l-.184,0-.183,0A3.641,3.641,0,0,1,6.061,5.152Z" transform="translate(0)" fill="#505050"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
@ -1,2 +1,14 @@
|
|||||||
<?xml version="1.0"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="512px" viewBox="0 0 512 512" width="512px"><g><g id="Outline"><path d="m56 208a24.027 24.027 0 0 1 24-24h88v-16h-88a40.045 40.045 0 0 0 -40 40v48h16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m244 88a28 28 0 1 0 28 28 28.032 28.032 0 0 0 -28-28zm0 40a12 12 0 1 1 12-12 12.013 12.013 0 0 1 -12 12z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m488 16h-169.353a48.246 48.246 0 0 0 -41.16 23.305l-10.017 16.695h-59.47a24.028 24.028 0 0 0 -24 24v144a24.027 24.027 0 0 0 24 24h48v32a8 8 0 0 0 13.121 6.146l45.779-38.146h109.1a24.027 24.027 0 0 0 24-24v-113.554a85.486 85.486 0 0 0 44.533-23.665l1.124-1.124a8 8 0 0 0 2.343-5.657v-56a8 8 0 0 0 -8-8zm-56 208a8.009 8.009 0 0 1 -8 8h-112a8 8 0 0 0 -5.121 1.854l-34.879 29.065v-22.919a8 8 0 0 0 -8-8h-56a8.009 8.009 0 0 1 -8-8v-11.471l71.774-43.064 67.788 45.191a8 8 0 0 0 8.016.5l43.847-21.924 40.575 27.049zm0-22.948-35.562-23.708a8 8 0 0 0 -8.016-.5l-43.847 21.924-68.137-45.425a8 8 0 0 0 -8.554-.2l-67.884 40.727v-113.87a8.009 8.009 0 0 1 8-8h124.687l-26.2 26.2a27.8 27.8 0 0 0 39.313 39.315l39.227-39.228a85.82 85.82 0 0 0 46.621 13.713c.118 0 .234-.008.352-.009zm48-124.394a70.106 70.106 0 0 1 -87.239 7.568l-4.323-2.882a8 8 0 0 0 -10.095 1l-43.857 43.856a11.858 11.858 0 0 1 -15.424 1.1 11.8 11.8 0 0 1 -1.262-17.782l39.857-39.858 16-16-11.314-11.317-13.657 13.657h-62.556l5.077-8.463a32.164 32.164 0 0 1 27.44-15.537h161.353z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m472 272h-144a24.028 24.028 0 0 0 -24 24v44.686l-29.657 29.657a8 8 0 0 0 5.657 13.657h24v8a24.028 24.028 0 0 0 24 24h144a24.028 24.028 0 0 0 24-24v-96a24.028 24.028 0 0 0 -24-24zm8 120a8.009 8.009 0 0 1 -8 8h-144a8.009 8.009 0 0 1 -8-8v-16a8 8 0 0 0 -8-8h-12.687l18.344-18.343a8 8 0 0 0 2.343-5.657v-48a8.009 8.009 0 0 1 8-8h144a8.009 8.009 0 0 1 8 8z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m336 304h80v16h-80z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m432 304h32v16h-32z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m336 368h128v16h-128z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m336 336h128v16h-128z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m72 200h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m104 200h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m136 200h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m72 232h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m40 416h144a24.028 24.028 0 0 0 24-24v-32h24a8 8 0 0 0 5.657-13.657l-29.657-29.657v-20.686a24.028 24.028 0 0 0 -24-24h-144a24.028 24.028 0 0 0 -24 24v96a24.028 24.028 0 0 0 24 24zm-8-120a8.009 8.009 0 0 1 8-8h144a8.009 8.009 0 0 1 8 8v24a8 8 0 0 0 2.343 5.657l18.344 18.343h-12.687a8 8 0 0 0 -8 8v40a8.009 8.009 0 0 1 -8 8h-144a8.009 8.009 0 0 1 -8-8z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m48 304h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m48 336h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m48 368h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m80 304h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m80 336h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m80 368h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m424 432h-140.687a35.08 35.08 0 0 0 -24.97 10.343 19.185 19.185 0 0 1 -13.656 5.657h-41.374a19.185 19.185 0 0 1 -13.656-5.657 35.08 35.08 0 0 0 -24.97-10.343h-140.687a8 8 0 0 0 -8 8v24a32.036 32.036 0 0 0 32 32h352a32.036 32.036 0 0 0 32-32v-24a8 8 0 0 0 -8-8zm-8 32a16.019 16.019 0 0 1 -16 16h-352a16.019 16.019 0 0 1 -16-16v-16h132.687a19.185 19.185 0 0 1 13.656 5.657 35.08 35.08 0 0 0 24.97 10.343h41.374a35.08 35.08 0 0 0 24.97-10.343 19.185 19.185 0 0 1 13.656-5.657h132.687z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/></g></g> </svg>
|
<g id="ads" transform="translate(-551 -13906)">
|
||||||
|
<rect id="Rectangle_2615" data-name="Rectangle 2615" width="22" height="22" transform="translate(551 13906)" fill="#fff" opacity="0"/>
|
||||||
|
<g id="XMLID_1531_" transform="translate(551.73 13904.936)">
|
||||||
|
<g id="XMLID_49_" transform="translate(0 2.383)">
|
||||||
|
<path id="XMLID_317_" d="M14.385,84.833a.425.425,0,0,0-.737.425l1.74,3.014a.6.6,0,0,1-1.031.6L9.083,79.734a.6.6,0,0,1,1.031-.6l1.62,2.805a.425.425,0,0,0,.737-.425l-1.62-2.805a1.446,1.446,0,0,0-2.677.971L2.811,86.2,1.4,87.016a2.807,2.807,0,0,0,.677,5.142,2.822,2.822,0,0,0,.731.1,2.771,2.771,0,0,0,.524-.05L7.1,96a1.515,1.515,0,1,0,2.152-2.133l-.607-.613.417-.241a1.268,1.268,0,0,0,.267-1.991l-.488-.492,5.107-.849a1.446,1.446,0,0,0,2.179-1.833ZM1.113,90.424a1.958,1.958,0,0,1,.716-2.672l1.1-.638L4.891,90.5l-1.105.638a1.958,1.958,0,0,1-2.672-.716Zm7.718,4.6A.665.665,0,0,1,7.7,95.4L4.21,91.877,5.4,91.19l3.245,3.274A.66.66,0,0,1,8.832,95.021Zm-.11-3.4a.418.418,0,0,1-.088.656l-.61.352L6.352,90.943,7.81,90.7ZM5.692,90.19,3.606,86.576l4.963-6.033,4.83,8.365Z" transform="translate(0 -76.99)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||||
|
<path id="XMLID_321_" d="M.2,2.571a.425.425,0,0,0,.588-.128L2.306.655A.425.425,0,0,0,1.591.2L.068,1.983A.425.425,0,0,0,.2,2.571Z" transform="translate(12.502 0.371) rotate(-9)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||||
|
<path id="XMLID_322_" d="M384.809,238.193h-3.4a.427.427,0,0,0,0,.851h3.4a.427.427,0,0,0,0-.851Z" transform="translate(-364.816 -230.38)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||||
|
<path id="XMLID_326_" d="M297.524,195.768a.425.425,0,1,0-.3-.125A.428.428,0,0,0,297.524,195.768Z" transform="translate(-284.465 -188.944)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||||
|
<path id="XMLID_321_2" data-name="XMLID_321_" d="M.2,3.31a.425.425,0,0,0,.588-.128L2.465.655A.425.425,0,0,0,1.75.2L.068,2.722A.425.425,0,0,0,.2,3.31Z" transform="translate(16.425 2.187) rotate(30)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.1 KiB |
@ -43,4 +43,8 @@ return [
|
|||||||
'profession' => [
|
'profession' => [
|
||||||
'name' => 'Profession'
|
'name' => 'Profession'
|
||||||
],
|
],
|
||||||
|
'hide_register_type_profile' => [
|
||||||
|
'name' => 'Hide Register Type in Profile Page',
|
||||||
|
'instructions' => 'Hides the register type field in the profile edit page.',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -92,7 +92,7 @@
|
|||||||
<p class="mb-0 mr-4">
|
<p class="mb-0 mr-4">
|
||||||
{{ trans('visiosoft.module.profile::message.disable_account') }}
|
{{ trans('visiosoft.module.profile::message.disable_account') }}
|
||||||
</p>
|
</p>
|
||||||
<a href="{{ url_route("visiosoft.module.profile::profile_close_account") }}" class="btn btn-danger text-white">
|
<a href="{{ url_route("visiosoft.module.profile::profile_close_account") }}" class="btn btn-danger account-freeze text-white">
|
||||||
{{ trans("visiosoft.module.profile::field.disable_account.name") }}
|
{{ trans("visiosoft.module.profile::field.disable_account.name") }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -205,7 +205,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="col-md-12">
|
<div class="col-md-12{{ setting_value('visiosoft.module.profile::hide_register_type_profile') ? ' d-none' }}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label font-weight-bold">
|
<label class="control-label font-weight-bold">
|
||||||
{{ trans("visiosoft.module.profile::field.register_type.name") }}
|
{{ trans("visiosoft.module.profile::field.register_type.name") }}
|
||||||
|
|||||||
@ -43,21 +43,5 @@ class ProfileModuleSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
// Users Fields Seeder
|
// Users Fields Seeder
|
||||||
$this->call(UsersFieldsSeeder::class);
|
$this->call(UsersFieldsSeeder::class);
|
||||||
|
|
||||||
if (is_null($this->folders->findBy('slug', 'favicon'))) {
|
|
||||||
$disk = $this->disks->findBySlug('local');
|
|
||||||
|
|
||||||
$this->folders->create([
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Favicon',
|
|
||||||
'description' => 'A folder for Favicon.',
|
|
||||||
],
|
|
||||||
'slug' => 'favicon',
|
|
||||||
'disk' => $disk,
|
|
||||||
'allowed_types' => [
|
|
||||||
'ico','png',
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'choose_file' => 'Which file would you like to use?',
|
'choose_file' => 'Which file would you like to use?',
|
||||||
'choose_folder' => 'Which folder would you like to upload to?',
|
'choose_folder' => 'Which folder would you like to upload to?',
|
||||||
'upload' => 'Click or drop files here to upload.',
|
'upload' => 'Click or drop files here to upload.',
|
||||||
'no_file_selected' => 'No file selected.',
|
'no_file_selected' => 'No file selected.',
|
||||||
'no_uploads' => 'No files uploaded.',
|
'no_uploads' => 'No files uploaded.',
|
||||||
'overwrite' => 'has already been uploaded. Would you like to overwrite it?',
|
'overwrite' => 'has already been uploaded. Would you like to overwrite it?',
|
||||||
'uploading' => 'Uploading',
|
'uploading' => 'Uploading',
|
||||||
'loading' => 'Loading',
|
'loading' => 'Loading',
|
||||||
|
'choose_file_option' => 'Choose File Option',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -9,4 +9,5 @@ return [
|
|||||||
'overwrite' => 'daha önce yüklenmiş. Üzerine kaydetmek ister misiniz?',
|
'overwrite' => 'daha önce yüklenmiş. Üzerine kaydetmek ister misiniz?',
|
||||||
'uploading' => 'Karşıya Yükleniyor',
|
'uploading' => 'Karşıya Yükleniyor',
|
||||||
'loading' => 'Yükleniyor',
|
'loading' => 'Yükleniyor',
|
||||||
|
'choose_file_option' => 'Bir Dosya Seçin',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
<a data-toggle="modal"
|
<a data-toggle="modal"
|
||||||
data-target="#{{ field_type.input_name }}-modal" {% if field_type.config.folders|length == 1 %} href="{{ url('streams/singlefile-field_type/upload/' ~ field_type.config.folders|first) }}" {% else %} href="{{ url('streams/singlefile-field_type/choose/' ~ field_type.config_key) }}" {% endif %}
|
data-target="#{{ field_type.input_name }}-modal" {% if field_type.config.folders|length == 1 %} href="{{ url('streams/singlefile-field_type/upload/' ~ field_type.config.folders|first) }}" {% else %} href="{{ url('streams/singlefile-field_type/choose/' ~ field_type.config_key) }}" {% endif %}
|
||||||
class="btn btn-success btn-xs">{{ trans('visiosoft.field_type.singlefile::button.upload') }}</a>
|
class="btn btn-success btn-xs">{{ trans('visiosoft.field_type.singlefile::button.upload') }}</a>
|
||||||
|
{{ trans('visiosoft.field_type.singlefile::message.choose_file_option') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
23
app/Listeners/EnableMaintenanceMode.php
Executable file
23
app/Listeners/EnableMaintenanceMode.php
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
<?php namespace App\Listeners;
|
||||||
|
|
||||||
|
use Anomaly\SettingsModule\Setting\Form\SettingFormRepository;
|
||||||
|
use Anomaly\Streams\Platform\Ui\Form\Event\FormWasSaved;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|
||||||
|
class EnableMaintenanceMode
|
||||||
|
{
|
||||||
|
|
||||||
|
public function handle(FormWasSaved $event)
|
||||||
|
{
|
||||||
|
$builder = $event->getBuilder();
|
||||||
|
if (get_class($builder->getRepository()) === SettingFormRepository::class) {
|
||||||
|
if ($builder->getFormValues()->has('maintenance')) {
|
||||||
|
if ($builder->getFormValues()->get('maintenance')) {
|
||||||
|
Artisan::call('down');
|
||||||
|
} elseif (config('streams::maintenance.enabled')) {
|
||||||
|
Artisan::call('up');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -14,7 +14,16 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
//
|
//Auto Language Switcher
|
||||||
|
view()->composer('*', function ($view) {
|
||||||
|
if (config('advs.lang_switcher_for_browser') and is_null(Request()->session()->get('_locale'))) {
|
||||||
|
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);//Get Browser Language
|
||||||
|
$acceptLang = config('streams::locales.enabled'); //Supported Language
|
||||||
|
$lang = in_array($lang, $acceptLang) ? $lang : config('streams::locales.default', 'en');
|
||||||
|
App()->setLocale($lang);
|
||||||
|
Request()->session()->put('_locale', $lang);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -17,6 +17,9 @@ return [
|
|||||||
\Anomaly\Streams\Platform\Event\Booted::class => [
|
\Anomaly\Streams\Platform\Event\Booted::class => [
|
||||||
\App\Listeners\Translations::class
|
\App\Listeners\Translations::class
|
||||||
],
|
],
|
||||||
|
\Anomaly\Streams\Platform\Ui\Form\Event\FormWasSaved::class => [
|
||||||
|
\App\Listeners\EnableMaintenanceMode::class
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -156,5 +156,41 @@ class DatabaseSeeder extends Seeder
|
|||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Favicon Folder
|
||||||
|
if (is_null($this->folders->findBy('slug', 'favicon'))) {
|
||||||
|
$disk = $this->disks->findBySlug('local');
|
||||||
|
|
||||||
|
$this->folders->create([
|
||||||
|
'en' => [
|
||||||
|
'name' => 'Favicon',
|
||||||
|
'description' => 'A folder for Favicon.',
|
||||||
|
],
|
||||||
|
'slug' => 'favicon',
|
||||||
|
'disk' => $disk,
|
||||||
|
'allowed_types' => [
|
||||||
|
'ico','png',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//Create Ads Documents Folder
|
||||||
|
if (!$this->folders->findBySlug('ads_documents')) {
|
||||||
|
$disk = $this->disks->findBySlug('local');
|
||||||
|
|
||||||
|
$this->folders->create([
|
||||||
|
'en' => [
|
||||||
|
'name' => 'Ads Documents',
|
||||||
|
'description' => 'A folder for Ads Documents.',
|
||||||
|
],
|
||||||
|
'slug' => 'ads_documents',
|
||||||
|
'disk' => $disk,
|
||||||
|
'allowed_types' => [
|
||||||
|
'pdf', 'doc', 'docx', 'xls', 'xlsx',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
652
resources/streams/config/locales.php
Normal file
652
resources/streams/config/locales.php
Normal file
@ -0,0 +1,652 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Locale Hint
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Define where to look for an i18n locale.
|
||||||
|
|
|
||||||
|
| true, false, 'domain' or 'uri'
|
||||||
|
|
|
||||||
|
| If false, you must handle setting the locale yourself.
|
||||||
|
| If true, both 'domain' and 'uri' are enabled and will be detected.
|
||||||
|
| If 'domain', streams will check your sub-domain for an i18n locale key
|
||||||
|
| If 'uri', streams will check your first URI segment for an i18n locale key
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'hint' => env('LOCALE_HINTS', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enabled Locales
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Define an array of locales enabled for translatable input.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enabled' => explode(',', env('ENABLED_LOCALES', 'en')),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The default locale for CONTENT.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DEFAULT_LOCALE', env('LOCALE', 'en')),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Supported Locales
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| In order to enable a locale or translate anything
|
||||||
|
| the i18n locale key MUST be in this array.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'supported' => [
|
||||||
|
'en' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'fa' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'de' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ar' => [
|
||||||
|
|
||||||
|
'direction' => 'rtl',
|
||||||
|
],
|
||||||
|
'cs' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'el' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'es' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'et' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'fr' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'fr-ca' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'it' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'nl' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sv' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sl' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sme' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'pl' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'pt' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'pt-br' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'br' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ru' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'zh-cn' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'zh-tw' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'he' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'lt' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'fi' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'da' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'id' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'hu' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'th' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'tr' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'bn' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sq' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'hi' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'vi' => [
|
||||||
|
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'aa' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ab' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ae' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'af' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ak' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'am' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'an' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'as' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'av' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ay' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'az' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ba' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'be' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'bg' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'bh' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'bi' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'bm' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'bo' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'bs' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ca' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ce' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ch' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'co' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'cr' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'cu' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'cv' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'cy' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'dv' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'dz' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ee' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'eo' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'eu' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ff' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'fj' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'fo' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'fy' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ga' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'gd' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'gl' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'gn' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'gu' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'gv' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ha' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ho' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'hr' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ht' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'hy' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'hz' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ig' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ii' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ik' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'io' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'is' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'iu' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ja' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'jv' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ka' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kg' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ki' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kj' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kk' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kl' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'km' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kn' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ko' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kr' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ks' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ku' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kv' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'kw' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ky' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'la' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'lb' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'lg' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'li' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ln' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'lo' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'lu' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'lv' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'mg' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'mh' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'mi' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'mk' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ml' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'mn' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'mr' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ms' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'mt' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'my' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'na' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'nb' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'nd' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ne' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ng' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'nn' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'no' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'nr' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'nv' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ny' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'oc' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'oj' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'om' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'or' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'os' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'pa' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'pi' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ps' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'qu' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'rm' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'rn' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ro' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'rw' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sa' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sc' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sd' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'se' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sg' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'si' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sk' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sm' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sn' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'so' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sr' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ss' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'st' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'su' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'sw' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ta' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'te' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'tg' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ti' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'tk' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'tl' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'tn' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'to' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ts' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'tt' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'tw' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ty' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ug' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'uk' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'ur' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'uz' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
've' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'vo' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'wa' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'wo' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'xh' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'yi' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'yo' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'za' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'zh' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
'zu' => [
|
||||||
|
'direction' => 'ltr',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
];
|
||||||
Loading…
Reference in New Issue
Block a user