Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
6d1de98a
Unverified
Commit
6d1de98a
authored
Sep 10, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable and use server side processing
parent
c8149df1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
37 deletions
+35
-37
index.blade.php
Modules/Media/Resources/views/admin/index.blade.php
+35
-37
No files found.
Modules/Media/Resources/views/admin/index.blade.php
View file @
6d1de98a
...
@@ -40,39 +40,10 @@
...
@@ -40,39 +40,10 @@
<th>
{{ trans('core::core.table.thumbnail') }}
</th>
<th>
{{ trans('core::core.table.thumbnail') }}
</th>
<th>
{{ trans('media::media.table.filename') }}
</th>
<th>
{{ trans('media::media.table.filename') }}
</th>
<th>
{{ trans('core::core.table.created at') }}
</th>
<th>
{{ trans('core::core.table.created at') }}
</th>
<th
data-sortable=
"false"
>
{{ trans('core::core.table.actions') }}
</th>
<th>
{{ trans('core::core.table.actions') }}
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<?php
if
(
$files
)
:
?>
<?php
foreach
(
$files
as
$file
)
:
?>
<tr>
<td>
<?php
if
(
$file
->
isImage
())
:
?>
<img
src=
"{{ Imagy::getThumbnail($file->path, 'smallThumb') }}"
alt=
""
/>
<?php
else
:
?>
<i
class=
"fa {{ FileHelper::getFaIcon($file->media_type) }}"
style=
"font-size: 20px;"
></i>
<?php
endif
;
?>
</td>
<td>
<a
href=
"{{ route('admin.media.media.edit', [$file->id]) }}"
>
{{ $file->filename }}
</a>
</td>
<td>
<a
href=
"{{ route('admin.media.media.edit', [$file->id]) }}"
>
{{ $file->created_at }}
</a>
</td>
<td>
<div
class=
"btn-group"
>
<a
href=
"{{ route('admin.media.media.edit', [$file->id]) }}"
class=
"btn btn-default btn-flat"
><i
class=
"fa fa-pencil"
></i></a>
<button
class=
"btn btn-danger btn-flat"
data-toggle=
"modal"
data-target=
"#modal-delete-confirmation"
data-action-target=
"{{ route('admin.media.media.destroy', [$file->id]) }}"
><i
class=
"fa fa-trash"
></i></button>
</div>
</td>
</tr>
<?php
endforeach
;
?>
<?php
endif
;
?>
</tbody>
</tbody>
<tfoot>
<tfoot>
<tr>
<tr>
...
@@ -104,16 +75,43 @@
...
@@ -104,16 +75,43 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
function
()
{
$
(
'
.data-table
'
).
dataTable
({
$
(
'
.data-table
'
).
dataTable
({
"
paginate
"
:
true
,
"
processing
"
:
true
,
"
lengthChange
"
:
true
,
"
serverSide
"
:
true
,
"
filter
"
:
true
,
"
ajax
"
:
'
{{ route(
'
api
.
media
.
all
'
) }}
'
,
"
sort
"
:
true
,
"
info
"
:
true
,
"
autoWidth
"
:
true
,
"
autoWidth
"
:
true
,
"
order
"
:
[[
0
,
"
desc
"
]],
"
order
"
:
[[
2
,
"
desc
"
]],
"
language
"
:
{
"
language
"
:
{
"
url
"
:
'
<?php
echo
Module
::
asset
(
"core:js/vendor/datatables/
{
$locale
}
.json"
)
?>
'
"
url
"
:
'
<?php
echo
Module
::
asset
(
"core:js/vendor/datatables/
{
$locale
}
.json"
)
?>
'
}
},
"
columns
"
:
[
{
data
:
'
thumbnail
'
,
orderable
:
false
,
searchable
:
false
},
{
data
:
'
filename
'
,
render
:
function
(
data
,
type
,
full
)
{
return
'
<a href="
'
+
route
(
'
admin.media.media.edit
'
,
{
media
:
full
.
id
})
+
'
">
'
+
data
+
'
</a>
'
;
}
},
{
data
:
"
created_at
"
,
render
:
function
(
data
,
type
,
full
)
{
return
'
<a href="
'
+
route
(
'
admin.media.media.edit
'
,
{
media
:
full
.
id
})
+
'
">
'
+
data
+
'
</a>
'
;
}
},
{
data
:
null
,
orderable
:
false
,
searchable
:
false
,
render
:
function
(
data
,
type
,
full
)
{
return
'
<a href="
'
+
route
(
'
admin.media.media.edit
'
,
{
media
:
full
.
id
})
+
'
" class="btn btn-default btn-flat">
'
+
'
<i class="fa fa-pencil"></i></a>
'
+
'
<button class="btn btn-danger btn-flat" data-toggle="modal" data-target="#modal-delete-confirmation" data-action-target="
'
+
route
(
'
admin.media.media.destroy
'
,
{
media
:
full
.
id
})
+
'
"><i class="fa fa-trash"></i></button>
'
;
}
}
],
});
});
});
});
</script>
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment