Merge branch 'master' into l10n_master6

This commit is contained in:
Fatih Alp 2020-02-12 14:23:46 +03:00 committed by GitHub
commit cc66f9312f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 381 additions and 459 deletions

View File

@ -1,78 +1,71 @@
<div class="slider-text">
{% if blocks('ad-item-details-block-area') is null %}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
<h3 class="ad-price">
<b>{{ adv.price.currency(null,'currency',false) }}</b>
<!-- priceField with Block -->
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
<!-- priceField with Block -->
</h3>
</div>
<div class="user-interactions">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
<h3 class="ad-price">
<b>{{ adv.price.currency(null,'currency',false) }}</b>
<!-- priceField with Block -->
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
<!-- priceField with Block -->
<div class="row">
<div class="col-md-12 m-2">
<!-- Author with Block -->
{{ addBlock('ad-detail/author',{'adv':adv})|raw }}
<!-- Author with Block -->
</h3>
{{ trans('visiosoft.module.advs::field.offered_by') }}:
<a id="owner"
href="{{ url_route('visiosoft.module.advs::list_user_ad', [adv.created_by_id]) }}"
data-content="{{ adv.owner_id }}"> {{ adv.first_name }} {{ adv.last_name }}
</a>
{{ addBlock('ad-detail/seller/action',{'seller_id':adv.owner_id})|raw }}
</div>
<div class="col-md-12 m-2">
<i class="fas fa-hashtag"></i>
{{ trans('visiosoft.module.advs::field.ad_id') }}:{{ adv.id }}
</div>
<div class="col-md-12 m-2">
<i class="far fa-clock text-dark"></i>
{{ adv.created_at|date('d/m/Y') }}
</div>
<!-- Detail With Block -->
{{ addBlock('ad-detail/details',{'adv':adv})|raw }}
{{ addBlock('ad-detail/widget-details',{'adv':adv})|raw }}
<!-- Detail With Block -->
{% if adv.isCorporate == 2 %}
<div class="col-md-12 m-2">
<i class="fa fa-suitcase"></i>
<a href="{{ url_route('visiosoft.module.advs::list_user_ad',
[adv.created_by_id]) }}"> {{ adv.first_name }} {{ adv.last_name }}</a>
</div>
{% endif %}
</div>
</div>
<div class="user-interactions">
<!-- Contact With Block -->
{% set contactWith = addBlock('ad-detail/contact-with',{'adv':adv}) %}
{% if contactWith != "" %}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
<div class="row">
<div class="col-md-12 m-2">
<!-- Author with Block -->
{{ addBlock('ad-detail/author',{'adv':adv})|raw }}
<!-- Author with Block -->
{{ trans('visiosoft.module.advs::field.offered_by') }}:
<a id="owner"
href="{{ url_route('visiosoft.module.advs::list_user_ad', [adv.created_by_id]) }}"
data-content="{{ adv.owner_id }}"> {{ adv.first_name }} {{ adv.last_name }}
</a>
{{ addBlock('ad-detail/seller/action',{'seller_id':adv.owner_id})|raw }}
<div class="col-md-12 mt-2">
<h4><u>{{ trans('visiosoft.module.advs::field.contact_with') }}:</u></h4>
</div>
<div class="col-md-12 m-2">
<i class="fas fa-hashtag"></i>
{{ trans('visiosoft.module.advs::field.ad_id') }}:{{ adv.id }}
</div>
<div class="col-md-12 m-2">
<i class="far fa-clock text-dark"></i>
{{ adv.created_at|date('d/m/Y') }}
</div>
<!-- Detail With Block -->
{{ addBlock('ad-detail/details',{'adv':adv})|raw }}
{{ addBlock('ad-detail/widget-details',{'adv':adv})|raw }}
<!-- Detail With Block -->
{% if adv.isCorporate == 2 %}
<div class="col-md-12 m-2">
<i class="fa fa-suitcase"></i>
<a href="{{ url_route('visiosoft.module.advs::list_user_ad',
[adv.created_by_id]) }}"> {{ adv.first_name }} {{ adv.last_name }}</a>
</div>
{% endif %}
{{ contactWith|raw }}
</div>
</div>
{% endif %}
<!-- Contact With Block -->
<!-- Contact With Block -->
{% set contactWith = addBlock('ad-detail/contact-with',{'adv':adv}) %}
{% if contactWith != "" %}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
<div class="row">
<div class="col-md-12 mt-2">
<h4><u>{{ trans('visiosoft.module.advs::field.contact_with') }}:</u></h4>
</div>
{{ contactWith|raw }}
</div>
</div>
{% endif %}
<!-- Contact With Block -->
<!-- social-links -->
<div class="social-links">
{% include "visiosoft.module.advs::ad-detail/partials/social" %}
</div>
<!-- social-links -->
<!-- social-links -->
<div class="social-links">
{% include "visiosoft.module.advs::ad-detail/partials/social" %}
</div>
{% else %}
{{ blocks('ad-item-details-block-area') }}
{% endif %}
<!-- social-links -->
</div>
</div>

