update v1.0.3.3

This commit is contained in:
sujitprasad
2015-12-22 14:09:23 +05:30
parent 2bc3db252e
commit 696e0390fe
8590 changed files with 3456 additions and 818 deletions

View File

@@ -0,0 +1,65 @@
@extends('themes.default1.client.layout.client')
@section('title')
Article List -
@stop
@section('kb')
class = "active"
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here')!!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.article') !!}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-9 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 pull-left text-muted"></i>
<h2 class="entry-title h4"><a href="{{url('show/'.$arti->slug)}}" onclick="toggle_visibility('foo');">{{$arti->name}}</a></h2>
</header><!-- .entry-header -->
<?php $str = $arti->description; ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 200); ?>
<blockquote class="archive-description">
<?php $content = trim(preg_replace("/<img[^>]+\>/i", "", $excerpt), " \t.") ?>
{!! strip_tags($content) !!}
<p><a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
</blockquote>
<footer class="entry-footer">
<div class="entry-meta text-muted">
<span class="date"><i class="fa fa-clock-o fa-fw"></i> <time datetime="2013-10-22T20:01:58+00:00">{{$arti->created_at->format('l, d-m-Y')}}</time></span>
</div><!-- .entry-meta -->
</footer><!-- .entry-footer -->
</article><!-- .hentry -->
{{-- <hr> --}}
@endforeach
<div class="pagination">
<?php echo $article->render(); ?>
</div>
</div>
@stop
@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->lists('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

View File

@@ -0,0 +1,90 @@
@extends('themes.default1.client.layout.client')
@section('title')
All Category -
@stop
@section('kb')
class = "active"
@stop
<?php $category = App\Model\kb\Category::where('id','=',$id)->first(); ?>
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li class="active">{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.category') !!}</li>
<li class="active">{!! $category->name !!}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-9">
<header class="archive-header">
<h1 >{!! $category->name !!}</h1>
</header><!-- .archive-header -->
<blockquote class="archive-description" style="display: none;">
<p>{!! $category->description !!}</p>
</blockquote>
<div class="archive-list archive-article">
<?php foreach ($article_id as $id) { ?>
<?php $article = App\Model\kb\Article::where('id', $id)->get(); ?>
@foreach($article as $arti)
<article class="hentry">
<header class="entry-header">
<i class="fa fa-list-alt fa-2x fa-fw pull-left text-muted"></i>
<h2 class="entry-title h4"><a href="{{url('show/'.$arti->slug)}}" onclick="toggle_visibility('foo');">{{$arti->name}}</a></h2>
</header><!-- .entry-header -->
<?php $str = $arti->description; ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 400); ?>
<blockquote class="archive-description">
<?php $content = trim(preg_replace("/<img[^>]+\>/i", "", $excerpt), " \t.") ?>
<p>{!! strip_tags($content) !!}</p>
<a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a>
</blockquote>
<footer class="entry-footer">
<div class="entry-meta text-muted">
<span class="date"><i class="fa fa-clock-o fa-fw"></i> <time datetime="2013-10-22T20:01:58+00:00">{{$arti->created_at->format('l, d-m-Y')}}</time></span>
</div><!-- .entry-meta -->
</footer><!-- .entry-footer -->
</article><!-- .hentry -->
@endforeach
<?php
}
//echo $all->render();
?>
</div>
</div>
<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if (e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//-->
</script>
@stop
@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->lists('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

View File

@@ -0,0 +1,79 @@
@extends('themes.default1.client.layout.client')
@section('title')
Category List -
@stop
@section('kb')
class = "active"
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here')!!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.category') !!}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<!-- Start of Page Container -->
<div class="row home-listing-area">
<div class="span8">
<h2>{!! Lang::get('lang.categories') !!}</h2>
</div>
</div>
<div class="row separator">
@foreach($categorys as $category)
<div class="col-xs-6">
{{-- get the article_id where category_id == current category --}}
<?php
$all = App\Model\kb\Relationship::where('category_id', $category->id)->get();
//dd($all);
/* from whole attribute pick the article_id */
$article_id = $all->lists('article_id');
?>
<section class="articles-list">
<h3><i class="fa fa-folder-open-o fa-fw text-muted"></i> <a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a> <span>({{count($all)}})</span></h3>
<ul class="articles">
<hr>
<?php foreach ($article_id as $id) {
?>
<?php
$article = App\Model\kb\Article::where('id', $id)->get();
$article = $article->where('status', 1);
$article = $article->where('type', 1);
//dd($article);
?>
@foreach($article as $arti)
<li class="article-entry image" style="margin-left: 50px;">
<h4><a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a></h4>
<span class="article-meta">{{$arti->created_at->format('l, d-m-Y')}}
<?php $str = $arti->description ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 55) ?>
<p>{!!$excerpt!!} <a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
</li>
@endforeach
<?php }
?>
</ul>
</section>
</div>
@endforeach
</div>
</div>
<!-- end of page content -->
@stop

