-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap comment widget into blade component, remove comment JS from comm…
…on clients/detail layout. Swap calls to conf() with config() where possible. Remove unused head js in 426 error page. Update CHANGELOG
- Loading branch information
Showing
7 changed files
with
75 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Widget\Detail; | ||
|
||
use Closure; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
class Comments extends Component | ||
{ | ||
/** | ||
* @var string Widget name/template name | ||
*/ | ||
public $name; | ||
|
||
public $data; | ||
|
||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(string $name, ?array $data) | ||
{ | ||
$this->name = $name; | ||
$this->data = $data; | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
*/ | ||
public function render(): View|Closure|string | ||
{ | ||
return view('components.widget.detail.comments', $this->data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
resources/views/components/widget/detail/comments.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<div class="col-lg-4" | ||
@isset($id)id="{{ $id }}"@endisset | ||
> | ||
<h4> | ||
@isset($icon) | ||
<i class="fa fa-{{ $icon }}"></i> | ||
@endisset | ||
<span | ||
@isset($i18n_title)data-i18n="{{ $i18n_title }}"@endisset | ||
@isset($class)class="{{ $class }}"@endisset | ||
></span> | ||
</h4> | ||
<div class="comment" data-section="client"></div> | ||
</div> | ||
|
||
|
||
@push('scripts') | ||
<script src="{{ asset('assets/js/marked.min.js') }}"></script> | ||
<script src="{{ asset('assets/js/munkireport.comment.js') }}"></script> | ||
@endpush |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters