Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoGoCarto
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pixel Humain
GoGoCarto
Commits
0abc63e9
Unverified
Commit
0abc63e9
authored
5 years ago
by
Sebastian Castro
Browse files
Options
Downloads
Patches
Plain Diff
Fixs info bar generate for files and images
parent
56290471
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Biopen/GeoDirectoryBundle/Resources/views/admin/partials/show_element_form_fields.html.twig
+35
-31
35 additions, 31 deletions
...s/views/admin/partials/show_element_form_fields.html.twig
with
35 additions
and
31 deletions
src/Biopen/GeoDirectoryBundle/Resources/views/admin/partials/show_element_form_fields.html.twig
+
35
−
31
View file @
0abc63e9
...
...
@@ -19,7 +19,9 @@
'address'
:
'text'
,
'openhours'
:
'openhours'
,
'separator'
:
'separator'
,
'header'
:
'header'
'header'
:
'header'
,
'files'
:
'files'
,
'images'
:
''
}
%}
{%
set
formFields
=
[]
%}
...
...
@@ -29,32 +31,34 @@
<th>
Type
</th>
<th>
Label dans le formulaire
</th>
<th>
Exemple de filtre à utiliser
</th>
</tr>
{%
for
field
in
fields
%}
{%
set
gogoFilter
=
filterFromType
[
field.type
]
%}
{%
if
field.type
==
'text'
%}{%
set
gogoFilter
=
field.subtype
%}{%
endif
%}
{%
set
gogoFilter
=
gogoFilter
?
(
'|gogo_'
~
gogoFilter
)
:
''
%}
{%
set
fieldName
=
field.name
is
defined
?
field.name
:
''
%}
{%
if
field.type
==
'address'
%}{%
set
fieldName
=
"address"
%}{%
endif
%}
{%
if
field.type
==
'openhours'
%}{%
set
fieldName
=
"formatedOpenHours"
%}{%
endif
%}
{%
set
formFields
=
formFields
|
merge
([
fieldName
])
%}
{%
if
field.type
==
"header"
%}
{%
set
fieldTag
=
'## '
~
field.label
%}
{%
elseif
field.type
==
"separator"
%}
{%
set
fieldTag
=
'________________________________'
%}
{%
else
%}
{%
set
fieldTag
=
'{{ '
~
fieldName
~
gogoFilter
~
' }}'
%}
{%
endif
%}
<tr
{%
if
field.type
in
[
"separator"
,
"header"
]
%}
style=
"display:none"
{%
endif
%}
>
<td>
{{
fieldName
}}
</td>
<td>
{{
field.type
|
capitalize
}}
</td>
<td>
{{
field.label
}}
</td>
<td
class=
"value"
>
{{
fieldTag
}}
</td>
</tr>
</tr>
{%
for
field
in
fields
%}
{%
if
field.type
!=
'images'
%}
{%
set
gogoFilter
=
filterFromType
[
field.type
]
%}
{%
if
field.type
==
'text'
%}{%
set
gogoFilter
=
field.subtype
%}{%
endif
%}
{%
set
gogoFilter
=
gogoFilter
?
(
'|gogo_'
~
gogoFilter
)
:
''
%}
{%
set
fieldName
=
field.name
is
defined
?
field.name
:
''
%}
{%
if
field.type
==
'address'
%}{%
set
fieldName
=
"address"
%}{%
endif
%}
{%
if
field.type
==
'openhours'
%}{%
set
fieldName
=
"formatedOpenHours"
%}{%
endif
%}
{%
set
formFields
=
formFields
|
merge
([
fieldName
])
%}
{%
if
field.type
==
"header"
%}
{%
set
fieldTag
=
'## '
~
field.label
%}
{%
elseif
field.type
==
"separator"
%}
{%
set
fieldTag
=
'________________________________'
%}
{%
else
%}
{%
set
fieldTag
=
'{{ '
~
fieldName
~
gogoFilter
~
' }}'
%}
{%
endif
%}
<tr
{%
if
field.type
in
[
"separator"
,
"header"
]
%}
style=
"display:none"
{%
endif
%}
>
<td>
{{
fieldName
}}
</td>
<td>
{{
field.type
|
capitalize
}}
</td>
<td>
{{
field.label
}}
</td>
<td
class=
"value"
>
{{
fieldTag
}}
</td>
</tr>
{%
endif
%}
{%
endfor
%}
</table>
...
...
@@ -72,8 +76,8 @@
<th>
Nom du champ
</th>
<th>
Description
</th>
<th>
Utilisation
</th>
</tr>
</tr>
<tr>
<td>
status
</td>
<td><ul>
...
...
@@ -123,9 +127,9 @@
<tr>
<th>
Nom du champ
</th>
<th>
Utilisation
</th>
</tr>
</tr>
{%
for
field
in
otherFields
%}
{%
for
field
in
otherFields
%}
<tr>
<td>
{{
field
}}
</td>
<td>
{{
'{{ '
~
field
~
' }}'
}}
</td>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment