Updates to use non @2 name in filename

This commit is contained in:
Andy Miller
2017-05-26 16:15:49 -06:00
parent 7e103ca4c9
commit a9182e1563
6 changed files with 16 additions and 8 deletions

View File

@@ -1531,7 +1531,8 @@ class Admin
*/ */
private function getMediaOfType($type, $page, $page_files) { private function getMediaOfType($type, $page, $page_files) {
if ($page) { if ($page) {
$path = $page->path();
// $path = $page->path();
$media = $page->media(); $media = $page->media();
$mediaOfType = $media->$type(); $mediaOfType = $media->$type();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -303,6 +303,7 @@ $dark-text: #333;
overflow: hidden; overflow: hidden;
line-height: 2; line-height: 2;
text-indent: 2px; text-indent: 2px;
white-space: nowrap;
} }
} }
} }

View File

@@ -1,12 +1,18 @@
{% set index = uri.param('index') %} {% set index = uri.param('index') %}
{% for file in admin.files(true, 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="card-item">
<div class="admin-media-details"> <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 }}"> <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 }}">
<img src="{{file.file.display(file.file.extension == 'svg' ? 'source' : 'thumbnail').cropZoom(250, 250).url}}" /> {% 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> <h4 class="admin-media-title">{{ file.title }}</h4>
{% endif %}
</a> </a>
</div> </div>
</div> </div>
{% endfor %} {% endif %}
{% endfor %}

View File

@@ -11,7 +11,7 @@
<h2>No media files found</h2> <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> </div>
{% else %} {% else %}
{% include 'media-list-content.html.twig' with { is_modal: is_modal } %} {# not a partial as used by AJAX #} {% include 'media-list-content.html.twig' with { is_modal: is_modal } %} {# not a partial as used by AJAX #}
@@ -20,4 +20,4 @@
{{ nonce_field('admin-form', 'admin-nonce')|raw }} {{ nonce_field('admin-form', 'admin-nonce')|raw }}
</div> </div>
{% include 'partials/spinning-wheel.html.twig' %} {% include 'partials/spinning-wheel.html.twig' %}