Skip to content

Commit

Permalink
fix some problems
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Gard committed Nov 29, 2023
1 parent 33912bc commit f43e88b
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 26 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Admin/ProductController.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function update(ProductSaveRequest $request, Product $product)
$this->createOrUpdate($product, $request);
logAdmin(__METHOD__, Product::class, $product->id);
if ($request->ajax()) {
return ['OK' => true, 'msg' => $product->name . ' ' . __('updated successfully')];
return ['OK' => true, 'msg' => $product->name . ' ' . __('updated successfully'),'data' => $product,'link' => route('admin.product.update',$product->slug)];
} else {
return redirect()->route('admin.product.index')->with(['message' => $product->name . ' ' . __('updated successfully')]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/WebsiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function search(Request $request)

public function post(Post $post)
{
$comments = $post->comments()->paginate(15);
$comments = $post->comments()->paginate(16);
$sld = Slider::inRandomOrder()->first();
return view('website.post', compact('post', 'comments', 'sld'));
}
Expand Down
7 changes: 6 additions & 1 deletion public/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -10153,7 +10153,7 @@ aside .form-check {
background: #fff;
}

#top .logo {
#top-top .logo {
max-height: 65px;
max-width: 100%;
float: right;
Expand Down Expand Up @@ -10332,6 +10332,11 @@ aside .form-check {
font-size: 15px;
margin-top: 1rem;
text-align: center;
overflow: hidden;
white-space: nowrap;
max-width: 95%;
text-overflow: ellipsis;

color: #444;
}

Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion resources/js/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ $(function () {
if (res.data.url != undefined) {
window.location.href = res.data.url;
} else {
alertify.success(res.data.msg);
if (res.data.link !== undefined){
$("#saveProduct").attr('action',res.data.link)
}
if ($("#price-amount").val().trim() !== '') {
window.location.reload();
}
Expand Down
7 changes: 6 additions & 1 deletion resources/theme/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ aside .form-check {
background: #fff;
}

#top .logo {
#top-top .logo {
max-height: 65px;
max-width: 100%;
float: right;
Expand Down Expand Up @@ -363,6 +363,11 @@ aside .form-check {
font-size: 15px;
margin-top: 1rem;
text-align: center;
overflow: hidden;
white-space: nowrap;
max-width: 95%;
text-overflow: ellipsis;

color: #444;
}

Expand Down
28 changes: 16 additions & 12 deletions resources/views/website/component/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,22 @@
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-12 text-start">
<div class='marquee'>
<div class="row mt-2 pt-1" >
<a class="col" href="tel:{{\App\Helpers\getSetting('tel')}}">
<i class="fa fa-phone-alt"></i>
{{\App\Helpers\getSetting('tel')}}
</a>
<a class="col" href="mail:{{\App\Helpers\getSetting('email')}}">
<i class="fa fa-envelope"></i>
{{\App\Helpers\getSetting('email')}}
</a>
</div>
</div>
{{-- <div class='marquee'>--}}
{{-- <div class="row mt-2 pt-1" >--}}
{{-- <a class="col" href="tel:{{\App\Helpers\getSetting('tel')}}">--}}
{{-- <i class="fa fa-phone-alt"></i>--}}
{{-- {{\App\Helpers\getSetting('tel')}}--}}
{{-- </a>--}}
{{-- <a class="col" href="mail:{{\App\Helpers\getSetting('email')}}">--}}
{{-- <i class="fa fa-envelope"></i>--}}
{{-- {{\App\Helpers\getSetting('email')}}--}}
{{-- </a>--}}
{{-- </div>--}}
{{-- </div>--}}

<a href="/">
<img src="{{asset('images/logo.png')}}" class="logo" alt="">
</a>

</div>
<div class="col-lg-4 col-md-6">
Expand Down
5 changes: 0 additions & 5 deletions resources/views/website/component/navbar.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<nav>
<ul id="mega-menu">
<li>
<a href="/">
<img src="{{asset('images/logo.png')}}" class="logo" alt="">
</a>
</li>
@foreach(\App\Helpers\getMainCats(4) as $mcat)
<li>
<a href="{{route('cat',$mcat->slug)}}">
Expand Down
6 changes: 3 additions & 3 deletions resources/views/website/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ class="add-to-card btn btn-primary btn-block mt-2 mb-2">
<section id="new-products" class="mt-5 long-box">
<div class="container pt-4 pb-4">
<h1 class="mb-4">
<a href="{{route('products')}}" class="float-end btn btn-outline-primary">
همه محصولات
</a>
{{\App\Helpers\getSetting('sectext')}}
</h1>
<div id="owl1" class="owl-carousel owl-theme owl1">
Expand Down Expand Up @@ -114,9 +117,6 @@ class="add-to-card btn btn-primary btn-block mt-2 mb-2 corner">
@endforeach

</div>
<a href="{{route('products')}}" class="float-end btn btn-outline-primary">
همه محصولات
</a>
<br>
<br>
</div>
Expand Down

0 comments on commit f43e88b

Please sign in to comment.