Merge pull request #867 from openclassify/dia

make datetime format dynamic
This commit is contained in:
Fatih Alp 2020-12-18 16:30:13 +03:00 committed by GitHub
commit 63c9b85ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 68 additions and 22 deletions

View File

@ -37,6 +37,8 @@ return [
'create_ad' => [
'title' => 'visiosoft.module.advs::section.create_ad',
'fields' => [
'steps_color',
'create_ad_button_color',
'hide_standard_price_field',
'hide_options_field',
'hide_village_field',

View File

@ -350,4 +350,16 @@ return [
'bind' => 'override_text',
'env' => 'OVERRIDE_TEXT',
],
'steps_color' => [
"type" => "anomaly.field_type.colorpicker",
"config" => [
"default_value" => '#209579',
]
],
'create_ad_button_color' => [
"type" => "anomaly.field_type.colorpicker",
"config" => [
"default_value" => '#00a651',
]
],
];

View File

@ -52,8 +52,9 @@
display: none;
}
.next-stap img {
.next-stap svg {
width: 60px;
height: 60px;
}
.next-stap p {
@ -62,7 +63,7 @@
}
.btn-1 {
background-color: #00a651;
background-color: {{ setting_value('visiosoft.module.advs::create_ad_button_color') }};
padding: 5px 30px 7px;
color: #fff;
border: 1px solid #dadada;

View File

@ -6,16 +6,10 @@
min-width: 0;
&.current {
&::after {
background: linear-gradient(to right, #209579 50%, #dfdfdf 50%);
}
.bullet {
color: #209579;
background-color: #fff;
border: .2rem solid #209579;
@media only screen and (min-width: 768px) {
border: .3rem solid #209579;
border-width: .3rem;
}
}
@ -43,7 +37,6 @@
left: 0;
z-index: -1;
width: 100%;
background-color: #209579;
@media only screen and (min-width: 768px) {
height: .3rem;
top: 1.4rem;
@ -58,7 +51,6 @@
display: inline-block;
position: relative;
line-height: 20px;
background-color: #209579;
@media only screen and (min-width: 768px) {
height: 3rem;
width: 3rem;

View File

@ -0,0 +1,18 @@
{% set stepsColor = setting_value('visiosoft.module.advs::steps_color') %}
#stepProgressBar .step.current .bullet {
color: {{ stepsColor }};
border: 0.2rem solid {{ stepsColor }};
}
#stepProgressBar .step .bullet {
background-color: {{ stepsColor }};
}
#stepProgressBar .step.current::after {
background: linear-gradient(to right, {{ stepsColor }} 50%, #dfdfdf 50%);
}
#stepProgressBar .step::after {
background-color: {{ stepsColor }};
}

View File

@ -26,7 +26,7 @@ $(document).ready(function () {
success: function (response) {
hideLoader();
if(response['title'] != undefined){
response['success'] ? $('.cross-icon').hide() : $('.check-icon').hide();
response['success'] ? $('.post-icon > svg:last-of-type').hide() : $('.post-icon > svg:first-of-type').hide();
let btn = '<button type="submit" class="btn-1">'+response['continueBtn']+'</button>';
if (response['link']) {

View File

@ -211,4 +211,12 @@ return [
'name' => 'Override Text',
'instructions' => 'Old Value:New Value'
],
'steps_color' => [
'name' => 'Steps Color',
'instructions' => 'Changes the progressive steps color.'
],
'create_ad_button_color' => [
'name' => 'Create Ad Button Color',
'instructions' => 'Changes the button that shows up when the new ad category selection is finished.'
],
];

View File

@ -1,4 +1,5 @@
<style>
{{ asset_inline("visiosoft.module.advs::css/step2.css") }}
{{ asset_inline("visiosoft.module.advs::css/step.scss") }}
</style>

View File

@ -47,9 +47,9 @@
<div class="cat-item mb-2 shadow-sm border rounded align-items-center">
<div class="cat-item-3">
<div class="section next-stap post-option px-4 text-center py-2">
<img src="{{ img('visiosoft.module.advs::images/check.svg').url }}" class="check-icon">
<img src="{{ img('visiosoft.module.advs::images/cross.svg').url }}" class="cross-icon">
<div class="section next-stap post-option post-icon px-4 text-center py-2">
{{ img('visiosoft.module.advs::images/check.svg').data|raw }}
{{ img('visiosoft.module.advs::images/cross.svg').data|raw }}
<div class="next-content"></div>
</div>
</div>

View File

@ -444,7 +444,9 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
public function extendAds($allAds, $isAdmin = false)
{
if (!is_numeric($allAds)) {
if (is_array($allAds)) {
$advs = $this->newQuery()->whereIn('id', $allAds);
} elseif (!is_numeric($allAds)) {
if ($isAdmin && auth()->user()->hasRole('admin')) {
$advs = $this->newQuery();
} else {

View File

@ -1244,7 +1244,12 @@ class AdvsController extends PublicController
public function extendAll($isAdmin = null)
{
$adsExtended = $this->adv_repository->extendAds(true, $isAdmin);
if (\request()->unpublished) {
$allAds = $this->adv_model->pendingAdvsByUser()->pluck('id')->all();
} else {
$allAds = true;
}
$adsExtended = $this->adv_repository->extendAds($allAds, $isAdmin);
$this->messages->success(trans('visiosoft.module.advs::message.extended', ['number' => $adsExtended]));
return $this->redirect->back();
}

View File

@ -9,6 +9,7 @@ return [
'delete' => 'Delete',
'extend' => 'Extend',
'extend_all' => 'Extend All',
'extend_unpublished' => 'Extend Unpublished',
'edit' => 'Edit',
'go_profile' => 'Go to Profile Detail',
'go_user' => 'Go to User Detail',

View File

@ -17,11 +17,11 @@
<div class="col-sm-4 location-field city-data font-weight-bold"
data-content="{{ adress.city }}">
{{ form.fields.city|raw }}
{{ form.fields.city.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option'))|raw }}
</div>
<div class="col-sm-4 location-field district-data font-weight-bold"
data-content="{{ adress.district }}">
{{ form.fields.district|raw }}
{{ form.fields.district.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option'))|raw }}
</div>
</div>
<div class="form-group location-map">

View File

@ -35,6 +35,9 @@
<a href="{{ url_route("advs::extendAll") }}" class="btn btn-primary">
{{ trans('visiosoft.module.profile::button.extend_all') }}
</a>
<a href="{{ url_route("advs::extendAll") }}?unpublished=1" class="btn btn-warning text-white">
{{ trans('visiosoft.module.profile::button.extend_unpublished') }}
</a>
{% endif %}
</div>
<div class="tab-content py-3 px-3 px-sm-0" id="nav-tabContent">

View File

@ -56,7 +56,9 @@
</div>
<div class="pt-2 d-flex flex-column flex-sm-row d-sm-block m-auto m-sm-0">
<p class="mb-1 username">{{ user.name }}</p>
<p class="mb-1 last-login d-flex d-sm-block m-auto m-sm-0">{{ auth_user().last_login_at|date("d.m.Y - H:i") }}</p>
<p class="mb-1 last-login d-flex d-sm-block m-auto m-sm-0">
{{ auth_user().last_login_at|date(config_get('streams::datetime.date_format') ~ ' - ' ~ config_get('streams::datetime.time_format')) }}
</p>
</div>
</div>
<div class="mt-4">
@ -146,7 +148,7 @@
<label class="control-label font-weight-bold">
{{ trans("visiosoft.module.profile::field.birthday.name") }}
</label>
{{ profileForm.fields.birthday.configSet('date_format','d.m.Y').setPlaceholder(now|date('d.m.Y')).input|raw }}
{{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date(config_get('streams::datetime.date_format'))).input|raw }}
</div>
</div>
<div class="col-md-6">
@ -221,7 +223,6 @@
</div>
{{ profileForm.close()|raw }}
</div>
</div>
<div class="tab-pane fade" id="nav-password" role="tabpanel" aria-labelledby="nav-password-tab">
{% set passwordForm = form('updatePassword').get() %}