Display map samples tab in dataset page #2162
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request for issue: #718
http://gigadb.gigasciencejournal.com/dataset/100020
How to test?
protected/views/shared/_mapbrowse.php
set theUSE_TEST_LOCATIONS
totrue
and refresh the map. I have left this test for reviewers to have an easy time seeing a more complete map, but I think it would be ok to remove it after this is reviewedHow have functionalities been implemented?
protected/views/shared/_mapbrowse.php
and most of the code was refactored toprotected/js/map-browse/index.js
so that we can reuse the map in multiple viewsSiteController
that was in charge of building the locations array for the map is moved to a helper componentprotected/components/SampleLocationHelper.php
so that it can be reused in theDatasetController
less/modules/map.less
mainly to make the popup look betterAny issues with implementation?
generateRandomLocation
function that adds mock locations for testing. I would prefer to simply have more test data in local devhttp://dx.doi.org/10.5524/${dataset}
but link / redirect to the production gigadb website (from the local dev site). It looks like we redirect in the controller. It is not a big problem but for consistency I think it might be better to redirect to the current domainYII_DEBUG
to be true in test environments and false in production but it would be good to confirm. I would like to use an environment variable that is only true on local devAny changes to automated tests?