diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig index 40fbc63528..2b9b9a3acb 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig @@ -9,7 +9,7 @@ diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig index 3cd4293665..1f18e817e9 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig @@ -117,7 +117,7 @@ {% endif %}

diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig index 48b242cc21..1d1cad0be0 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig @@ -14,7 +14,7 @@ {# Logo #} {% set homepagePageNode = nodemenu.getRootNodeMenuItem() %} @@ -52,7 +52,7 @@ {# Logo #} {% set homepagePageNode = nodemenu.getNodeByInternalName('homepage') %} @@ -121,7 +121,7 @@ {# Logo #} {% set homepagePageNode = nodemenu.getNodeByInternalName('homepage') %} 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 d5884762a6..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..7744bf5434 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 }} @@ -27,7 +27,7 @@ {% set videoImage = asset('frontend/img/general/video-pp--default.svg') %} {% 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..e39140e3ef 100644 --- a/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php +++ b/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php @@ -116,6 +116,15 @@ public function prepend(ContainerBuilder $container) $container->prependExtensionConfig('doctrine', $doctrineGedmoEntityConfig); + $frameworkExtensionConfig = [ + 'assets' => [ + 'packages' => [ + '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 4e776d382c..08ec895841 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) %} {% 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..34051e609f 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig @@ -201,8 +201,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 %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig index 86ece05456..c1e20f1825 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 %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig index 4d279df9e0..3a28638ffb 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 424719c96e..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,9 +14,9 @@ {{ 'media.media.mediainfo.downloadlink'|trans }}:
- {% set mediaUrl = media.url %} - - {{ absolute_url(asset(mediaUrl)) }} + {% 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 c36e7efad9..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 0469464248..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 e0fde39700..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 = absolute_url(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/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig b/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig index 97ca4c52a6..9b9046b1bc 100644 --- a/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig +++ b/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig @@ -22,7 +22,7 @@ {% 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') %} {% endif %} diff --git a/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig b/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig index d7709fe5cf..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 %}