mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
Updates to use non @2 name in filename
This commit is contained in:
@@ -1531,7 +1531,8 @@ class Admin
|
||||
*/
|
||||
private function getMediaOfType($type, $page, $page_files) {
|
||||
if ($page) {
|
||||
$path = $page->path();
|
||||
|
||||
// $path = $page->path();
|
||||
$media = $page->media();
|
||||
$mediaOfType = $media->$type();
|
||||
|
||||
|
||||
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -303,6 +303,7 @@ $dark-text: #333;
|
||||
overflow: hidden;
|
||||
line-height: 2;
|
||||
text-indent: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
{% set index = uri.param('index') %}
|
||||
|
||||
{% for file in admin.files(true, index) %}
|
||||
{% set the_file = file.file %}
|
||||
{% if the_file.display() is not empty %}
|
||||
<div class="card-item">
|
||||
<div class="admin-media-details">
|
||||
<a href="{% if is_modal %}#{% else %}{{ base_url_relative }}/media-manager/{{base64_encode(file.file.filepath)}}{% endif %}" class="js__media-element" data-file-url="{{ file.page_route ~ '/' ~ file.file.filename }}">
|
||||
<img src="{{file.file.display(file.file.extension == 'svg' ? 'source' : 'thumbnail').cropZoom(250, 250).url}}" />
|
||||
<a href="{% if is_modal %}#{% else %}{{ base_url_relative }}/media-manager/{{base64_encode(the_file.filepath)}}{% endif %}" class="js__media-element" data-file-url="{{ file.page_route ~ '/' ~ file.title }}">
|
||||
{% set thumbnail = the_file.display(the_file.extension == 'svg' ? 'source' : 'thumbnail') %}
|
||||
{% if thumbnail %}
|
||||
<img src="{{thumbnail.cropZoom(250, 250).url}}" />
|
||||
<h4 class="admin-media-title">{{ file.title }}</h4>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<h2>No media files found</h2>
|
||||
|
||||
<p>Drag and drop one or more files in the box above, or click the box upload box to open the file picker.</p>
|
||||
<p>You need to add media to a page in order to display it here.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% include 'media-list-content.html.twig' with { is_modal: is_modal } %} {# not a partial as used by AJAX #}
|
||||
|
||||
Reference in New Issue
Block a user