and remove the possibility to disable the map feature.
By default the application uses the itles of Heidelberg University that
don't need any credentials. If podmins enable the mapbox option in the
diaspora.yml and enter their credentials the mapbox tiles are used for the map
rendering.
- refactor code for toggle map function
- adjust jasmine tests for maps and add tests for SPV
- change name of access token in defaults.yml according to naming conventions
- add explanation of map use for podmins
- add location to post_presenter
- fix opening multiple maps inside the stream when clicking on a reshare location
(#5813)
to provide a clear arrangement of all location data
- add 'L' to predefs for pronto because it is part of the leaflet library
- fix: show address template only with an address present
with merging the location objects into one, only the objects within
the location object can be empty
(#5813)
- add coordinates in post_presenter
- add map to the SPV if location is provided
- add leaflet.js to render map and marker of position
- make coordinates available in frontend
- add map scss
- make stream post location clickable and redirect to the SPV
- prevent render map if no location data is provided
- add tests for coordinates
- use the leaflet gem instead of the JS assets
(#5813)
Hardly a total fix, but it's a start. Based on meitar/diaspora:b5c01598.
* app/models/services/tumblr.rb: style: double-quote string
Line 22. Change from single-quotes.
* app/models/services/tumblr.rb: parse URL only for blogs we care about
...which in this case is just the primary.
This also fixes the failed test in 7079fda (and by extension, 7a1d3a9).
* spec/models/services/tumblr_spec.rb: Add "primary" flag to test user-info
* spec/models/services/tumblr_spec.rb: Add a secondary blog to test user-info
This should not cause a request to be issued, so we can continue to
expect the request for the primary blog only. Any request for the
secondary indicates a bug in the service implementation.
* spec/models/services/tumblr_spec.rb: Make the second blog returned the primary
Just to catch if it's picking the first one
* app/models/services/tumblr.rb: use blogs.find instead of blogs.each
Since we're only handling the primary blog, this should be easy enough
* app/models/services/tumblr.rb: Remove redundant if block
The condition it would have caught is dealt with by the ifnone on the find
* app/models/services/tumblr.rb: Style: remove space between { and |