diff --git a/src/Kunstmaan/AdminBundle/Resources/views/Default/_css.html.twig b/src/Kunstmaan/AdminBundle/Resources/views/Default/_css.html.twig index 86ab530c6d..fe9942c400 100644 --- a/src/Kunstmaan/AdminBundle/Resources/views/Default/_css.html.twig +++ b/src/Kunstmaan/AdminBundle/Resources/views/Default/_css.html.twig @@ -1,6 +1,6 @@ - - - + + + {% if titlecolor is not defined or titlecolor is empty %} diff --git a/src/Kunstmaan/AdminBundle/Resources/views/Default/_favicons.html.twig b/src/Kunstmaan/AdminBundle/Resources/views/Default/_favicons.html.twig index fcad202254..f8b24c1e11 100644 --- a/src/Kunstmaan/AdminBundle/Resources/views/Default/_favicons.html.twig +++ b/src/Kunstmaan/AdminBundle/Resources/views/Default/_favicons.html.twig @@ -1,4 +1,4 @@ - - - - + + + + diff --git a/src/Kunstmaan/AdminBundle/Resources/views/Default/_js_footer.html.twig b/src/Kunstmaan/AdminBundle/Resources/views/Default/_js_footer.html.twig index 50d565ee68..16c2ff83ed 100644 --- a/src/Kunstmaan/AdminBundle/Resources/views/Default/_js_footer.html.twig +++ b/src/Kunstmaan/AdminBundle/Resources/views/Default/_js_footer.html.twig @@ -1,7 +1,7 @@ {% include "@KunstmaanAdmin/Default/_ckeditor_configs.html.twig" %} @@ -9,13 +9,13 @@ + {% endblock %} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig index ec15d7e424..9a7d5d3f0c 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig @@ -5,7 +5,7 @@ {% endif %}

- {{ name }} + {{ name }} | {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}

