Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
agplv3
kohinos-tav
Commits
d5bf4583
Commit
d5bf4583
authored
Jun 22, 2021
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix presta / news image thumbnail
parent
bb7ec207
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
NewsAdmin.php
src/Admin/NewsAdmin.php
+1
-1
news.html.twig
templates/themes/kohinos/common/news.html.twig
+1
-1
liste.html.twig
templates/themes/kohinos/news/liste.html.twig
+1
-1
show.html.twig
templates/themes/kohinos/news/show.html.twig
+1
-1
onepresta.html.twig
templates/themes/kohinos/presta/onepresta.html.twig
+1
-1
show.html.twig
templates/themes/kohinos/presta/show.html.twig
+1
-1
No files found.
src/Admin/NewsAdmin.php
View file @
d5bf4583
...
...
@@ -42,7 +42,7 @@ class NewsAdmin extends AbstractAdmin
'em'
=>
$this
->
getConfigurationPool
()
->
getContainer
()
->
get
(
'doctrine'
)
->
getManager
(),
])
->
add
(
'media'
,
MediaType
::
class
,
[
'provider'
=>
'sonata.media.provider.
fil
e'
,
'provider'
=>
'sonata.media.provider.
imag
e'
,
'context'
=>
'actualites'
,
'label'
=>
'Image'
,
])
...
...
templates/themes/kohinos/common/news.html.twig
View file @
d5bf4583
...
...
@@ -9,7 +9,7 @@
{%
if
news.media
%}
{%
set
pathMedia
=
mediaurl
(
news.media
,
'reference'
)
%}
{%
if
pathMedia
ends
with
'.jpg'
or
pathMedia
ends
with
'.jpeg'
or
pathMedia
ends
with
'.png'
or
pathMedia
ends
with
'.bmp'
or
pathMedia
ends
with
'.gif'
%}
<img
src=
"
{%
path
news.media
,
'reference'
%}
"
style=
"max-width: 100%;"
/>
{%
thumbnail
news.media
,
'small'
%}
{%
else
%}
<a
href=
"
{%
path
news.media
,
'reference'
%}
"
>
{{
'Télécharger'
|
trans
}}
</a>
{%
endif
%}
...
...
templates/themes/kohinos/news/liste.html.twig
View file @
d5bf4583
...
...
@@ -12,7 +12,7 @@
{%
if
new.media
%}
{%
set
pathMedia
=
mediaurl
(
new.media
,
'reference'
)
%}
{%
if
pathMedia
ends
with
'.jpg'
or
pathMedia
ends
with
'.jpeg'
or
pathMedia
ends
with
'.png'
or
pathMedia
ends
with
'.bmp'
or
pathMedia
ends
with
'.gif'
%}
<img
src=
"
{%
path
new.media
,
'reference'
%}
"
style=
"max-width: 100%;"
/>
{%
thumbnail
new.media
,
'small'
%}
<br
/>
{%
else
%}
<a
href=
"
{%
path
new.media
,
'reference'
%}
"
>
{{
'Télécharger'
|
trans
}}
</a>
{%
endif
%}
...
...
templates/themes/kohinos/news/show.html.twig
View file @
d5bf4583
...
...
@@ -10,7 +10,7 @@
{%
if
news.media
%}
{%
set
pathMedia
=
mediaurl
(
news.media
,
'reference'
)
%}
{%
if
pathMedia
ends
with
'.jpg'
or
pathMedia
ends
with
'.jpeg'
or
pathMedia
ends
with
'.png'
or
pathMedia
ends
with
'.bmp'
or
pathMedia
ends
with
'.gif'
%}
<img
src=
"
{%
path
news.media
,
'reference'
%}
"
style=
"max-width: 100%;"
/>
{%
thumbnail
news.media
,
'big'
with
{
'class'
:
'rounded mx-auto d-block'
}
%}
<br
/>
{%
else
%}
<a
href=
"
{%
path
news.media
,
'reference'
%}
"
>
{{
'Télécharger'
|
trans
}}
</a>
{%
endif
%}
...
...
templates/themes/kohinos/presta/onepresta.html.twig
View file @
d5bf4583
...
...
@@ -28,7 +28,7 @@
<p
class=
'mb-4'
>
{%
set
pathMedia
=
mediaurl
(
presta.media
,
'reference'
)
|
lower
%}
{%
if
pathMedia
ends
with
'.jpg'
or
pathMedia
ends
with
'.jpeg'
or
pathMedia
ends
with
'.png'
or
pathMedia
ends
with
'.bmp'
or
pathMedia
ends
with
'.gif'
%}
<img
src=
"
{%
path
presta.media
,
'reference'
%}
"
style=
"max-width: 100%;"
/>
{%
thumbnail
presta.media
,
'big'
with
{
'class'
:
'rounded mx-auto d-block'
}
%}
<br
/>
{%
else
%}
<a
href=
"
{%
path
presta.media
,
'reference'
%}
"
>
{{
'Télécharger'
|
trans
}}
</a>
{%
endif
%}
...
...
templates/themes/kohinos/presta/show.html.twig
View file @
d5bf4583
...
...
@@ -32,7 +32,7 @@
<div
class=
"card-body"
>
{%
if
presta.media
!=
null
%}
<div
class=
'w-25 float-right'
>
<img
class=
"w-100"
src=
"
{%
path
presta.media
,
'big'
%}
"
alt=
"
{{
presta.raison
}}
"
>
<img
class=
"w-100"
src=
"
{%
path
presta.media
,
'big'
%}
"
alt=
"
{{
presta.raison
}}
"
>
</div>
{%
endif
%}
{%
if
presta.statut
!=
null
%}
...
...
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