diff --git a/usta/templates/usta/map.html b/usta/templates/usta/map.html index adeadfd969395ebf89d93951495f521f6458676e..7c75928fca1521478328a87a5ac6aefdbf7cdbc8 100644 --- a/usta/templates/usta/map.html +++ b/usta/templates/usta/map.html @@ -103,6 +103,15 @@ <th class="map-phone">Phone</th> <th class="map-description">Description</th> </tr> + {% if radisson %}{# Host hotel comes first #} + <tr> + <td class="">{% if radisson.link %}<a href="{{ radisson.link }}">{% endif %}{{ radisson.name }}{% if radisson.link %}</a>{% endif %}</td> + <td class=" map-address"><a target="_blank" title="Directions" href='http://maps.google.com/?q=%22{{ radisson.address|urlencode:"" }}%22'>{{ radisson.address }}</a></td> + <td class="">{{ radisson.rate }}</td> + <td>{{ radisson.phone }}</td> + <td class="map-description">{{ radisson.description }}</td> + </tr> + {% endif %} {% for location in places %} <tr> <td class="">{% if location.link %}<a href="{{ location.link }}">{% endif %}{{ location.name }}{% if location.link %}</a>{% endif %}</td> diff --git a/usta/views.py b/usta/views.py index 12b0db8fda92b083d2e36cef365af5c038344ae0..a692f71297412b1e2d9ef9eff0800628d8f15291 100644 --- a/usta/views.py +++ b/usta/views.py @@ -244,19 +244,24 @@ def map_view(request): letter = MapLocation.static_get_category_letter(category) icon = 'images/map_pins/{0}.png'.format(letter.lower()) key = (name, name.replace(' ', '_'), icon) - locations[key] = MapLocation.objects.filter(category=category) + locations[key] = MapLocation.objects.filter( + category=category).order_by('name').exclude( + name__contains="Radisson") map_center = "{lat: 42.291, lng: -85.598}" site_settings = get_site_settings() hotels_information = site_settings.get_setting('hotels_document', None) parking_information = site_settings.get_setting('parking_document', None) + radisson = MapLocation.objects.filter(name__contains="Radisson").first() + return render(request, 'usta/map.html', { 'locations': locations, 'map_center': map_center, 'GOOGLE_API_KEY': getattr(settings, 'GOOGLE_API_KEY', ''), 'hotels_information': hotels_information, 'parking_information': parking_information, + 'radisson': radisson, 'title': 'Map Locations', 'show_generic': True, })