{% endif %} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig index 6e991785c7..9e0fdf70fc 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig @@ -5,13 +5,13 @@ {% set imgUrl = '' %} {% if type in ['svg', 'gif'] %} - {% set imgUrl = absolute_url(asset(image)) %} + {% set imgUrl = absolute_url(asset(image, 'media')) %} {{ altText }} {% else %} - {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type)) %} - {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type)) %} - {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type)) %} - {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type)) %} + {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type), 'media') %} + {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type), 'media') %} + {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type), 'media') %} + {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type), 'media') %} {% set srcSet = imgUrl_small ~ ' 400w, ' ~ imgUrl_medium ~ ' 600w, ' ~ imgUrl_big ~ ' 1200w, ' ~ imgUrl_huge ~ ' 2400w' %} {# diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig index f1bed30fca..1dc1d768dc 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig @@ -5,13 +5,13 @@ {% set imgUrl = '' %} {% if type in ['svg', 'gif'] %} - {% set imgUrl = absolute_url(asset(image)) %} + {% set imgUrl = absolute_url(asset(image, 'media')) %} {{ altText }} {% else %} - {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type)) %} - {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type)) %} - {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type)) %} - {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type)) %} + {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type), 'media') %} + {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type), 'media') %} + {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type), 'media') %} + {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type), 'media') %} {% set srcSet = imgUrl_small ~ ' 400w,' ~ imgUrl_medium ~ ' 600w,' ~ imgUrl_big ~ ' 1200w,' ~ imgUrl_huge ~ ' 2400w'%} {{ altText }} @@ -24,10 +24,10 @@ {% if resource.video is defined and resource.video %}
- {% set videoImage = asset('frontend/img/general/video-pp--default.svg') %} + {% set videoImage = asset('frontend/img/general/video-pp--default.svg', 'asset') %} {% set imageType = 'jpg' %} {% if resource.thumbnail is not empty %} - {% set videoImage = asset(resource.thumbnail.url|imagine_filter('optim')) %} + {% set videoImage = asset(resource.thumbnail.url|imagine_filter('optim'), 'media') %} {% set imageType = resource.thumbnail.originalFilename|lower|split('.')|last %} {% endif %} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig index 517400af20..8c7c32b6ac 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig @@ -9,9 +9,9 @@ {% elseif key == 'link' %} {{ "{{ resource." ~ fieldArray['text']['fieldName'] ~ " }}" }} {% elseif key == 'image' %} - {{ "{% if resource." ~ fieldArray['image']['fieldName'] ~ " is not empty %}" }}{{ "{% endif %}" }} + {{ "{% if resource." ~ fieldArray['image']['fieldName'] ~ " is not empty %}" }}{{ "{% endif %}" }} {% elseif key == 'media' %} - {{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " is not empty %}" }}{{ "{{ resource." ~ fieldArray[0]['fieldName'] ~ ".name }}" }}{{ "{% endif %}" }} + {{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " is not empty %}" }}{{ "{{ resource." ~ fieldArray[0]['fieldName'] ~ ".name }}" }}{{ "{% endif %}" }} {% elseif key == 'single_ref' %} {{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " is not empty %}" }}
{{ fieldArray[0]['targetEntity'] }}: {{ "{{ resource." ~ fieldArray[0]['fieldName'] ~ " }}" }}
{{ "{% endif %}" }} {% elseif key == 'multi_ref' %} @@ -30,4 +30,4 @@
{{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " %}{{ resource." ~ fieldArray[0]['fieldName'] ~ "|date(\"Y-m-d H:i:s\") }}{% endif %}" }}
{% endif %} {% endfor %}{% endfor %} -
\ No newline at end of file + diff --git a/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php b/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php index 37fab40fd8..9cb2785dcc 100644 --- a/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php +++ b/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php @@ -116,6 +116,16 @@ public function prepend(ContainerBuilder $container) $container->prependExtensionConfig('doctrine', $doctrineGedmoEntityConfig); + $frameworkExtensionConfig = [ + 'assets' => [ + 'packages' => [ + 'asset' => null, + 'media' => null, + ], + ], + ]; + $container->prependExtensionConfig('framework', $frameworkExtensionConfig); + $configs = $container->getExtensionConfig($this->getAlias()); $this->processConfiguration(new Configuration(), $configs); } diff --git a/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig index cabfc916d6..20a79f204a 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig @@ -2,6 +2,6 @@ {% set thumbnailurl = mediaHandler.getImageUrl(item, app.request.basePath, 210, 150) %} {% set cke = (app.request and app.request.get('CKEditorFuncNum')) %} - + Select diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig index a6849a8b16..c42f7eb5d4 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig @@ -201,15 +201,15 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurlretina = imageurl %} {% else %} - {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina')) %} - {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail')) %} + {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina'), 'media') %} + {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail'), 'media') %} {% endif %} {% endif %} {% set path = "[%s]" | format("M" ~ media.id) %}
- +
{% if imageurl %} {{ media.name }} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Default/layout.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Default/layout.html.twig index 112b27d8b0..cc08bb5390 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Default/layout.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Default/layout.html.twig @@ -5,7 +5,7 @@ {% embed "@KunstmaanAdmin/Default/_js_footer.html.twig" %} {% block extra_async_javascripts %} {{ parent() }} - '{{ asset('bundles/kunstmaanmedia/js/media-bundle.min.js') }}', + '{{ asset('bundles/kunstmaanmedia/js/media-bundle.min.js', 'asset') }}', {% endblock %} {% endembed %} {% endblock %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig index c71aef25af..63ed4b09bf 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig @@ -232,8 +232,8 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurlretina = imageurl %} {% else %} - {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina')) %} - {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail')) %} + {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina'), 'media') %} + {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail'), 'media') %} {% endif %} {% endif %} @@ -345,7 +345,7 @@ {% embed "@KunstmaanAdmin/Default/_js_footer.html.twig" %} {% block extra_async_javascripts %} {{ parent() }} - '{{ asset('bundles/kunstmaanmedia/js/media-bundle.min.js') }}', + '{{ asset('bundles/kunstmaanmedia/js/media-bundle.min.js', 'asset') }}', {% endblock %} {% endembed %} {% endblock %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig index 3774df2821..cba2111e85 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig @@ -64,8 +64,8 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurlretina = imageurl %} {% else %} - {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina')) %} - {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail')) %} + {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina'), 'media') %} + {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail'), 'media') %} {% endif %} {% endif %} {% if imageurl %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig index cc3dda851c..b098c240fa 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig @@ -1,7 +1,7 @@ {% extends '@KunstmaanMedia/Media/show.html.twig' %} {% block extraactions %} - + {{ 'media.media.download.action'|trans }} {% endblock %} @@ -14,8 +14,9 @@ {{ 'media.media.mediainfo.downloadlink'|trans }}:
- - {{ app.request.getScheme()~'://'~app.request.getHttpHost()~asset(media.url) }} + {% set mediaUrl = absolute_url(asset(media.url, 'media')) %} + + {{ mediaUrl }}
{% endblock %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig index a6a297e8b7..405844523a 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig @@ -3,14 +3,14 @@ {% block extraactions %} {% if handler.aviaryApiKey and not (handler.aviaryApiKey starts with 'Register') %} - {% include '@KunstmaanMedia/Media/Image/aviary.html.twig' %} {% endif %} - + {{ 'media.media.download.action'|trans }} {% endblock %} @@ -21,7 +21,7 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurl = imageurl %} {% else %} - {% set imageurl = asset(imageurl | imagine_filter('media_detail_thumbnail')) %} + {% set imageurl = asset(imageurl | imagine_filter('media_detail_thumbnail'), 'media') %} {% endif %} {% endif %} {{ media.name }} diff --git a/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig b/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig index 349bcb4e91..61e33c474c 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig +++ b/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig @@ -3,6 +3,6 @@ {% if name is empty %} {% set name = "Download" %} {% endif %} -

{{ name }} | {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}

+

{{ name }} | {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}

{% endif %} diff --git a/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig b/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig index 851aec457a..05f069aaa3 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig +++ b/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig @@ -2,7 +2,7 @@
{% set imgUrl = '' %} {% if app.request %} - {% set imgUrl = app.request.schemeandhttphost ~ app.request.basePath ~ asset(resource.media.url) %} + {% set imgUrl = absolute_url(asset(resource.media.url, 'media')) %} {% endif %} {% if resource.link is defined and resource.link != "" %} {{ resource.alttext }} diff --git a/src/Kunstmaan/NodeBundle/Resources/views/NodeAdmin/edit.html.twig b/src/Kunstmaan/NodeBundle/Resources/views/NodeAdmin/edit.html.twig index f67daadbe4..7e9c502c11 100644 --- a/src/Kunstmaan/NodeBundle/Resources/views/NodeAdmin/edit.html.twig +++ b/src/Kunstmaan/NodeBundle/Resources/views/NodeAdmin/edit.html.twig @@ -122,6 +122,6 @@ {% block extracss %} {% set cssPath = 'frontend/css/admin-style.css' %} {% if file_exists(cssPath) %} - + {% endif %} {% endblock %} diff --git a/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig b/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig index 97ca4c52a6..2d0e9d05b5 100644 --- a/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig +++ b/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig @@ -22,9 +22,9 @@ {% for pagePartType in pagepartadmin.possiblePagePartTypes %}
{% if pagePartType.preview is defined and pagePartType.preview is not empty %} - {% set background = asset(pagePartType.preview) %} + {% set background = asset(pagePartType.preview, 'media') %} {% else %} - {% set background = asset('bundles/kunstmaanadmin/default-theme/img/kunstmaan/ppchooser-placeholder.svg') %} + {% set background = asset('bundles/kunstmaanadmin/default-theme/img/kunstmaan/ppchooser-placeholder.svg', 'asset') %} {% endif %}
diff --git a/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig b/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig index d83f3ec637..3df51899bf 100644 --- a/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig +++ b/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig @@ -59,13 +59,13 @@ {% else %} {% set imageUrl = seo.getOgImage().getUrl() | imagine_filter('fb_og_image') %} {% set dimensions = get_image_dimensions(imageUrl) %} - + {% if dimensions %} {% endif %} - + {% endif %} {% endif %} @@ -102,9 +102,9 @@ - + {% else %} - + {% endif %} {% endif %} {% endif %} diff --git a/src/Kunstmaan/TranslatorBundle/Resources/views/Translator/list.html.twig b/src/Kunstmaan/TranslatorBundle/Resources/views/Translator/list.html.twig index 9b6812d343..961bd4e038 100644 --- a/src/Kunstmaan/TranslatorBundle/Resources/views/Translator/list.html.twig +++ b/src/Kunstmaan/TranslatorBundle/Resources/views/Translator/list.html.twig @@ -4,7 +4,7 @@ {% block extracss %} {{ parent() }} - + {% endblock %} @@ -106,7 +106,7 @@ {% embed "@KunstmaanAdmin/Default/_js_footer.html.twig" %} {% block extra_async_javascripts %} {{ parent() }} - '{{ asset('bundles/kunstmaantranslator/js/translator-bundle.min.js') }}', + '{{ asset('bundles/kunstmaantranslator/js/translator-bundle.min.js', 'asset') }}', {% endblock %} {% endembed %} {% endblock %}