Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Theme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
osuny
Theme
Commits
798a3dac
Commit
798a3dac
authored
3 months ago
by
Alexis BENOIT
Browse files
Options
Downloads
Patches
Plain Diff
add presence of organization with coordinates in map layout
parent
d88e9c18
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
layouts/partials/blocks/templates/organizations/map.html
+53
-51
53 additions, 51 deletions
layouts/partials/blocks/templates/organizations/map.html
with
53 additions
and
51 deletions
layouts/partials/blocks/templates/organizations/map.html
+
53
−
51
View file @
798a3dac
...
...
@@ -6,59 +6,61 @@
{{/* In map layout, all organization should have .path to get coordinates */}}
{{ $organizations := where .organizations "path" "ne" nil }}
<div
class=
"transcription"
>
<details
id=
"{{- $id_transcription -}}"
class=
"map-transcription"
>
<summary
aria-controls=
"{{- $id_transcription -}}"
aria-expanded=
"false"
data-describedby=
".block-title"
>
{{ i18n "commons.accessibility.map_transcription" }}
</summary>
<ul>
{{ range $organizations }}
{{ with site.GetPage .path }}
{{ $address_geolocation := .Params.contact_details.postal_address.geolocation }}
{{ if $address_geolocation }}
<li>
{{ template "organization" (dict
"title" .Title
"summary" .Params.summary
"contact_details" .Params.contact_details
"options" (dict
"summary" $options.summary
"link" $options.link
)
)}}
</li>
{{ if $organizations }}
<div
class=
"transcription"
>
<details
id=
"{{- $id_transcription -}}"
class=
"map-transcription"
>
<summary
aria-controls=
"{{- $id_transcription -}}"
aria-expanded=
"false"
data-describedby=
".block-title"
>
{{ i18n "commons.accessibility.map_transcription" }}
</summary>
<ul>
{{ range $organizations }}
{{ with site.GetPage .path }}
{{ $address_geolocation := .Params.contact_details.postal_address.geolocation }}
{{ if $address_geolocation }}
<li>
{{ template "organization" (dict
"title" .Title
"summary" .Params.summary
"contact_details" .Params.contact_details
"options" (dict
"summary" $options.summary
"link" $options.link
)
)}}
</li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</ul>
</details>
</div>
</ul>
</details>
</div>
{{ $title := printf "%s %d" (i18n "blocks.organizations.title") $block_index }}
{{ if .title }}
{{ $title = .title }}
{{ end }}
{{ $title := printf "%s %d" (i18n "blocks.organizations.title") $block_index }}
{{ if .title }}
{{ $title = .title }}
{{ end }}
{{ $aria_label := i18n "commons.maps.label" $title }}
<div
class=
"organizations map"
data-map
data-marker-icon=
"{{ site.Params.organizations.map_marker_icon | default "
/
assets
/
images
/
map-marker.svg
"
}}"
role=
"region"
aria-label=
"{{ $aria_label }}"
>
{{- range $organizations }}
{{ with site.GetPage .path }}
{{ $address_geolocation := .Params.contact_details.postal_address.geolocation }}
{{ if $address_geolocation }}
{{ template "organization" dict
"title" .Title
"url" .Permalink
"logo" (index .Params $logo_index)
"latitude" $address_geolocation.latitude
"longitude" $address_geolocation.longitude
"summary" .Params.summary
"options" $options
}}
{{ $aria_label := i18n "commons.maps.label" $title }}
<div
class=
"organizations map"
data-map
data-marker-icon=
"{{ site.Params.organizations.map_marker_icon | default "
/
assets
/
images
/
map-marker.svg
"
}}"
role=
"region"
aria-label=
"{{ $aria_label }}"
>
{{- range $organizations }}
{{ with site.GetPage .path }}
{{ $address_geolocation := .Params.contact_details.postal_address.geolocation }}
{{ if $address_geolocation }}
{{ template "organization" dict
"title" .Title
"url" .Permalink
"logo" (index .Params $logo_index)
"latitude" $address_geolocation.latitude
"longitude" $address_geolocation.longitude
"summary" .Params.summary
"options" $options
}}
{{ end }}
{{ end }}
{{ end }}
{{ end -}}
</div>
\ No newline at end of file
{{ end -}}
</div>
{{ end }}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Arnaud Levy
@arnaudlevy
mentioned in commit
78bf1e55
·
3 months ago
mentioned in commit
78bf1e55
mentioned in commit 78bf1e55c3eff97cc8994a064eb4e07027b23c31
Toggle commit list
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