v1.5.9 Added and fixed preview, the only problem is that images on event, guide category and guide resource id is not display on the different pages
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
<thead>
|
||||
<th>Navn</th>
|
||||
<th>Udløbsdato</th>
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/preview.svg') }}" alt="preview"></th>
|
||||
@if(auth()->user()->can('news.edit'))
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/preview.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('news.delete'))
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@@ -41,9 +41,9 @@
|
||||
@else
|
||||
<td>Ingen udløbsdato</td>
|
||||
@endif
|
||||
<td><a id="preview" onclick="modalNewsContent({{$new->id}})" style="cursor: pointer" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
|
||||
@if(auth()->user()->can('news.edit'))
|
||||
<td><a href="{{ route("news.edit", [ "news" => $new ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href="#" id="preview" onclick="modalNewsContent({{$new->id}})" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('news.delete'))
|
||||
<td>
|
||||
@@ -76,16 +76,14 @@
|
||||
function modalNewsContent(id) {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '{{route('events.preview')}}',
|
||||
url: '{{route('news.preview')}}',
|
||||
data: {'preview':id},
|
||||
success:function (data) {
|
||||
modalNews.style.display = "block";
|
||||
var l = JSON.parse(data);
|
||||
$("#titleEvent").text(l.name);
|
||||
$("#dateEvent").text(l.date);
|
||||
$("#descriptionEvent").text(l.description);
|
||||
|
||||
|
||||
$("#titleEvent").html(l.subname);
|
||||
$("#dateEvent").html(l.news_expiration_date);
|
||||
$("#descriptionEvent").html(l.content);
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
|
||||
Reference in New Issue
Block a user