v1.4.8i Fix border on the X, and added substr

This commit is contained in:
2020-10-30 14:18:28 +01:00
parent 16eba9cd62
commit 0ae9dfd5d4
7 changed files with 157 additions and 23 deletions
@@ -28,6 +28,7 @@
<th>Navn</th>
<th>Kategori</th>
@if(auth()->user()->can('guides.edit'))
<!--<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/preview.svg') }}" alt="preview"></th>-->
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
@endif
@if(auth()->user()->can('guides.delete'))
@@ -39,6 +40,7 @@
<td>{{$guide->name}}</td>
<td>{{ \App\GuidesCategory::query()->where('id', '=', $guide->guide_category_id)->first()->guidesCategoryName }}</td>
@if(auth()->user()->can('guides.edit'))
<!-- <td><input type="image" name="preview" onclick="preview()" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></td>-->
<td><a href="{{ route("guides.edit", [ "guide" => $guide ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
@endif
@if(auth()->user()->can('guides.delete'))
@@ -46,7 +48,7 @@
@csrf
@method("delete")
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
<button onclick="return confirm('Er DU sikker på at du vil slette vejledningen? Der er igen vej tilbage hvis du sletter den!');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
@endif
@@ -54,12 +56,11 @@
@endforeach
@if(count($guides) == 0)
<tr>
<td colspan="4">Ingen vejledninger</td>
<td colspan="5">Ingen vejledninger</td>
</tr>
@endif
</table>
</div>
<div id="guidesCategory" class="mt-2 letterSpaceTable">
<label>Kategorier til de forskellige vejledninger</label>
<table class="tbl">
@@ -83,7 +84,7 @@
@csrf
@method("delete")
<button onclick="return confirm('Are you sure you want to delete? You will also delete all guides with this category!');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
<button onclick="return confirm('Er du sikker på at du vil slette denne kategori?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
@endif
@@ -91,4 +92,13 @@
@endforeach
</table>
</div>
<script>
function preview(){
$value = $('#preview').val();
console.log($value);
}
</script>
@endsection