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 |
catch more exceptions higher up in the hierarchy
- don't stop checking all pods if there's just one malfolmed pod
avoid echoing the complete body on json error
add tooltips in the frontend
fix a JS problem with empty hostname
use `find_in_batches` correctly
add a migration to clean up the pods table + unique index on hostname