View File

@ -33,7 +33,7 @@
<div id="dateContainer" class="collapse show overflow-auto" aria-labelledby="dateHeading"
data-parent="#filter"
style="max-height: 300px;">
<div class="row p-3 m-0">
<div class="d-flex flex-column p-3 m-0">
<div class="form-check py-1">
<input class="form-check-input" type="radio" name="date" id="dateDay" value="day">
<label class="form-check-label" for="dateDay">
@ -47,7 +47,8 @@
</label>
</div>
<div class="form-check py-1">
<input class="form-check-input" type="radio" name="date" id="dateMonth" value="month">
<input class="form-check-input" type="radio" name="date" id="dateMonth"
value="month">
<label class="form-check-label" for="dateMonth">
{{ trans("visiosoft.module.advs::field.in_the_last_month.name") }}
</label>
@ -64,7 +65,8 @@
<button class="btn btn-link text-dark" data-toggle="collapse" data-target="#media"
aria-expanded="true" aria-controls="media">
<i class="fa fa-camera"></i>
{{ trans("visiosoft.module.advs::field.photo.name") }}, {{ trans("visiosoft.module.advs::field.video.name") }}
{{ trans("visiosoft.module.advs::field.photo.name") }}
, {{ trans("visiosoft.module.advs::field.video.name") }}
</button>
</h5>
</div>
@ -73,13 +75,15 @@
style="max-height: 300px;">
<div class="row p-3 m-0">
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="photo" id="photo">
<input class="form-check-input" type="checkbox" value="true" name="photo"
id="photo">
<label class="form-check-label" for="photo">
{{ trans("visiosoft.module.advs::field.ads_with_photo.name") }}
</label>
</div>
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="video" id="video">
<input class="form-check-input" type="checkbox" value="true" name="video"
id="video">
<label class="form-check-label" for="video">
{{ trans("visiosoft.module.advs::field.ads_with_video.name") }}
</label>
@ -105,7 +109,8 @@
style="max-height: 300px;">
<div class="row p-3 m-0">
<div class="form-check py-1">
<input class="form-check-input" type="checkbox" value="true" name="map" id="mapFilter">
<input class="form-check-input" type="checkbox" value="true" name="map"
id="mapFilter">
<label class="form-check-label" for="mapFilter">
{{ trans("visiosoft.module.advs::field.yes.name") }}
</label>
@ -133,13 +138,13 @@
{% set active_currencies = setting_value('visiosoft.module.advs::enabled_currencies') %}
<div class="col-md-4 p-1 m-0">
<input type="number" class="price-input form-control w-100"
value="{{ request.min_price }}"
value="{{ app.request.get('min_price') }}"
name="min_price" min="0"
placeholder="{{ trans('visiosoft.module.advs::field.min.name') }}">
</div>
<div class="col-md-4 p-1 pr-0 m-0">
<input class="price-input form-control w-100" type="number"
value="{{ request.max_price }}"
value="{{ app.request.get('max_price') }}"
name="max_price"
placeholder="{{ trans('visiosoft.module.advs::field.max.name') }}">
@ -147,7 +152,9 @@
<div class="col-md-4 py-1 px-0">
<select name="currency" id="currency" class="form-control">
{% for currency in active_currencies %}
<option value="{{ currency }}">{{ currency }}</option>
<option {% if app.request.get('currency') == currency %}
selected
{% endif %}value="{{ currency }}">{{ currency }}</option>
{% endfor %}
</select>
</div>

View File

