Base
This commit is contained in:
24
resources/views/ventas/sort_title.blade.php
Normal file
24
resources/views/ventas/sort_title.blade.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$name = str_replace(['[', ']', ' ', '²', '/'], ['', '', '_', '2', '_'], strtolower($title));
|
||||
$url_base = ['p' => 'ventas', 'a' => 'list', 'proyecto' => $proyecto->id, 'sort' => $name];
|
||||
if (get('sort') == $name or (get('sort') == null and $name == 'departamento')) {
|
||||
if (get('sort_dir')) {
|
||||
$url_base['sort_dir'] = get('sort_dir');
|
||||
} else {
|
||||
$url_base['sort_dir'] = 1;
|
||||
}
|
||||
$url_base['sort_dir'] *= -1;
|
||||
}
|
||||
?>
|
||||
<a href="{{url('', $url_base)}}">
|
||||
{{$title}}
|
||||
@if (get('sort') == $name or (get('sort') == null and $name == 'departamento'))
|
||||
@if (get('sort_dir') == 1 or get('sort_dir') == null)
|
||||
<span class="caret"></span>
|
||||
@else
|
||||
<span class="dropup">
|
||||
<span class="caret"></span>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
</a>
|
Reference in New Issue
Block a user