Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #94

Merged
merged 1 commit into from
Apr 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 16 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,36 @@
# SilverStripe Locator

[![Build Status](https://travis-ci.org/dynamic/silverstripe-locator.svg?branch=master)](https://travis-ci.org/dynamic/silverstripe-locator)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/dynamic/silverstripe-locator/badges/quality-score.png?b=1.1)](https://scrutinizer-ci.com/g/dynamic/silverstripe-locator/?branch=1.1)
[![Code Coverage](https://scrutinizer-ci.com/g/dynamic/silverstripe-locator/badges/coverage.png?b=1.1)](https://scrutinizer-ci.com/g/dynamic/silverstripe-locator/?branch=1.1)
[![Build Status](https://scrutinizer-ci.com/g/dynamic/silverstripe-locator/badges/build.png?b=1.1)](https://scrutinizer-ci.com/g/dynamic/silverstripe-locator/build-status/1.1)
[![codecov.io](https://codecov.io/github/dynamic/silverstripe-locator/coverage.svg?branch=master)](https://codecov.io/github/dynamic/silverstripe-locator?branch=master)

![codecov.io](https://codecov.io/github/dynamic/silverstripe-locator/branch.svg?branch=master)
SilverStripe Locator displays a filterable map of locations. You can choose whether to show all locations on load, or enable auto geocoding to filter the initial list based on the visitor's location.

Overview
=================================
## Requirements

The Locator module displays a searchable map of locations. You can choose whether to show all locations on load, or enable auto geocoding to filter the initial list based on the visitor's location.
* SilverStripe 3.1.x or higher
* [Addressable Module](https://github.com/silverstripe-australia/silverstripe-addressable) by for location geocoding

Composer Installation
=================================
## Installation

`"require": { "dynamic/silverstripe-locator": "dev-master }`
`composer require "dynamic/silverstripe-locator" "dev-master"`

Add `locator` and `addressable` to your `.gitignore`

Git Installation
=================================

`git clone [email protected]:dynamic/SilverStripe-Locator-Module.git locator`

`git clone [email protected]:ajshort/silverstripe-addressable.git addressable`
## Example usage

`rm -rf .git` (optional, to remove existing git repo)
Displays a filterable list of locations on a map. Users can filter by address or category to find the location nearest them.

Requirements
=================================
With auto geocoding enabled in the CMS, the map will display the nearest 26 locations to the user.

* SilverStripe 3.1.x
* Addressable Module by ajshort for Location geocoding - https://github.com/ajshort/silverstripe-addressable
![screen shot](images/Locator.png)

Use
=================================

Create a Locator page in the CMS. Locations are managed under the Locations tab in the CMS via Model Admin. Simply enter the name and address of each location, and they will appear on the map.

~~To customise locations with custom fields, do as you normally would using a DataExtension. Then copy LocationXML.ss, infowindow-description.html and location-list-description.html into your theme's template folder.
You can add new fields from the DataExtension to the LocationXML.ss to access them in the two .html templates. (i.e. `<marker newField="$newField.XML">` and in the html templates `{{newField}}`)~~

Maintainer Contact
=================================

* Dynamic (<[email protected]>)

Links
=================================

* [SilverStripe Addressable](https://github.com/ajshort/silverstripe-addressable) by Andrew Short
* [jQuery Store Locator Plugin](https://github.com/bjorn2404/jQuery-Store-Locator-Plugin)
* [SilverStripe CMS](http://www.silverstripe.org/)

License
=================================
## Documentation

Copyright (c) 2013, Dynamic Inc
All rights reserved.
See the [docs/en](docs/en/index.md) folder.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
## Maintainer Contact

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* [Dynamic](http://www.dynamicagency.com) (<[email protected]>)
18 changes: 18 additions & 0 deletions docs/en/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#SilverStripe Locator

## User Guide

Create a Locator page in the CMS. Enabling Auto Geocode will return the 26 nearest locations to that user's current location. If not enabled, all locations will be shown on the map.

You can also filter locations by one or more categories. This is useful if you'd like to have multiple Locators in a site with different locations on each map.

![screen shot](../../images/LocatorPage.png)

Locations are managed under the Locations tab in the CMS via Model Admin. Simply enter the name and address of each location, and the coordinates will be generated on save.

![screen shot](../../images/LocatorCMS.png)

Those locations marked as `ShowInLocator` will display on the map, per your Locator page settings.

![screen shot](../../images/Locator.png)

Binary file added images/Locator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/LocatorCMS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/LocatorPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.