@ -0,0 +1,78 @@
<?php namespace Visiosoft\AdvsModule\Adv\Command;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
class appendRequestURL
{
protected $query = [];
protected $request;
protected $url;
protected $new_parameters;
/**
* appendRequestURL constructor.
* @param $request
*/
public function __construct($request, $url, $new_parameters = [])
{
$this->url = $url;
$this->request = $request;
$this->new_parameters = $new_parameters;
}
/**
* @return appendRequestURL
*/
public function handle()
{
return $this->url
. (Str::contains($this->url, '?') ? '&' : '?')
. Arr::query($this->appends(array_merge($this->request, $this->new_parameters)));
}
/**
* @param $key
* @param null $value
* @return $this|appendRequestURL
*/
public function appends($key, $value = null)
{
if (is_null($key)) {
return $this->query;
}
if (is_array($key)) {
return $this->appendArray($key)->query;
}
return $this->addQuery($key, $value)->query;
}
/**
* @param array $keys
* @return $this
*/
protected function appendArray(array $keys)
{
foreach ($keys as $key => $value) {
$this->addQuery($key, $value);
}
return $this;
}
/**
* @param $key
* @param $value
* @return $this
*/
protected function addQuery($key, $value)
{
$this->query[$key] = $value;
return $this;
}
}

View File

@ -12,7 +12,7 @@ class Extend extends ActionHandler
foreach ($selected as $id) {
$entry = $model->find($id);
$finishAt = $entry->finish_at ? $entry->finish_at->addDay(30) : date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + 30 day'));
$finishAt = $entry->finish_at ? $entry->finish_at->addDay(setting_value('visiosoft.module.advs::default_published_time')) : date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . setting_value('visiosoft.module.advs::default_published_time') . ' day'));
$entry->finish_at = $finishAt;
$entry->update();
}

View File

@ -1,6 +1,7 @@
<?php namespace Visiosoft\AdvsModule;
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
use Visiosoft\AdvsModule\Adv\Command\GetAd;
use Visiosoft\AdvsModule\Adv\Command\isActive;
use Visiosoft\AdvsModule\Adv\Command\LatestAds;
@ -44,6 +45,13 @@ class AdvsModulePlugin extends Plugin
return $latestAds;
}
),
new \Twig_SimpleFunction(
'appendRequestURL',
function ($request, $url, $new_parameters) {
return $this->dispatch(new appendRequestURL($request, $url, $new_parameters));
}
)
];
}

View File

@ -164,8 +164,6 @@ class AdvsController extends PublicController
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
}
$advs = $dopingModel->reFilterAdvs(2, $advs);
}
foreach ($advs as $index => $ad) {
@ -216,13 +214,13 @@ class AdvsController extends PublicController
$userProfile = $this->profile_repository->getProfile($user->id);
}
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request',
'user', 'userProfile', 'featured_advs', 'type', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio');
Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000));
$viewType = $this->requestHttp->cookie('viewType');
$compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request',
'user', 'userProfile', 'featured_advs', 'viewType', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio');
if (isset($viewType) and $viewType == 'table')
return $this->view->make('visiosoft.module.advs::list/table', $compact);
elseif (isset($viewType) and $viewType == 'map')

View File

