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

No Locations Indication in template #7

Closed
jsirish opened this issue Dec 2, 2013 · 4 comments · Fixed by #31
Closed

No Locations Indication in template #7

jsirish opened this issue Dec 2, 2013 · 4 comments · Fixed by #31

Comments

@jsirish
Copy link
Member

jsirish commented Dec 2, 2013

Add some language to the default template indicating when there are no locations created or meeting the criteria to show on map. Currently seems to be confusing to people installing the module for the first time.

@muskie9
Copy link
Member

muskie9 commented May 6, 2014

Would this be fixed by adding default records similar to the Blog module on dev/build?

@jsirish
Copy link
Member Author

jsirish commented May 6, 2014

That’s one way to do it, would work well for initial install of module.

However, I was thinking of a scenario where locations are more fluid - maybe one day, there’s a couple mapped locations, but the next there are none. Would be a simple message like “No locations have been posted, please check back soon”, and would skip all of the JS script execution.

On May 5, 2014, at 11:11 PM, muskie9 [email protected] wrote:

Would this be fixed by adding default records similar to the Blog module on dev/build?


Reply to this email directly or view it on GitHub.

@muskie9
Copy link
Member

muskie9 commented May 6, 2014

So something like this (only requiring js if there are locations from the getter method) :

<% if $AreLocations %>
        <div id="form-container">
            $LocationSearch
        </div>

        <div id="map-container">
            <div id="map"></div>
                <div id="loc-list">
                    <ul id="list">
                        <li><img src="locator/images/ajax-loader.gif" class="loading"></li>
                    </ul>
                </div>
            </div>
        </div>
    <% else %>
        <div id="no-locals">
            <h3>Sorry, there are no locations at this time. Please check back later.</h3>
        </div>
    <% end_if %>

@jsirish
Copy link
Member Author

jsirish commented May 6, 2014

Yeah exactly. But we may need to disable the JS init call in the controller as well so we don't get a bunch of JS errors without the required Divs.

muskie9 added a commit that referenced this issue Sep 23, 2014
Update Locator to handle null locations
fixes #7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants