Merge pull request #67 from openclassify/vedat

Vedat
This commit is contained in:
Fatih Alp 2019-08-16 13:29:07 +03:00 committed by GitHub
commit 7079a1aef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 319 additions and 228 deletions

View File

@ -213,4 +213,7 @@ return [
'my_ads' => [ 'my_ads' => [
'name' => 'My Ads', 'name' => 'My Ads',
], ],
'sold_out' => [
'name' => 'Sold out',
],
]; ];

View File

@ -261,5 +261,8 @@
"name" => "Reklamlarım", "name" => "Reklamlarım",
], ],
'sold_out' => [
'name' => 'Tükendi',
],
]; ];

View File

@ -308,7 +308,11 @@
<!-- item-image --> <!-- item-image -->
<div class="item-image-box col-sm-4"> <div class="item-image-box col-sm-4">
<div class="item-image"> <div class="item-image">
<a href="{{ advs.detail_url }}"><img <a href="{{ advs.detail_url }}">
{% if adv.is_get_adv == "1" and adv.stock == "0" and entries('advs').isEnabled('carts') %}
<div class="corner-ribbon top-right sticky blue">{{ trans('visiosoft.module.advs::field.sold_out.name') }}</div>
{% endif %}
<img
src="{{ advs.cover_photo }}" alt="Image" src="{{ advs.cover_photo }}" alt="Image"
class="img-responsive"></a> class="img-responsive"></a>
</div><!-- item-image --> </div><!-- item-image -->

View File

@ -86,6 +86,9 @@
<div class="item-image"> <div class="item-image">
<a href="{{ adv.detail_url }}"> <a href="{{ adv.detail_url }}">
{% set advPhoto = adv.cover_photo %} {% set advPhoto = adv.cover_photo %}
{% if adv.is_get_adv == "1" and adv.stock == "0" and entries('advs').isEnabled('carts') %}
<div class="corner-ribbon top-right sticky blue">{{ trans('visiosoft.module.advs::field.sold_out.name') }}</div>
{% endif %}
<img src="{{ adv.cover_photo }}" alt="Image" class="img-responsive"></a> <img src="{{ adv.cover_photo }}" alt="Image" class="img-responsive"></a>
</div><!-- item-image --> </div><!-- item-image -->
</div> </div>
@ -144,6 +147,9 @@
<div class="item-image"> <div class="item-image">
<a href="{{ adv.detail_url }}"> <a href="{{ adv.detail_url }}">
{% set advPhoto = adv.cover_photo %} {% set advPhoto = adv.cover_photo %}
{% if adv.is_get_adv == "1" and adv.stock == "0" and entries('advs').isEnabled('carts') %}
<div class="corner-ribbon top-right sticky blue">{{ trans('visiosoft.module.advs::field.sold_out.name') }}</div>
{% endif %}
<img src="{{ adv.cover_photo }}" alt="Image" class="img-responsive"></a> <img src="{{ adv.cover_photo }}" alt="Image" class="img-responsive"></a>
</div><!-- item-image --> </div><!-- item-image -->
</div> </div>

View File

@ -8,6 +8,7 @@ use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel; use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel; use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
use Illuminate\Filesystem\Filesystem; use Illuminate\Filesystem\Filesystem;
use Illuminate\Http\Request;
use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery; use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery;
use Visiosoft\AdvsModule\Adv\Table\Filter\CityFilterQuery; use Visiosoft\AdvsModule\Adv\Table\Filter\CityFilterQuery;
use Visiosoft\AdvsModule\Adv\Table\Filter\UserFilterQuery; use Visiosoft\AdvsModule\Adv\Table\Filter\UserFilterQuery;
@ -172,11 +173,44 @@ class AdvsController extends AdminController
return back(); return back();
} }
public function assetsClear(Filesystem $files, Application $application) public function assetsClear(Filesystem $files, Application $application, Request $request)
{ {
$directory = 'assets'; $directory = 'assets';
$files->deleteDirectory($directory = $application->getAssetsPath($directory), true); $files->deleteDirectory($directory = $application->getAssetsPath($directory), true);
echo "<h1>Success</h1>" . "<br>"; echo "<div class=\"bar\"></div>" . "<br>";
echo "<a href='/admin'><b>Return Admin Panel</b></a>"; echo "<style>
.bar {
width: 30%;
height: 20px;
border: 1px solid #2980b9;
border-radius: 3px;
background-image:
repeating-linear-gradient(
-45deg,
#2980b9,
#2980b9 11px,
#eee 10px,
#eee 20px /* determines size */
);
background-size: 28px 28px;
animation: move .5s linear infinite;
}
@keyframes move {
0% {
background-position: 0 0;
}
100% {
background-position: 28px 0;
}
}
</style>
<script>
location.href = '" . $request->server('HTTP_REFERER') . "';
</script>
<a href='" . $request->server('HTTP_REFERER') . "'><b>Return Back</b></a>";
echo "<br><a href='/admin'><b>Return Admin Panel</b></a>";
} }
} }

View File

@ -5986,3 +5986,31 @@ input[name="username"] {
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
} }
.corner-ribbon {
width: 78px;
background: #e43;
position: absolute;
top: 2px;
left: -50px;
z-index: 99;
text-align: center;
line-height: 26px;
letter-spacing: 1px;
color: #f0f0f0;
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
overflow: hidden;
}
.corner-ribbon.shadow {
box-shadow: 0 0 3px rgba(0, 0, 0, .3);
}
.corner-ribbon.top-right {
right: -4px;
left: auto;
transform: rotate(45deg);
-webkit-transform: rotate(0deg);
overflow: hidden;
}

View File

@ -113,7 +113,11 @@
{% for adv in doping_advs %} {% for adv in doping_advs %}
<div class="featured"> <div class="featured">
<div class="featured-image"> <div class="featured-image">
<a href="{{ adv.detail_url }}"><img <a href="{{ adv.detail_url }}">
{% if adv.is_get_adv == "1" and adv.stock == "0" and entries('advs').isEnabled('carts') %}
<div class="corner-ribbon top-right sticky blue">{{ trans('visiosoft.module.advs::field.sold_out.name') }}</div>
{% endif %}
<img
src="{{ adv.cover_photo }}" src="{{ adv.cover_photo }}"
alt="{{ substr(adv.name,0,25) }}" alt="{{ substr(adv.name,0,25) }}"
class="img-respocive"></a> class="img-respocive"></a>
@ -145,7 +149,7 @@
</div> </div>
<!-- item-info-right --> <!-- item-info-right -->
<div class="user-option pull-right"> <div class="user-option pull-right">
{% if adv.is_get_adv == "1" %} {% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top" <a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
class="fa fa-shopping-cart"></i> </a> class="fa fa-shopping-cart"></i> </a>
@ -203,7 +207,11 @@
<div class="item-image-box col-sm-4"> <div class="item-image-box col-sm-4">
<!-- item-image --> <!-- item-image -->
<div class="item-image"> <div class="item-image">
<a href="{{ adv.detail_url }}"><img <a href="{{ adv.detail_url }}">
{% if adv.is_get_adv == "1" and adv.stock == "0" and entries('advs').isEnabled('carts') %}
<div class="corner-ribbon top-right sticky blue">{{ trans('visiosoft.module.advs::field.sold_out.name') }}</div>
{% endif %}
<img
src="{{ adv.cover_photo }}" alt="{{ adv.name }}" src="{{ adv.cover_photo }}" alt="{{ adv.name }}"
class="img-respocive"></a> class="img-respocive"></a>
</div><!-- item-image --> </div><!-- item-image -->
@ -234,7 +242,7 @@
</div> </div>
<!-- item-info-right --> <!-- item-info-right -->
<div class="user-option pull-right"> <div class="user-option pull-right">
{% if adv.is_get_adv == "1" %} {% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top" <a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
title="{{ adv.city_name }}, {{ adv.country_name }}"><i title="{{ adv.city_name }}, {{ adv.country_name }}"><i
class="fa fa-shopping-cart"></i> </a> class="fa fa-shopping-cart"></i> </a>
@ -259,13 +267,17 @@
<div class="item-image-box col-sm-4"> <div class="item-image-box col-sm-4">
<!-- item-image --> <!-- item-image -->
<div class="item-image"> <div class="item-image">
<a href="{{ adv.detail_url }}"><img <a href="{{ adv.detail_url }}">
{% if adv.is_get_adv == "1" and adv.stock == "0" and entries('advs').isEnabled('carts') %}
<div class="corner-ribbon top-right sticky blue">{{ trans('visiosoft.module.advs::field.sold_out.name') }}</div>
{% endif %}
<img
src="{{ adv.cover_photo }}" alt="{{ adv.name }}" src="{{ adv.cover_photo }}" alt="{{ adv.name }}"
class="img-respocive"></a> class="img-respocive"></a>
{% if adv.is_get_adv == "1" %} {% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
<a href="#" class="verified" data-toggle="tooltip" <a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
data-placement="top" title="Get ilanı"><i title="Get ilanı"><i
class="fa fa-check-square-o"></i></a> class="fa fa-check-square-o"></i></a>
{% endif %} {% endif %}
</div><!-- item-image --> </div><!-- item-image -->
@ -296,7 +308,7 @@
</div> </div>
<!-- item-info-right --> <!-- item-info-right -->
<div class="user-option pull-right"> <div class="user-option pull-right">
{% if adv.is_get_adv == "1" %} {% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
<a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top" <a href="{{ url_route('adv_AddCart',[adv.id]) }}" data-toggle="tooltip" data-placement="top"
title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i title="{{ trans('visiosoft.module.advs::field.online_shopping') }}"><i
class="fa fa-shopping-cart"></i> </a> class="fa fa-shopping-cart"></i> </a>

View File

@ -119,7 +119,8 @@
{% if entries('advs').isEnabled('carts') %} {% if entries('advs').isEnabled('carts') %}
{% set cart_items = entries('carts').get()[0].getCart() %} {% set cart_items = entries('carts').getCart() %}
{% set cart = entries('carts').get()[0] %}
<li class="dropdown"> <li class="dropdown">
<a data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <a data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-shopping-cart"></i> {{ cart_items.quantity }}<span <i class="fa fa-shopping-cart"></i> {{ cart_items.quantity }}<span
@ -147,7 +148,7 @@
{% endfor %} {% endfor %}
<li class="cart-footer"> <li class="cart-footer">
<span class="lighter-text">{{ trans('visiosoft.module.advs::field.total') }}:</span> <span class="lighter-text">{{ trans('visiosoft.module.advs::field.total') }}:</span>
<span class="total-color-text">{% if cart_items is null %}0{% else %}{{ cart_items.subtotal }}{% endif %}</span> <span class="total-color-text">{% if cart_items is null %}0{% else %}{{ cart.subtotal.currency }}{% endif %}</span>
</li> </li>
<!--items cart--> <!--items cart-->
<li><span><a class="text-center cart-view-button" <li><span><a class="text-center cart-view-button"