@ -0,0 +1,9 @@
.small-notice {
background-color: #f7f7f7;
}
.small-notice i {
font-size: 18px;
position: relative;
top: 4px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,13 +1,16 @@
var inputQuery = document.querySelector("input[name=\"phone\"]");
var iti = intlTelInput(inputQuery, {
hiddenInput: "full_phone",
class:"form-control",
initialCountry: "auto",
geoIpLookup: function (success, failure) {
$.get("https://ipinfo.io", function () {
}, "jsonp").always(function (resp) {
var countryCode = (resp && resp.country) ? resp.country : "";
success(countryCode);
});
}
});
// Personal Registration
var inputQueries = document.querySelectorAll("input[name=\"phone\"]");
inputQueries.forEach(function (inputQuery, key) {
var iti = intlTelInput(inputQuery, {
hiddenInput: "full_phone",
class:"form-control",
initialCountry: "auto",
geoIpLookup: function (success, failure) {
$.get("https://ipinfo.io", function () {
}, "jsonp").always(function (resp) {
var countryCode = (resp && resp.country) ? resp.country : "";
success(countryCode);
})
}
})
});

View File

@ -22,4 +22,12 @@ return [
'forgot_password' => 'I Forgot My Password',
'email_or_phone_number' => 'Email Address or Phone Number',
'phone_number' => 'Phone Number',
// Registration instructions
'personal_registration_header' => 'What Are Individual Membership Advantages?',
'personal_registration_body' => 'Sell and rent your home, car, sell your unused items, get new ones.',
'personal_registration_list_1' => 'Post a free ad,',
'personal_registration_list_2' => 'Add the ads you are interested in, follow the price changes after adding them to your favorites, create favorite searches that meet your criteria,',
'personal_registration_list_3' => 'Send messages to the ad owners on the site.',
'register_information_note' => 'The information on this page is taken for ' . env('APPLICATION_DOMAIN') . ' membership. You can find detailed information about the protection of personal data here.',
];

View File

@ -23,10 +23,10 @@ return [
'email_or_phone_number' => 'E-Posta Adresiniz veya Telefon Numaranız',
'phone_number' => 'Telefon Numarası',
// Registration instructions
'personal_registration_header' => 'Bireysel Üyelik Avantajları Nelerdir?',
'personal_registration_body' => 'Evinizi, arabanızı satmak ve kiralamak, kullanılmayan eşyalarınızı satmak, yenilerini almak.',
'personal_registration_list_1' => 'Ücretsiz bir reklam gönderin,',
'personal_registration_body' => '',
'personal_registration_list_1' => 'Ücretsiz bir ilan gönderin,',
'personal_registration_list_2' => 'İlgilendiğiniz reklamları ekleyin, favorilerinize ekledikten sonra fiyat değişikliklerini takip edin, kriterlerinize uygun favori aramalar oluşturun,',
'personal_registration_list_3' => 'Sitedeki reklam sahiplerine mesaj gönderin.',
'register_information_note' => 'Bu sayfadaki bilgiler ' . env('APPLICATION_DOMAIN') . ' üyelik. Kişisel verilerin korunması hakkında ayrıntılı bilgiyi burada bulabilirsiniz.',

View File

@ -0,0 +1,73 @@
<div class="col-6">
<div class="form-group display_name-field display_name-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.first_name') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.first_name.setPlaceholder(trans('visiosoft.theme.base::field.first_name')).input|raw }}
{{ form.fields.username.setValue(random()).setAttributes({
'class' :'hidden',
}).input|raw }}
</div>
</div>
</div>
<div class="col-6">
<div class="form-group username-field username-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.last_name') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.last_name.setPlaceholder(trans('visiosoft.theme.base::field.last_name')).input|raw }}
</div>
</div>
</div>
{% if setting_value('visiosoft.module.advs::register_email_field') %}
<div class="col-12">
<div class="form-group email-field email-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.email') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.email.setPlaceholder(trans('visiosoft.theme.base::field.email')).input|raw }}
</div>
</div>
</div>
{% else %}
{% set domain = config('app.url')|replace({ ('https://'): '',('http://'): '',('/'): '/' }) %}
{% if domain == "localhost" %}
{% set domain = "example.com" %}
{% endif %}
{{ form.fields.email.setValue(random()~"@"~domain).setAttributes({
'class' :'hidden',
}).input|raw }}
{% endif %}
<div class="col-12">
<div class="form-group password-field password-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.password') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.password.setPlaceholder(trans('visiosoft.theme.base::field.password')).input|raw }}
</div>
</div>
</div>
<div class="col-12">
<div class="form-group email-field phone-field_type register-phone">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.phone_number') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.phone.setValue(form.fields.full_phone.value).input|raw }}
</div>
</div>
</div>

View File

@ -1,105 +1,68 @@
{% extends "theme::layouts/default" %}
{% block content %}
<div class="row justify-content-center">
<div class="col-12 col-sm-8 col-md-6 col-lg-4 text-left bg-light p-3 m-0">
{% set form = form('register2').redirect(request_get('redirect', '/'))
.get() %}
{{ form_open({
'class': 'row form ' ~ form.options.class ,
'enctype': 'multipart/form-data',
'url':form.options.url
})|raw }}
<div class="col-12">
<div class="form-group display_name-field display_name-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.first_name') }}
<span class="required">*</span>
</label>
<div class="row justify-content-center bg-light rounded border px-3">
<div class="col-12 col-md-6 text-left p-3 m-0">
{{ addBlock('register/register-type')|raw }}
<div class="personal-register">
{% set form = form('register2').redirect(request_get('redirect', '/'))
.get() %}
{{ form_open({
'class': 'row form ' ~ form.options.class ,
'enctype': 'multipart/form-data',
'url':form.options.url
})|raw }}
{% include 'visiosoft.theme.base::addons/anomaly/users-module/partials/register-form' %}
<div class="col-12 row m-0">
<div class="col-6 pr-0 pl-1">
<button class="btn btn-sm btn-success py-2">
<i class="fas fa-user-plus"></i>
{{ trans('visiosoft.theme.base::button.register') }}
</button>
<div class="input-wrapper">
{{ form.fields.first_name.setPlaceholder(trans('visiosoft.theme.base::field.first_name')).input|raw }}
{{ form.fields.username.setValue(random()).setAttributes({
'class' :'hidden',
}).input|raw }}
</div>
</div>
<div class="social-login py-2 row col-12 m-0">
{{ addBlock('login/oauth')|raw }}
</div>
{{ form_close() }}
</div>
<div class="col-12">
<div class="form-group username-field username-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.last_name') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.last_name.setPlaceholder(trans('visiosoft.theme.base::field.last_name')).input|raw }}
</div>
{{ addBlock('register/corporate-register')|raw }}
</div>
<div class="col-12 col-md-6 py-3 pr-0 instructions d-none d-md-block">
<div class="border personal-advantages py-5 px-5">
<div class="d-flex align-items-center mb-4">
<img src="{{ img('visiosoft.theme.base::images/register-instruction.png').url }}">
<h4 class="ml-3">
{{ trans('visiosoft.theme.base::field.personal_registration_header') }}
</h4>
</div>
<div class="mb-4">
{{ trans('visiosoft.theme.base::field.personal_registration_body') }}
</div>
<ul class="pl-4">
<li>{{ trans('visiosoft.theme.base::field.personal_registration_list_1') }}</li>
<li>{{ trans('visiosoft.theme.base::field.personal_registration_list_2') }}</li>
<li>{{ trans('visiosoft.theme.base::field.personal_registration_list_3') }}</li>
</ul>
</div>
<div class="col-12">
<div class="form-group email-field phone-field_type register-phone">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.phone_number') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.phone.setValue(form.fields.full_phone.value).input|raw }}
</div>
</div>
</div>
{% if setting_value('visiosoft.module.advs::register_email_field') %}
<div class="col-12">
<div class="form-group email-field email-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.email') }}
<span class="required">*</span>
</label>
{{ addBlock('register/instructions')|raw }}
<div class="input-wrapper">
{{ form.fields.email.setPlaceholder(trans('visiosoft.theme.base::field.email')).input|raw }}
</div>
</div>
<div class="border small-notice py-3 px-4 mt-3">
<div class="d-flex text-muted">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
<small class="ml-2 text-muted">
{{ trans('visiosoft.theme.base::field.register_information_note') }}
</small>
</div>
{% else %}
{% set domain = config('app.url')|replace({ ('https://'): '',('http://'): '',('/'): '/' }) %}
{% if domain == "localhost" %}
{% set domain = "example.com" %}
{% endif %}
{{ form.fields.email.setValue(random()~"@"~domain).setAttributes({
'class' :'hidden',
}).input|raw }}
{% endif %}
<div class="col-12">
<div class="form-group password-field password-field_type">
<label class="control-label">
{{ trans('visiosoft.theme.base::field.password') }}
<span class="required">*</span>
</label>
<div class="input-wrapper">
{{ form.fields.password.setPlaceholder(trans('visiosoft.theme.base::field.password')).input|raw }}
</div>
</div>
</div>
<div class="col-12 row m-0">
<div class="col-6 pr-0 pl-1">
<button class="btn btn-sm btn-success w-100 py-2">
<i class="fas fa-user-plus"></i>
{{ trans('visiosoft.theme.base::button.register') }}
</button>
</div>
<div class="col-6 pr-0 pl-1">
<a href="{{ url('login') }}" class="btn btn-sm btn-primary w-100 py-2">
<i class="fas fa-key"></i>
{{ trans('visiosoft.theme.base::button.login') }}
</a>
</div>
</div>
<div class="social-login py-2 row col-12 m-0">
{{ addBlock('login/oauth')|raw }}
</div>
</div>
</div>
@ -108,6 +71,7 @@
{{ asset_add("scripts.js", "visiosoft.theme.base::js/utils.js") }}
{{ asset_add("scripts.js", "visiosoft.theme.base::js/phonefield.js") }}
{{ asset_add("styles.css", "visiosoft.theme.base::css/intlTelInput.css") }}
{{ asset_add("styles.css", "visiosoft.theme.base::css/register.css") }}
{% endblock %}

View File

@ -7,7 +7,7 @@
<span>&times;</span><span class="sr-only">Close</span>
</button>
{% for message in message_get('success') %}
{% for message in message_pull('success') %}
{{ trans(message)|markdown }}
{% endfor %}
</div>
@ -20,7 +20,7 @@
<span>&times;</span><span class="sr-only">Close</span>
</button>
{% for message in message_get('info') %}
{% for message in message_pull('info') %}
{{ trans(message)|markdown }}
{% endfor %}
</div>
@ -34,7 +34,7 @@
<span>&times;</span><span class="sr-only">Close</span>
</button>
{% for message in message_get('warning') %}
{% for message in message_pull('warning') %}
{{ trans(message)|markdown }}
{% endfor %}
</div>
@ -48,7 +48,7 @@
<span>&times;</span><span class="sr-only">Close</span>
</button>
{% for message in message_get('error') %}
{% for message in message_pull('error') %}
{{ trans(message)|markdown }}
{% endfor %}
</div>

View File

@ -4,29 +4,7 @@
<!-- To the Future! -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- Meta Tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="{{ config_get('streams::distribution.name') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="{{ trans(template.meta_description) }}"/>
{% block ogdata %}
<meta property="og:site_name"
content="{{ template.get('og_site_name', setting_value('streams::name', config_get('streams::distribution.name'))) }}"/>
<meta property="og:description" content="{{ template.get('og_description', trans(template.meta_description)) }}"/>
<meta property="og:title" content="{{ template.get('og_title', trans(template.meta_title)) }}"/>
<meta property="og:url" content="{{ template.get('og_url', url_current()) }}"/>
<meta property="og:image" content="{{ template.get('og_image') }}"/>
<meta property="og:type" content="website"/>
{% endblock %}
<title>
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
&#8250;
{{ trans(template.meta_title) }}
</title>
{% include "visiosoft.theme.base::partials/metatags" %}
<!-- Favicon -->
{#{{ favicons("theme::img/favicon.png") }}#}

View File

@ -0,0 +1,16 @@
<!-- Meta Tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="{{ config_get('streams::distribution.name') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="{{ trans(template.meta_description) }}"/>
<!-- Meta Tags -->
<title>
{{ setting_value('streams::name', config_get('streams::distribution.name')) }}
&#8250;
{{ trans(template.meta_title) }}
</title>
{% include "visiosoft.theme.base::partials/ogdata" %}

View File

@ -34,7 +34,7 @@
{% endif %}
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile.name') }}</a>
<a class="nav-link" href="{{ url_route('profile::profile') }}">{{ trans('visiosoft.theme.base::field.profile') }}</a>
</li>
<li class="nav-item">
<a href="/advs/create_adv" class="btn btn-primary">{{ trans("theme::button.post_ad.name") }}</a>

View File

@ -0,0 +1,9 @@
{% block ogdata %}
<meta property="og:site_name"
content="{{ template.get('og_site_name', setting_value('streams::name', config_get('streams::distribution.name'))) }}"/>
<meta property="og:description" content="{{ template.get('og_description', trans(template.meta_description)) }}"/>
<meta property="og:title" content="{{ template.get('og_title', trans(template.meta_title)) }}"/>
<meta property="og:url" content="{{ template.get('og_url', url_current()) }}"/>
<meta property="og:image" content="{{ template.get('og_image') }}"/>
<meta property="og:type" content="website"/>
{% endblock %}

View File

@ -21,7 +21,13 @@
{% set id = maincat.id %}
{% set parent_category = false %}
{% endif %}
<a href="{% if(type == "list") %}{{ url_route('visiosoft.module.advs::list') }}{% else %}{{ url_route('advs_map_list') }}{% endif %}?cat={{ id }}"
<a href="
{% if(viewType != "map") %}
{{ appendRequestURL(request_query(),url_route('visiosoft.module.advs::list'),{'cat':id}) }}
{% else %}
{{ appendRequestURL(request_query(),url_route('advs_map_list'),{'cat':id}) }}
{% endif %}
"
class="list-group-item list-group-item-action text-truncate">
<i class="fas fa-dot-circle"></i>
{{ name }}
@ -29,7 +35,13 @@
{% for subcat in params.subCats %}
<div class="list-group pl-3 bg-light">
{% if subcat.parent_category_id == maincat['id'] %}
<a href="{% if(type == "list") %}{{ url_route('visiosoft.module.advs::list') }}{% else %}{{ url_route('advs_map_list') }}{% endif %}?cat={{ subcat.id }}"
<a href="
{% if(viewType != "map") %}
{{ appendRequestURL(request_query(),url_route('visiosoft.module.advs::list'),{'cat':subcat.id}) }}
{% else %}
{{ appendRequestURL(request_query(),url_route('advs_map_list'),{'cat':subcat.id}) }}
{% endif %}
"
class="list-group-item list-group-item-action
text-truncate">{{ subcat.name }}</a>
{% endif %}

View File

@ -181,10 +181,12 @@ class CategoryController extends AdminController
public function delete(CategoryRepositoryInterface $categoryRepository, Request $request, CategoryModel $categoryModel, $id)
{
$categoryRepository->DeleteCategories($id);
if ($request->parent == "")
return redirect('admin/cats')->with('success', ['Category and related sub-categories deleted successfully.']);
else
$subCats = $categoryRepository->getSubCatById($request->parent);
if (count($subCats)) {
return redirect('admin/cats?cat=' . $request->parent)->with('success', ['Category and related sub-categories deleted successfully.']);
} else {
return redirect('admin/cats')->with('success', ['Category and related sub-categories deleted successfully.']);
}
}
public function cleanSubcats()

View File

@ -60,21 +60,20 @@ class UploadController extends AdminController
$watermarktype = $settings->value('visiosoft.module.advs::watermark_type');
$position = $settings->value('visiosoft.module.advs::watermark_position');
$img = WaterMark::make($this->request->file('upload')->getRealPath())
->resizeCanvas(800, 600, 'center', false, '464646');
if ($watermarktype == 'image') {
$img = WaterMark::make($this->request->file('upload')->getRealPath());
$watermarkimage_id = $settings->value('visiosoft.module.advs::watermark_image');
$watermarkimage = $files->find($watermarkimage_id);
$w = $img->width();
if ($watermarkimage != null) {
$watermark = WaterMark::make(public_path() . '/app/default/files-module/local/' . $watermarkimage->path())
->opacity($settings->value('visiosoft.module.advs::watermark_opacity'))
->resize($w);
$watermark = WaterMark::make(app_storage_path() . '/files-module/local/' . $watermarkimage->path())
->opacity($settings->value('visiosoft.module.advs::watermark_opacity'));
$img->insert($watermark, $position);
}
} else {
$img = WaterMark::make($this->request->file('upload')->getRealPath());
$watermarktext = $settings->value('visiosoft.module.advs::watermark_text');
$v = "top";
$h = "center";
@ -90,7 +89,7 @@ class UploadController extends AdminController
}
$img->save(public_path() . '/app/default/files-module/local/images/' . $file->getAttributes()['name']);
$img->save(app_storage_path() . '/files-module/local/images/' . $file->getAttributes()['name']);
return $this->response->json($file->getAttributes());
}

View File

@ -2,217 +2,29 @@
use Anomaly\NavigationModule\Link\LinkModel;
use Anomaly\NavigationModule\Menu\Contract\MenuRepositoryInterface;
use Anomaly\PagesModule\Page\Contract\PageRepositoryInterface;
use Anomaly\PagesModule\Page\PageModel;
use Anomaly\PagesModule\Type\Contract\TypeRepositoryInterface;
use Anomaly\Streams\Platform\Entry\EntryRepository;
use Anomaly\Streams\Platform\Model\Settings\SettingsSettingsEntryModel;
use Anomaly\UrlLinkTypeExtension\UrlLinkTypeModel;
use Illuminate\Database\Seeder;
use Anomaly\ConfigurationModule\Configuration\Contract\ConfigurationRepositoryInterface;
use Anomaly\DashboardModule\Dashboard\Contract\DashboardRepositoryInterface;
use Anomaly\DashboardModule\Widget\Contract\WidgetRepositoryInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class DatabaseSeeder extends Seeder
{
protected $pages;
protected $types;
protected $widgets;
protected $dashboards;
protected $configuration;
protected $menus;
public function __construct(
PageRepositoryInterface $pages,
TypeRepositoryInterface $types,
WidgetRepositoryInterface $widgets,
DashboardRepositoryInterface $dashboards,
ConfigurationRepositoryInterface $configuration,
MenuRepositoryInterface $menus
)
{
$this->pages = $pages;
$this->types = $types;
$this->widgets = $widgets;
$this->dashboards = $dashboards;
$this->configuration = $configuration;
$this->menus = $menus;
}
public function run()
{
\Anomaly\Streams\Platform\Model\Pages\PagesPagesEntryModel::query()->forceDelete();
\Anomaly\Streams\Platform\Model\Pages\PagesDefaultPagesEntryModel::query()->forceDelete();
$type = $this->types->findBySlug('default');
$this->pages->create(
[
'sort_order' => 1,
'en' => [
'title' => 'OpenClassify',
],
'tr' => [
'title' => 'OpenClassify',
],
'slug' => 'welcome',
'entry' => $type->getEntryModel()->create(
[
'en' => [
'content' => '<h3>The extensible and most advanced open source classified app build with Laravel.</h3>',
],
'tr' => [
'content' => '<h3>Laravel tabanlı Mödüler yapıya sahip En Gelişmiş İlan Platformu.</h3>',
],
]
),
'type' => $type,
'enabled' => true,
'home' => true,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
$this->pages->create(
[
'en' => [
'title' => 'Contact',
],
'tr' => [
'title' => 'Bize Ulaşın',
],
'slug' => 'contact',
'entry' => $type->getEntryModel()->create(
[
'en' => [
'content' => '<p>Drop us a line! We\'d love to hear from you!</p><p><br></p>
<p>{{ form(\'contact\').to(\'example@domain.com\')|raw }}</p>',
],
]
),
'type' => $type,
'enabled' => true,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
//Diğer Sayfalar
$this->pages->create(
[
'en' => [
'title' => 'Secure e-Trade Tips',
],
'tr' => [
'title' => 'Güvenli Alışverişin İpuçları',
],
'slug' => 'secure_e-trade_tips',
'type' => $type,
'enabled' => false,
'visible' => 0,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
$this->pages->create(
[
'en' => [
'title' => 'Agreements and Rules',
],
'tr' => [
'title' => 'Sözleşmeler ve Kurallar',
],
'slug' => 'agreements_and_rules',
'type' => $type,
'enabled' => false,
'visible' => 0,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
$this->pages->create(
[
'en' => [
'title' => 'Membership Agreement',
],
'tr' => [
'title' => 'Üyelik Sözleşmesi',
],
'slug' => 'membership_agreement',
'type' => $type,
'enabled' => false,
'visible' => 0,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
$this->pages->create(
[
'en' => [
'title' => 'Terms of Use',
],
'tr' => [
'title' => 'Kullanım Koşulları',
],
'slug' => 'terms_of_use',
'type' => $type,
'enabled' => false,
'visible' => 0,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
$this->pages->create(
[
'en' => [
'title' => 'Site Map',
],
'tr' => [
'title' => 'Site Haritası',
],
'slug' => 'site_map',
'type' => $type,
'enabled' => false,
'visible' => 0,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
$this->pages->create(
[
'en' => [
'title' => 'Personal Data Protection',
],
'tr' => [
'title' => 'Kişisel Verilerin Korunması',
],
'slug' => 'personal_data_protection',
'type' => $type,
'enabled' => false,
'visible' => 0,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
$this->pages->create(
[
'en' => [
'title' => 'Help and Operation Guide',
],
'tr' => [
'title' => 'Yardım ve İşlem Rehberi',
],
'slug' => 'help_and_operation_guide',
'type' => $type,
'enabled' => false,
'visible' => 0,
'theme_layout' => 'theme::layouts/default.twig',
]
)->allowedRoles()->sync([]);
//Footer Link
LinkModel::query()->forceDelete();
$repository = new EntryRepository();

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="bootstrap/autoload.php"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertErrorsToExceptions="true"
backupStaticAttributes="false"
processIsolation="false"
backupGlobals="false"
stopOnFailure="true"
colors="true">
<testsuites>
<testsuite name="Streams">
<directory suffix="Test.php">./vendor/anomaly/streams-platform/</directory>
</testsuite>
<testsuite name="Application">
<directory suffix="Test.php">./addons/*/*/*/tests</directory>
</testsuite>
<testsuite name="Core">
<directory suffix="Test.php">./core/*/*/tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./vendor/anomaly/streams-platform/src/</directory>
<exclude>
<directory suffix=".php">./app/</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./coverage"/>
</logging>
<php>
<server name="HTTP_HOST" value="http://localhost"/>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
<env name="APP_THEME" value="pyrocms.theme.starter"/>
<env name="ADMIN_THEME" value="pyrocms.theme.accelerant"/>
</php>
</phpunit>