View File

@@ -0,0 +1,12 @@
{!!$name!!}<br>
<br>
<br>
{!!$email!!}
<br>
<br>
{!!$subject!!}
<br>
<br>
{!!$details!!}
<br>
<br>

View File

@@ -0,0 +1,94 @@
@extends('themes.default1.client.layout.client')
@section('contact')
class = "active"
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">You are here: </li>
<li>Home</li>
<li class="active">Contact Us</li>
</ol>
</div>
@stop
@section('check')
<!-- Start of Page Container -->
<div style="padding-top: 60px;">
@if($settings->address)
<h2>Our Address</h2>
{!! $settings->address !!}
@endif
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-9">
<article class="type-page hentry clearfix">
<h1 class="post-title">
<a href="#">Contact us</a>
</h1>
<hr>
<p></p>
</article>
{!! Form::open(['method'=>'post','action'=>'Client\kb\UserController@postContact']) !!}
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name','Name') !!}
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email','Email') !!}
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('email',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('subject') ? 'has-error' : '' }}">
{!! Form::label('subject','Subject') !!}
{!! $errors->first('subject', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('subject',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('message') ? 'has- error' : '' }}">
{!! Form::label('message','Messege', ['style' => 'display: block']) !!}
{!! $errors->first('message', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('message',null,['class' => 'form-control','size' => '30x7','id'=>'message']) !!}
</div>
<div>
{!! Form::submit('Send Message',['class'=>'form-group btn btn-primary'])!!}
</div>
{!! Form::close() !!}
</div>
@stop

View File

@@ -0,0 +1,36 @@
@extends('themes.default1.client.layout.client')
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">You are here: </li>
<li>Home</li>
<li>Frequently Asked Questions</li>
</ol>
</div>
@stop
@section('content')
<!-- Start of Page Container -->
<div id="content" class="site-content col-md-9">
<div class="row home-listing-area">
<div class="span8">
<h2>Faq</h2>
</div>
</div>
<div class="row separator">
<section>
{!! $faq->faq !!}
</section>
</div>
</div>
<!-- end of page content -->
@stop

View File

@@ -0,0 +1,111 @@
@extends('themes.default1.client.layout.client')
@section('title')
Knowledge Base -
@stop
@section('knowledgebase')
class = "active"
@stop
@section('content')
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<b>Success!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li>{!! Lang::get('lang.you_are_here') !!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
</ol>
</div>
@stop
<div id="content" class="site-content col-md-9">
<div class="row">
<?php $categories = App\Model\kb\Category::all();
?>
@foreach($categorys as $category)
{{-- get the article_id where category_id == current category --}}
<?php
$all = App\Model\kb\Relationship::all();
/* from whole attribute pick the article_id */
$page = App\Model\kb\Relationship::where('category_id', '=',$category->id)->paginate('3');
/* from whole attribute pick the article_id */
$article_id = $page->lists('article_id');
$count = count($article_id);
?>
<div class="col-md-6">
<section class="box-categories">
<h1 class="section-title h4 clearfix">
<i class="fa fa-folder-open-o fa-fw text-muted"></i>
<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small>
{{$category->name}}
</h1>
<ul class="fa-ul">
<?php foreach ($article_id as $id) {
$article = App\Model\kb\Article::where('id', '=', $id)->where('status', '=','1')->where('type', '=','1')->get();
?>
@foreach($article as $arti)
<li>
<i class="fa-li fa fa-list-alt fa-fw text-muted"></i>
<h3 class="h5"><a href="#"><a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a></h3>
<span class="article-meta">{{$arti->created_at->format('l, d-m-Y')}}</span>
<?php $str = $arti->description;
$len = strlen($str);
$excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 50); ?>
{!!$excerpt!!} <br/><a class="more-link text-center" href="{{url('show/'.$arti->slug)}}" style="color: orange">{!! Lang::get('lang.read_more') !!}</a>
</li>
@endforeach
<?php } ?>
</ul>
<p class="more-link text-center"><a href="{{url('category-list/'.$category->slug)}}" class="btn btn-custom btn-xs">{!! Lang::get('lang.view_all') !!}</a></p>
</section>
</div>
@endforeach
</div>
<section class="section">
<div class="banner-wrapper banner-horizontal clearfix">
<h4 class="banner-title h4">{!! 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>
</div>
</section>
</div>
@stop
@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->lists('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

View File

@@ -0,0 +1,35 @@
@extends('themes.default1.client.layout.client')
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li class="active">{{$page->name}}</li>
</ol>
</div>
@stop
@section('content')
<!-- Start of Page Container -->
<div class="col-md-12">
<div class="row home-listing-area">
<div class="span8">
<h2>{{$page->name}}</h2>
</div>
</div>
<div class="row separator">
<section>
{!! $page->description !!}
</section>
</div>
<!-- end of page content -->
</div>
@stop

View File

@@ -0,0 +1,206 @@
@extends('themes.default1.client.layout.client')
@section('HeadInclude')
<link href="{{asset("lb-faveo/dist/css/AdminLTE.css")}}" rel="stylesheet" type="text/css" />
@stop
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">You are here: </li>
<li>Home</li>
<li class="active">Edit Profile</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<section class="section-title">
<h2>
Profile Settings </h2>
</section>
<div class="row">
<div class="col-md-6">
{!! Form::model($user,['url'=>'post-profile', 'method' => 'PATCH','files'=>true]) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Profile {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success1'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Success.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success1')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails1'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails1')}}
</div>
@endif
<div class="form-group {{ $errors->has('firstname') ? 'has-error' : '' }}">
<!-- first name -->
{!! Form::label('firstname',Lang::get('lang.firstname')) !!}
{!! $errors->first('firstname', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('firstname',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('lastname') ? 'has-error' : '' }}">
<!-- last name -->
{!! Form::label('lastname',Lang::get('lang.lastname')) !!}
{!! $errors->first('lastname', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('lastname',null,['class' => 'form-control']) !!}
</div>
<div class="form-group">
<!-- gender -->
{!! Form::label('gender',Lang::get('lang.gender')) !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
</div>
<div class="col-xs-3">
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
</div>
</div>
</div>
<div class="form-group">
<!-- email -->
{!! Form::label('email',Lang::get('lang.email')) !!}
<div>
{{$user->email}}
</div>
</div>
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
<!-- company -->
{!! Form::label('company',Lang::get('lang.company')) !!}
{!! $errors->first('company', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('company',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<div class="col-xs-3 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
<!-- phone extensionn -->
{!! Form::label('ext',Lang::get('lang.ext')) !!}
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('ext',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-9 form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
<!-- phone number -->
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
<!-- mobile -->
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}" >
<!-- profile pic -->
<div class="btn btn-default btn-file">
{!! Form::label('profile_pic',Lang::get('lang.profilepicture')) !!}
{!! $errors->first('profile_pic', '<spam class="help-block">:message</spam>') !!}
{!! Form::file('profile_pic') !!}
</div>
</div>
{!! Form::token() !!}
{!! Form::close() !!}
</div>
</div>
</div>
<div class="col-md-6">
{!! Form::model($user,['url'=>'client-profile-password/'.$user->id , 'method' => 'PATCH']) !!}
<div class="box box-primary">
<div class="content-header">
<h4>Change Password {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
</div>
<div class="box-body">
@if(Session::has('success2'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Success.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success2')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails2'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>Alert!</b> Failed.
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails2')}}
</div>
@endif
<!-- old password -->
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password',Lang::get('lang.oldpassword')) !!}
{!! Form::password('old_password',['placeholder'=>'Password','class' => 'form-control']) !!}
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<!-- new password -->
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
{!! Form::label('new_password',Lang::get('lang.newpassword')) !!}
{!! Form::password('new_password',['placeholder'=>'New Password','class' => 'form-control']) !!}
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<!-- cofirm password -->
<div class="form-group has-feedback {{ $errors->has('confirmpassword') ? 'has-error' : '' }}">
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!}
{!! Form::password('confirm_password',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
</div>
@stop

View File

@@ -0,0 +1,60 @@
@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>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-9">
@foreach($result as $arti)
<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>
@endforeach
</article>
<!-- end of page content -->
<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">
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('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

View File

@@ -0,0 +1,152 @@
@extends('themes.default1.client.layout.client')
@section('breadcrumb')
<?php
$all = App\Model\kb\Relationship::where('article_id','=', $arti->id)->get();
/* from whole attribute pick the article_id */
$category_id = $all->lists('category_id');
?>
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! 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')}}">{!! Lang::get('lang.category') !!}</a></li>
<li><a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a></li>
<li class="active">{{$arti->name}}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-9">
<!--
<article class=" type-post format-standard hentry clearfix">
<h1 class="post-title"><a href="#">{{$arti->name}}</a></h1>
<div class="post-meta clearfix">
<span class="date">{{$arti->created_at}}</span>
<span class="category"><a href="#" title="View all posts in Server &amp; Database">{{$category->name}}</a></span>
</div> end of post meta
{!!$arti->description!!}
</article>-->
<article class="hentry">
<header class="entry-header">
<h1 class="entry-title">{{$arti->name}}</h1>
<div class="entry-meta text-muted">
<span class="date"><i class="fa fa-film fa-fw"></i> <time datetime="2013-09-19T20:01:58+00:00">{{$arti->created_at->format('l, d-m-Y')}}</time></span>
<span class="category"><i class="fa fa-folder-open-o fa-fw"></i> <a href="#">{{$category->name}}</a></span>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content clearfix">
<p>{!!$arti->description!!}</p>
</div><!-- .entry-content -->
</article><!-- .hentry -->
<?php $comments = App\Model\kb\Comment::where('article_id', $arti->id)->where('status', '1')->get(); ?>
<div id="comments" class="comments-area">
@foreach($comments as $comment)
<ol class="comment-list">
<li class="comment">
<article class="comment-body">
<footer class="comment-meta">
<div class="comment-author">
<img src="{{asset("lb-faveo/dist/img/avatar_1.png")}}" alt="" height="50" width="50" class="avatar" />
<b class="fn"><a href="#" rel="external" class="url">{!! $comment->name !!}</a></b>
</div><!-- .comment-author -->
<div class="comment-metadata">
<small class="date text-muted">
<time datetime="2013-10-23T01:50:50+00:00">{!! $comment->created_at->format('l, d-m-Y') !!}</time>
</small>
</div><!-- .comment-metadata -->
</footer><!-- .comment-meta -->
<div class="comment-content">
<p>{!! $comment->comment !!}</p>
</div><!-- .comment-content -->
<div class="comment-reply text-right">
{{-- <a class="btn btn-custom btn-sm" href="#">Reply</a> --}}
</div><!-- .comment-reply -->
</article><!-- .comment-body -->
</li><!-- .comment -->
</ol><!-- .comment-list -->
@endforeach
<div id="respond" class="comment-respond form-border">
<h3 id="reply-title" class="comment-reply-title section-title">{!! Lang::get('lang.leave_a_reply') !!}</h3>
{!! Form::open(['method'=>'post','url'=>'postcomment/'.$arti->slug]) !!}
<div class="row">
<div class="form-group">
<div class="col-md-4">
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
{!! Form::label('name',Lang::get('lang.name')) !!}
{!! $errors->first('name', '<spam class="help-block" style="red">:message</spam>') !!}
{!! Form::text('name',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('email',null,['class' => 'form-control']) !!}
</div>
<div class="form-group {{ $errors->has('website') ? 'has-error' : '' }}">
{!! Form::label('website',Lang::get('lang.website')) !!}
{!! $errors->first('website', '<spam class="help-block">:message</spam>') !!}
{!! Form::text('website',null,['class' => 'form-control']) !!}
</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')) !!}
{!! $errors->first('comment', '<spam class="help-block">:message</spam>') !!}
{!! Form::textarea('comment',null,['class' => 'form-control','size' => '30x8','id'=>'comment']) !!}
</div>
</div>
</div>
</div>
{!! Form::close() !!}
</div><!-- #respond -->
</div>
</div>
<script type="text/javascript">
$(function () {
$("textarea").wysihtml5();
});
</script>
@stop
@section('title')
@if(isset($category->name))
{!! $category->name !!} -
@endif
@stop
@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">
<?php $categorys = App\Model\kb\Category::all(); ?>
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('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