client-update
changes changes1 page-changes lock color changes-2 footer page toggle-remove display-dropdown changes card-changes card changes-button chnages-article pages page-404-fix breadcrumbs-fix remove drop-down Apply fixes from StyleCI buttons fixes existing-fix changes-3 Apply fixes from StyleCI changes-4
This commit is contained in:
58
resources/views/themes/default1/client/kb/article-list/articles.blade.php
Normal file → Executable file
58
resources/views/themes/default1/client/kb/article-list/articles.blade.php
Normal file → Executable file
@@ -7,47 +7,61 @@
|
||||
@section('kb')
|
||||
class = "nav-item active"
|
||||
@stop
|
||||
@section('breadcrumb')
|
||||
{{--<div class="site-hero clearfix">--}}
|
||||
<ol class="breadcrumb float-sm-right ">
|
||||
<style>
|
||||
.words {
|
||||
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */
|
||||
}
|
||||
</style>
|
||||
<li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
||||
<li><a class="words" href="{!! URL::route('home') !!}">{!! Lang::get('lang.knowledge_base') !!}</a></li>
|
||||
<li class="words">></li>
|
||||
<li><a href="{!! URL::route('article-list') !!}">{!! Lang::get('lang.article_list') !!}</a></li>
|
||||
</ol>
|
||||
|
||||
@stop
|
||||
@section('content')
|
||||
|
||||
<div id="content" class="site-content col-md-9">
|
||||
|
||||
|
||||
<div class="archive-list archive-article" >
|
||||
|
||||
|
||||
@foreach($article as $arti)
|
||||
<article class="hentry">
|
||||
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
||||
<i class="fa fa-list-alt fa-2x fa-fw float-left text-muted"></i>
|
||||
|
||||
|
||||
<h2 class="entry-title h4">
|
||||
|
||||
<a href="{{url('show/'.$arti->slug)}}" onclick="toggle_visibility('foo');">{{$arti->name}}</a>
|
||||
</h2>
|
||||
</header>
|
||||
</header>
|
||||
|
||||
<?php $str = $arti->description; ?>
|
||||
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 200); ?>
|
||||
|
||||
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 200); ?>
|
||||
|
||||
<blockquote class="blockquote archive-description" id="block" style="margin-bottom: 10px; margin-top: 10px;">
|
||||
|
||||
|
||||
<?php $content = trim(preg_replace("/<img[^>]+\>/i", "", $excerpt), " \t.") ?>
|
||||
{!! strip_tags($content) !!}
|
||||
|
||||
<p><a href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
<footer class="entry-footer">
|
||||
|
||||
|
||||
<div class="entry-meta text-muted">
|
||||
|
||||
<span style="margin-right:0px;"><i class="far fa-clock fa-fw"></i>
|
||||
|
||||
<span style="margin-right:0px;"><i class="far fa-clock fa-fw"></i>
|
||||
|
||||
<span>{{$arti->created_at->format('l, d-m-Y')}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
</article>
|
||||
@endforeach
|
||||
|
||||
@@ -63,20 +77,20 @@
|
||||
<div id="sidebar" class="site-sidebar col-md-3">
|
||||
|
||||
<div class="col-sm-12">
|
||||
|
||||
|
||||
<div class="widget-area">
|
||||
|
||||
|
||||
<section id="section-categories" class="section">
|
||||
|
||||
|
||||
<h2 class="section-title h4 clearfix">
|
||||
|
||||
<i class="line"></i>{!! Lang::get('lang.categories') !!}
|
||||
|
||||
<b> <i class="line" style="border-color: rgb(0, 154, 186);"></i>{!! Lang::get('lang.categories') !!}</b>
|
||||
|
||||
<small class="float-right"><i class="far fa-hdd fa-fw"></i></small>
|
||||
</h2>
|
||||
|
||||
<ul class="nav nav-pills nav-stacked nav-categories">
|
||||
|
||||
|
||||
@foreach($categorys as $category)
|
||||
<?php
|
||||
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
|
||||
@@ -85,9 +99,9 @@
|
||||
?>
|
||||
|
||||
<li class="d-flex justify-content-between align-items-center">
|
||||
|
||||
|
||||
<a href="{{url('category-list/'.$category->slug)}}" class="list-group-item list-group-item-action" style="padding: 5px;">
|
||||
|
||||
|
||||
<span class="badge badge-pill float-right" style="margin-top: 2px;">{{$numcount}}</span>
|
||||
|
||||
{{$category->name}}
|
||||
|
||||
@@ -8,6 +8,24 @@
|
||||
@section('kb')
|
||||
class = "nav-item active"
|
||||
@stop
|
||||
@section('breadcrumb')
|
||||
{{-- <div class="site-hero clearfix">--}}
|
||||
<ol class="breadcrumb float-sm-right ">
|
||||
<style>
|
||||
.words {
|
||||
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */
|
||||
}
|
||||
</style>
|
||||
<li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
||||
<li><a class="words" href="{!! URL::route('home') !!}">{!! Lang::get('lang.knowledge_base') !!}</a></li>
|
||||
<li class="words">></li>
|
||||
<li><a class="words" href="{!! URL::route('category-list') !!}">{!! Lang::get('lang.category') !!}</a></li>
|
||||
<li class="words">></li>
|
||||
<li><a class="words"href="{!! URL::route('category-list') !!}">{!! Lang::get('lang.category_list') !!}</a></li>
|
||||
|
||||
</ol>
|
||||
{{-- </div>--}}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="content" class="site-content col-md-9">
|
||||
@@ -30,11 +48,11 @@ class = "nav-item active"
|
||||
@forelse($article as $arti)
|
||||
|
||||
<article class="hentry">
|
||||
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
||||
<i class="fa fa-list-alt fa-2x fa-fw float-left text-muted"></i>
|
||||
|
||||
|
||||
<h2 class="entry-title h4">
|
||||
|
||||
<a href="{{url('show/'.$arti->slug)}}" onclick="toggle_visibility('foo');">{{$arti->name}}</a>
|
||||
@@ -45,7 +63,7 @@ class = "nav-item active"
|
||||
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 400); ?>
|
||||
|
||||
<blockquote class="blockquote archive-description" id="block" style="margin-bottom: 10px; margin-top: 10px;">
|
||||
|
||||
|
||||
<?php $content = trim(preg_replace("/<img[^>]+\>/i", "", $excerpt), " \t.") ?>
|
||||
<p>{!! strip_tags($content) !!}</p>
|
||||
|
||||
@@ -53,15 +71,15 @@ class = "nav-item active"
|
||||
</blockquote>
|
||||
|
||||
<footer class="entry-footer">
|
||||
|
||||
|
||||
<div class="entry-meta text-muted">
|
||||
|
||||
<span style="margin-right:0px;"><i class="far fa-clock fa-fw"></i>
|
||||
|
||||
<span style="margin-right:0px;"><i class="far fa-clock fa-fw"></i>
|
||||
|
||||
<span>{{$arti->created_at->format('l, d-m-Y')}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
</article>
|
||||
@empty
|
||||
<p>No articles available</p>
|
||||
@@ -91,20 +109,18 @@ class = "nav-item active"
|
||||
<div id="sidebar" class="site-sidebar col-md-3">
|
||||
|
||||
<div class="col-sm-12">
|
||||
|
||||
<div class="widget-area">
|
||||
|
||||
|
||||
<section id="section-categories" class="section">
|
||||
|
||||
|
||||
<h2 class="section-title h4 clearfix">
|
||||
|
||||
<i class="line"></i>{!! Lang::get('lang.categories') !!}
|
||||
|
||||
<b> <i class="line" style="border-color: rgb(0, 154, 186);"></i>{!! Lang::get('lang.categories') !!}</b>
|
||||
<small class="float-right"><i class="far fa-hdd fa-fw"></i></small>
|
||||
</h2>
|
||||
|
||||
<ul class="nav nav-pills nav-stacked nav-categories">
|
||||
|
||||
|
||||
@foreach($categorys as $category)
|
||||
<?php
|
||||
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
|
||||
@@ -113,9 +129,9 @@ class = "nav-item active"
|
||||
?>
|
||||
|
||||
<li class="d-flex justify-content-between align-items-center">
|
||||
|
||||
|
||||
<a href="{{url('category-list/'.$category->slug)}}" class="list-group-item list-group-item-action" style="padding: 5px;">
|
||||
|
||||
|
||||
<span class="badge badge-pill float-right" style="margin-top: 2px;">{{$numcount}}</span>
|
||||
|
||||
{{$category->name}}
|
||||
|
||||
@@ -8,10 +8,25 @@ Category List -
|
||||
class = "nav-item active"
|
||||
@stop
|
||||
|
||||
@section('breadcrumb')
|
||||
{{-- <div class="site-hero clearfix">--}}
|
||||
<ol class="breadcrumb float-sm-right ">
|
||||
<style>
|
||||
.words {
|
||||
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */
|
||||
}
|
||||
</style>
|
||||
<li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
||||
<li><a class="words" href="{!! URL::route('home') !!}">{!! Lang::get('lang.knowledge_base') !!}</a></li>
|
||||
<li class="words">></li>
|
||||
<li><a href="{!! URL::route('category-list') !!}">{!! Lang::get('lang.category') !!}</a></li>
|
||||
</ol>
|
||||
{{-- </div>--}}
|
||||
@stop
|
||||
@section('content')
|
||||
|
||||
<div id="content" class="site-content col-md-12">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
@foreach($categorys as $category)
|
||||
@@ -24,18 +39,17 @@ class = "nav-item active"
|
||||
?>
|
||||
|
||||
<section class="box-categories">
|
||||
|
||||
|
||||
<h1 class="section-title h4 clearfix">
|
||||
|
||||
<i class="line"></i>
|
||||
|
||||
|
||||
<i class="far fa-folder-open fa-fw text-muted"></i>
|
||||
|
||||
<small class="float-right">
|
||||
|
||||
|
||||
<a href="{{url('category-list/'.$category->slug)}}"><i class="far fa-hdd fa-fw"></i>({{count($all)}})</a>
|
||||
</small>
|
||||
|
||||
|
||||
<a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a>
|
||||
</h1>
|
||||
|
||||
@@ -54,25 +68,26 @@ class = "nav-item active"
|
||||
?>
|
||||
@forelse($article as $arti)
|
||||
<li>
|
||||
|
||||
|
||||
<h3 class="h5" style="text-align:left">
|
||||
|
||||
|
||||
<i class="fa-li fa fa-list-alt fa-fw text-muted"></i>
|
||||
|
||||
|
||||
<a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a>
|
||||
|
||||
</h3>
|
||||
</li>
|
||||
@empty
|
||||
<p>{!! Lang::get('lang.no_article') !!}</p>
|
||||
{{-- <p>{!! Lang::get('lang.no_article') !!}</p>--}}
|
||||
@endforelse
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<p class="more-link text-center"><a href="{{url('category-list/'.$category->slug)}}" class="btn btn-custom btn-sm">{!! Lang::get('lang.view_all') !!}</a></p>
|
||||
<p class="more-link text-center"><a href="{{url('category-list/'.$category->slug)}}" class="btn btn-custom btn-sm" style="background-color: #009aba; hov: #00c0ef; color: #fff ">{!! Lang::get('lang.view_all') !!}</a></p>
|
||||
</section>
|
||||
</div>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end of page content -->
|
||||
@stop
|
||||
|
||||
59
resources/views/themes/default1/client/kb/article-list/home.blade.php
Normal file → Executable file
59
resources/views/themes/default1/client/kb/article-list/home.blade.php
Normal file → Executable file
@@ -3,7 +3,14 @@
|
||||
@section('title')
|
||||
Knowledge Base -
|
||||
@stop
|
||||
@section('breadcrumb')
|
||||
{{--<div class="site-hero clearfix">--}}
|
||||
<ol class="breadcrumb float-sm-right ">
|
||||
<li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
||||
<li><a href="{!! URL::route('home') !!}">{!! Lang::get('lang.knowledge_base') !!}</a></li>
|
||||
</ol>
|
||||
|
||||
@stop
|
||||
@section('kb')
|
||||
class = "nav-item active"
|
||||
@stop
|
||||
@@ -43,18 +50,18 @@ class = "nav-item active"
|
||||
<div class="col-md-6">
|
||||
|
||||
<section class="box-categories">
|
||||
|
||||
|
||||
<h1 class="section-title h4 clearfix">
|
||||
|
||||
<i class="line"></i>
|
||||
|
||||
<i class="line" style="border-color: rgb(0, 154, 186);"></i>
|
||||
|
||||
<i class="far fa-folder-open fa-fw text-muted"></i>
|
||||
|
||||
|
||||
<small class="float-right">
|
||||
|
||||
|
||||
<a href="{{url('category-list/'.$category->slug)}}"><i class="far fa-hdd fa-fw"></i>({{count($all)}})</a>
|
||||
</small>
|
||||
|
||||
|
||||
<a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a>
|
||||
</h1>
|
||||
|
||||
@@ -81,38 +88,38 @@ class = "nav-item active"
|
||||
?>
|
||||
@forelse($article as $arti)
|
||||
<li>
|
||||
|
||||
|
||||
<h3 class="h5" style="text-align:left">
|
||||
|
||||
|
||||
<i class="fa-li fa fa-list-alt fa-fw text-muted"></i>
|
||||
|
||||
|
||||
<a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a>
|
||||
|
||||
</h3>
|
||||
</li>
|
||||
@empty
|
||||
<p>{!! Lang::get('lang.no_article') !!}</p>
|
||||
{{-- <p>{!! Lang::get('lang.no_article') !!}</p>--}}
|
||||
@endforelse
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<p class="more-link text-center"><a href="{{url('category-list/'.$category->slug)}}" class="btn btn-custom btn-sm">{!! Lang::get('lang.view_all') !!}</a></p>
|
||||
<p class="more-link text-center"><a href="{{url('category-list/'.$category->slug)}}" class="btn btn-custom btn-sm" style="background-color: #009aba; hov: #00c0ef; color: #fff ">{!! Lang::get('lang.view_all') !!}</a></p>
|
||||
</section>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
|
||||
|
||||
<div class="banner-wrapper banner-horizontal clearfix" style="background: none;">
|
||||
|
||||
|
||||
<h4 style="font-size: 15px;" class="banner-title h3">{!! Lang::get('lang.need_more_support') !!}?</h4>
|
||||
|
||||
|
||||
<div class="banner-content">
|
||||
|
||||
|
||||
<p>{!! Lang::get('lang.if_you_did_not_find_an_answer_please_raise_a_ticket_describing_the_issue') !!}.</p>
|
||||
</div>
|
||||
|
||||
<p><a href="{!! URL::route('form') !!}" class="btn btn-custom">{!! Lang::get('lang.submit_a_ticket') !!}</a></p>
|
||||
|
||||
<p><a style="background-color: #009aba; hov: #00c0ef; color: #fff " href="{!! URL::route('form') !!}" class="btn btn-custom">{!! Lang::get('lang.submit_a_ticket') !!}</a></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -123,20 +130,20 @@ class = "nav-item active"
|
||||
<div id="sidebar" class="site-sidebar col-md-3">
|
||||
|
||||
<div class="col-sm-12">
|
||||
|
||||
|
||||
<div class="widget-area">
|
||||
|
||||
<section id="section-categories" class="section">
|
||||
|
||||
|
||||
<section id="section-categories" class="categories">
|
||||
|
||||
<h2 class="section-title h4 clearfix">
|
||||
|
||||
<i class="line"></i>{!! Lang::get('lang.categories') !!}
|
||||
|
||||
<b> <i class="line"></i>{!! Lang::get('lang.categories') !!}</b>
|
||||
|
||||
<small class="float-right"><i class="far fa-hdd fa-fw"></i></small>
|
||||
</h2>
|
||||
|
||||
<ul class="nav nav-pills nav-stacked nav-categories">
|
||||
|
||||
|
||||
@foreach($categorys as $category)
|
||||
<?php
|
||||
$num = \App\Model\kb\Relationship::where('category_id', '=', $category->id)->get();
|
||||
@@ -145,9 +152,9 @@ class = "nav-item active"
|
||||
?>
|
||||
|
||||
<li class="d-flex justify-content-between align-items-center">
|
||||
|
||||
|
||||
<a href="{{url('category-list/'.$category->slug)}}" class="list-group-item list-group-item-action" style="padding: 5px;">
|
||||
|
||||
|
||||
<span class="badge badge-pill float-right" style="margin-top: 2px;">{{$numcount}}</span>
|
||||
|
||||
{{$category->name}}
|
||||
|
||||
@@ -3,25 +3,42 @@
|
||||
@section('title')
|
||||
Pages List -
|
||||
@stop
|
||||
@section('breadcrumb')
|
||||
{{--<div class="site-hero clearfix">--}}
|
||||
<ol class="breadcrumb float-sm-right ">
|
||||
<style>
|
||||
.words {
|
||||
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */
|
||||
}
|
||||
</style>
|
||||
<li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
||||
<li><a class="words" href="{!! URL::route('home') !!}">{!! Lang::get('lang.knowledge_base') !!}</a></li>
|
||||
<li class="words">></li>
|
||||
<li><a class="words" href="{{url('pages/'.$page->slug)}}">{!! Lang::get('lang.pages') !!}</a></li>
|
||||
<li class="words" style="margin-right: 10px">></li>
|
||||
<li> {{$page->name}}</li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
@stop
|
||||
@section('pages')
|
||||
class = "nav-item active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<div id="content" class="site-content col-sm-12">
|
||||
|
||||
|
||||
<article class="hentry">
|
||||
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
||||
<h1 class="entry-title">{{$page->name}}</h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content clearfix">
|
||||
|
||||
{!! $page->description !!}
|
||||
|
||||
{!! $page->description !!}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
@@ -1,62 +1,89 @@
|
||||
@extends('themes.default1.client.layout.client')
|
||||
@section('breadcrumb')
|
||||
<div class="site-hero">
|
||||
<ol class="breadcrumb breadcrumb-custom">
|
||||
<li class="text">You are here: </li>
|
||||
<li>Home</li>
|
||||
<li class="active">Search Results</li>
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<style>
|
||||
.words {
|
||||
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */
|
||||
}
|
||||
</style>
|
||||
<li class="breadcrumb-item">
|
||||
<i class="fas fa-home"></i> {!! Lang::get('lang.you_are_here') !!} :
|
||||
</li>
|
||||
<li>
|
||||
<a class="words" href="{!! URL::route('/') !!}">{!! Lang::get('lang.home') !!}</a>
|
||||
</li>
|
||||
<li class="words">></li>
|
||||
<li>
|
||||
<a href="{!! URL::route('client.search') !!}">{!! Lang::get('lang.search_result') !!}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="content" class="site-content col-md-9">
|
||||
@forelse($result as $arti)
|
||||
<article class="format-standard type-post hentry clearfix">
|
||||
<div id="content" class="site-content col-md-9">
|
||||
@if ($result->isEmpty() || $result->every(function($arti) { return $arti->type == 0; }))
|
||||
<p>
|
||||
<h3><b>Sorry!</b></h3> No results found.
|
||||
</p>
|
||||
@else
|
||||
@foreach($result as $arti)
|
||||
@if ($arti->type != 0)
|
||||
<article class="format-standard type-post hentry clearfix">
|
||||
<header class="clearfix">
|
||||
<h3 class="post-title">
|
||||
<small><i class="fa fa-list-alt fa-2x fa-fw pull-left text-muted"></i></small>
|
||||
<a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a>
|
||||
</h3>
|
||||
</header>
|
||||
<?php $str = $arti->description ?>
|
||||
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 200) ?>
|
||||
<blockquote class="archive-description">
|
||||
<p>{!! strip_tags($excerpt) !!} </p>
|
||||
<a class="readmore-link" href="{{url('show/'.$arti->slug)}}">Read more</a>
|
||||
</blockquote>
|
||||
<div class="post-meta clearfix">
|
||||
<span class="date"><i class="fa fa-clock-o fa-fw"></i> {{$arti->created_at->format('l, d-m-Y')}}</span>
|
||||
</div><!-- end of post meta -->
|
||||
<hr>
|
||||
</article>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<header class="clearfix">
|
||||
<h3 class="post-title">
|
||||
<small><i class="fa fa-list-alt fa-2x fa-fw pull-left text-muted"></i></small>
|
||||
<a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a>
|
||||
</h3>
|
||||
|
||||
</header>
|
||||
<?php $str = $arti->description ?>
|
||||
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 200) ?>
|
||||
<blockquote class="archive-description">
|
||||
<p>{!! strip_tags($excerpt) !!} </p>
|
||||
<a class="readmore-link" href="{{url('show/'.$arti->slug)}}">Read more</a>
|
||||
</blockquote>
|
||||
|
||||
<div class="post-meta clearfix">
|
||||
<span class="date"><i class="fa fa-clock-o fa-fw"></i> {{$arti->created_at->format('l, d-m-Y')}}</span>
|
||||
</div><!-- end of post meta -->
|
||||
<hr>
|
||||
@empty
|
||||
<p><h3><b>Sorry!</b></h3> No result has found.</p>
|
||||
@endforelse
|
||||
|
||||
</article>
|
||||
<!-- end of page content -->
|
||||
<div class="pagination">
|
||||
<?php echo $result->render(); ?>
|
||||
<div class="pagination">
|
||||
<?php echo $result->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
</div>
|
||||
{{--@section('category')--}}
|
||||
{{--<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>--}}
|
||||
{{--<ul class="nav nav-pills nav-stacked nav-categories">--}}
|
||||
|
||||
@stop
|
||||
{{-- @foreach($categorys as $category)--}}
|
||||
{{--<?php--}}
|
||||
{{--$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();--}}
|
||||
{{--$article_id = $num->pluck('article_id');--}}
|
||||
{{--$numcount = count($article_id);--}}
|
||||
{{--?>--}}
|
||||
{{-- <li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>--}}
|
||||
{{-- @endforeach--}}
|
||||
{{--</ul>--}}
|
||||
{{--@stop--}}
|
||||
</div>
|
||||
|
||||
|
||||
@section('category')
|
||||
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
|
||||
<ul class="nav nav-pills nav-stacked nav-categories">
|
||||
{{--@section('category')--}}
|
||||
{{--<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>--}}
|
||||
{{--<ul class="nav nav-pills nav-stacked nav-categories">--}}
|
||||
|
||||
@foreach($categorys as $category)
|
||||
<?php
|
||||
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
|
||||
$article_id = $num->pluck('article_id');
|
||||
$numcount = count($article_id);
|
||||
?>
|
||||
<li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@stop
|
||||
{{-- @foreach($categorys as $category)--}}
|
||||
{{--<?php--}}
|
||||
{{--$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();--}}
|
||||
{{--$article_id = $num->pluck('article_id');--}}
|
||||
{{--$numcount = count($article_id);--}}
|
||||
{{--?>--}}
|
||||
{{-- <li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>--}}
|
||||
{{-- @endforeach--}}
|
||||
{{--</ul>--}}
|
||||
{{--@stop--}}
|
||||
@@ -19,18 +19,25 @@ $all = App\Model\kb\Relationship::where('article_id','=', $arti->id)->get();
|
||||
/* from whole attribute pick the article_id */
|
||||
$category_id = $all->pluck('category_id')->toArray();
|
||||
?>
|
||||
|
||||
<div class="site-hero clearfix">
|
||||
<ol class="breadcrumb breadcrumb-custom">
|
||||
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
|
||||
@section('breadcrumb')
|
||||
{{--<div class="site-hero clearfix">--}}
|
||||
<ol class="breadcrumb float-sm-right ">
|
||||
<style>
|
||||
.words {
|
||||
margin-right: 10px; /* Adjust the value to increase or decrease the gap between list items */
|
||||
}
|
||||
</style>
|
||||
<li class="breadcrumb-item"> <i class="fas fa-home"> </i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
||||
<?php $category = App\Model\kb\Category::where('id', $category_id)->first(); ?>
|
||||
<li><a href="{{url('/')}}">{!! Lang::get('lang.home') !!}</a></li>
|
||||
<li><a href="{{url('/knowledgebase')}}">{!! Lang::get('lang.knowledge_base') !!}</a></li>
|
||||
<li><a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a></li>
|
||||
<li class="active">{{$arti->name}}</li>
|
||||
</ol>
|
||||
</div>
|
||||
@stop
|
||||
<li><a class="words" href="{!! URL::route('home') !!}">{!! Lang::get('lang.knowledge_base') !!}</a></li>
|
||||
<li class="words">></li>
|
||||
|
||||
<li><a class="words" href="{{url('article-list')}}">{!! Lang::get('lang.article_list') !!}</a></li>
|
||||
<li class="words">></li>
|
||||
<li><a class="words" href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a></li>
|
||||
<li class="words"> > </li>
|
||||
<li class="active">{{$arti->name}}</li> </ol>
|
||||
@stop
|
||||
@section('title')
|
||||
{!! $arti->name !!} -
|
||||
@stop
|
||||
@@ -66,7 +73,19 @@ $category_id = $all->pluck('category_id')->toArray();
|
||||
|
||||
</article><!-- .hentry -->
|
||||
|
||||
<?php $comments = App\Model\kb\Comment::where('article_id', $arti->id)->where('status', '1')->get(); ?>
|
||||
<?php
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
|
||||
|
||||
$comments = App\Model\kb\Comment::where('article_id', $arti->id)
|
||||
->where('status', '1')
|
||||
->orWhere(function ($query) {
|
||||
$query->where('article_id', Auth::id()); // Add this line to include the authenticated user's comment
|
||||
})
|
||||
->get();
|
||||
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area">
|
||||
@foreach($comments as $comment)
|
||||
@@ -99,46 +118,194 @@ $category_id = $all->pluck('category_id')->toArray();
|
||||
</ol><!-- .comment-list -->
|
||||
@endforeach
|
||||
|
||||
<div id="respond" class="comment-respond form-border">
|
||||
{{-- <div id="respond" class="comment-respond form-border">--}}
|
||||
|
||||
{{-- <h3 id="reply-title" class="comment-reply-title section-title">--}}
|
||||
{{-- <i class="line" style="border-color: rgb(0, 154, 186);"<></i>{!! Lang::get('lang.leave_a_reply') !!}--}}
|
||||
{{-- </h3>--}}
|
||||
|
||||
{!! Form::open(['method'=>'post','url'=>'postcomment/'.$arti->slug,'id'=>'comment-form']) !!}
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div id="respond" class="comment-respond form-border">
|
||||
<h3 id="reply-title" class="comment-reply-title section-title">
|
||||
<i class="line" style="border-color: rgb(0, 154, 186);"></i>{!! Lang::get('lang.leave_a_reply') !!}
|
||||
</h3>
|
||||
|
||||
@if(Auth::check())
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4" style="border:#f4f4f4;">
|
||||
<div data-v-43e70d45="" class="banner-wrapper user-data text-center clearfix" id="ban_ner" style="border-width: 5px 1px 1px; border-style: solid; border-color: rgb(0, 154, 186); border-image: initial; width: 90%" >
|
||||
<img id="user_avatar" src="{{Auth::user()->profile_pic}}" class="avatar" alt="User Image" style="margin-left: 5% ">
|
||||
<div STYLE="margin-left:5%"><strong>Hello</strong></div>
|
||||
<p class="banner-title ellipsize_first_name h4" STYLE="margin-left: 5%">{{Auth::user()->first_name." ".Auth::user()->last_name}}</p>
|
||||
<div class="banner-content" id="dropdown_content">
|
||||
<p data-v-43e70d45="">If you are not? </p>
|
||||
<a href="{{url('auth/logout')}}" class="btn btn-custom btn-sm text-white profile_btn" STYLE="width: 50%;height: 200%;margin-left: 7%; background-color: #009aba; hov: #00c0ef; color: #fff">{!! Lang::get('lang.log_out') !!}</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10" style="width: 65%">
|
||||
<div class="form-group {{ $errors->has('comment') ? 'has-error' : '' }}">
|
||||
{!! Form::label('comment',Lang::get('lang.message'),['class' => 'label']) !!}
|
||||
{!! Form::textarea('comment',null,['class' => 'form-control','size' => '30x8','id'=>'comment']) !!}
|
||||
{!! $errors->first('comment', '<spam class="help-block">:message</spam>') !!}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-custom btn-lg float-right" style="background-color: #009aba; hov: #00c0ef; color: #fff">
|
||||
{{ Lang::get('lang.post_message') }}
|
||||
</button>
|
||||
</div>
|
||||
</div><script>
|
||||
function submitComment(userId, comment) {
|
||||
// Prepare the form data
|
||||
var formData = new FormData();
|
||||
formData.append('user_id', userId);
|
||||
formData.append('comment', comment);
|
||||
|
||||
// If the user is not authenticated, include the name and email fields
|
||||
if (!userId) {
|
||||
var name = $("#name").val();
|
||||
var email = $("#email").val();
|
||||
formData.append('name', name);
|
||||
formData.append('email', email);
|
||||
}
|
||||
|
||||
// Perform the AJAX request to submit the comment
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{{ url('postcomment/'.$arti->slug) }}",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(response) {
|
||||
// Handle the success response
|
||||
if (response.success) {
|
||||
alert("Comment posted successfully!");
|
||||
// You can redirect the user to a specific page or perform any other necessary action here
|
||||
} else {
|
||||
alert("An error occurred while processing your request. Please try again.");
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle the error response
|
||||
alert("An error occurred while processing your request. Please try again.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Remove the error styling and message when the user types in the comment field
|
||||
$("#comment").on("input", function() {
|
||||
$(this).removeClass("has-error");
|
||||
$(this).next(".help-block").remove();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script></div>
|
||||
{!! Form::close() !!}
|
||||
@else
|
||||
{!! Form::open(['method'=>'post','url'=>'postcomment/'.$arti->slug,'id'=>'comment-form']) !!}
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('name', Lang::get('lang.name'), ['class' => 'label']) !!}
|
||||
{!! Form::text('name', null, ['class' => 'form-control', 'id' => 'comment-name']) !!}
|
||||
{!! $errors->first('name', '<span class="help-block">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('email', Lang::get('lang.email'), ['class' => 'label']) !!}
|
||||
{!! Form::text('email', null, ['class' => 'form-control', 'id' => 'comment-email']) !!}
|
||||
{!! $errors->first('email', '<span class="help-block">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('website') ? 'has-error' : '' }}">
|
||||
{!! Form::label('website', Lang::get('lang.website'), ['class' => 'label']) !!}
|
||||
{!! Form::text('website', null, ['class' => 'form-control']) !!}
|
||||
{!! $errors->first('website', '<span class="help-block">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-custom btn-lg" style="background-color: #009aba; hov: #00c0ef; color: #fff">{!! Lang::get('lang.post_message') !!}</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="form-group {{ $errors->has('comment') ? 'has-error' : '' }}">
|
||||
{!! Form::label('comment', Lang::get('lang.message'), ['class' => 'label']) !!}
|
||||
{!! Form::textarea('comment', null, ['class' => 'form-control', 'size' => '30x8', 'id' => 'comment-comment']) !!}
|
||||
{!! $errors->first('comment', '<span class="help-block">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 id="reply-title" class="comment-reply-title section-title">
|
||||
<i class="line"></i>{!! Lang::get('lang.leave_a_reply') !!}
|
||||
</h3>
|
||||
|
||||
{!! Form::open(['method'=>'post','url'=>'postcomment/'.$arti->slug]) !!}
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('name',Lang::get('lang.name')) !!}
|
||||
{!! Form::text('name',null,['class' => 'form-control']) !!}
|
||||
{!! $errors->first('name', '<spam class="help-block" style="red">:message</spam>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!}
|
||||
{!! Form::text('email',null,['class' => 'form-control']) !!}
|
||||
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#comment-form").submit(function(event) {
|
||||
event.preventDefault(); // Prevent the form from submitting
|
||||
|
||||
// Remove any existing error messages and reset label colors
|
||||
$(".help-block").remove();
|
||||
$(".form-group").removeClass("has-error");
|
||||
|
||||
// Perform your custom validation here
|
||||
var name = $("#comment-name").val().trim();
|
||||
var email = $("#comment-email").val().trim();
|
||||
var comment = $("#comment-comment").val().trim();
|
||||
|
||||
// Flag to track if there are any errors
|
||||
var hasErrors = false;
|
||||
|
||||
// Check if the name field is empty
|
||||
if (name === "") {
|
||||
$("#comment-name").parent().addClass("has-error");
|
||||
$("#comment-name").after('<span class="help-block">The name field is required.</span>');
|
||||
|
||||
hasErrors = true;
|
||||
}
|
||||
|
||||
// Check if the email field is empty or invalid
|
||||
if (email === "") {
|
||||
$("#comment-email").parent().addClass("has-error");
|
||||
$("#comment-email").after('<span class="help-block">The email field is required.</span>');
|
||||
|
||||
hasErrors = true;
|
||||
}
|
||||
|
||||
// Check if the comment field is empty
|
||||
if (comment === "") {
|
||||
$("#comment-comment").parent().addClass("has-error");
|
||||
$("#comment-comment").after('<span class="help-block">The comment field is required.</span>');
|
||||
hasErrors = true;
|
||||
}
|
||||
|
||||
// If there are no errors, submit the form
|
||||
if (!hasErrors) {
|
||||
$("#comment-form")[0].submit();
|
||||
}
|
||||
});
|
||||
|
||||
// Remove the error styling and message when the user types in a field
|
||||
$(".form-control").on("input", function() {
|
||||
$(this).parent().removeClass("has-error");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('website') ? 'has-error' : '' }}">
|
||||
{!! Form::label('website',Lang::get('lang.website')) !!}
|
||||
{!! Form::text('website',null,['class' => 'form-control']) !!}
|
||||
{!! $errors->first('website', '<spam class="help-block">:message</spam>') !!}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_message') !!}</button>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group {{ $errors->has('comment') ? 'has- error' : '' }}">
|
||||
{!! Form::label('comment',Lang::get('lang.message')) !!}
|
||||
{!! Form::textarea('comment',null,['class' => 'form-control','size' => '30x8','id'=>'comment']) !!}
|
||||
{!! $errors->first('comment', '<spam class="help-block">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div><!-- #respond -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- #respond -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('category')
|
||||
|
||||
@@ -152,8 +319,8 @@ $category_id = $all->pluck('category_id')->toArray();
|
||||
|
||||
<h2 class="section-title h4 clearfix">
|
||||
|
||||
<i class="line"></i>{!! Lang::get('lang.categories') !!}
|
||||
|
||||
<b> <i class="line" style="border-color: rgb(0, 154, 186);"></i>{!! Lang::get('lang.categories') !!}</b>
|
||||
|
||||
<small class="float-right"><i class="far fa-hdd fa-fw"></i></small>
|
||||
</h2>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user