Template source: activities/display_activities.html

{% extends "base.html" %} {% load loc_tags %} {% load load_html_tags %} {% load dictionary_tags %} {% block addMetaTags %} {% if subcategory %} {% if category == "dance" or category == "music-and-instruments" %} <meta name="description" content="Kids lessons in {{loc_string}} for {{category_name}}. {% include 'activities/elements/subcategory_meta.html' with subcategory=subcategory %}"> {% elif category == "academicslanguages" %} <meta name="description" content="Kids tutors in {{loc_string}} for {{category_name}}. {% include 'activities/elements/subcategory_meta.html' with subcategory=subcategory %}"> {% else %} <meta name="description" content="List of Kids activity providers in {{loc_string}} for {{category_name}}. {% include 'activities/elements/subcategory_meta.html' with subcategory=subcategory %}"> {% endif %} {% else %} {% if category == "dance" or category == "music-and-instruments" %} <meta name="description" content="Kids lessons in {{loc_string}} for {{category_name}}, {% for obj in subcategories|keyvalue:category %}{{obj.name}}{% if forloop.counter != subcategories|keyvalue:category|length %}, {% endif %}{% endfor %}."> {% elif category == "academicslanguages" %} <meta name="description" content="Kids tutors in {{loc_string}} for {{category_name}}, {% for obj in subcategories|keyvalue:category %}{{obj.name}}{% if forloop.counter != subcategories|keyvalue:category|length %}, {% endif %}{% endfor %}."> {% else %} <meta name="description" content="List of Kids activity providers in {{loc_string}} for {{category_name}}, {% for obj in subcategories|keyvalue:category %}{{obj.name}}{% if forloop.counter != subcategories|keyvalue:category|length %}, {% endif %}{% endfor %}."> {% endif %} {% endif %} {% endblock %} {% block titleTag %} {% if category == "academicslanguages" %} <title> Best {{category_name}} Tutors in {{loc_string}}</title> {% elif category == "multifunctional" %} <title> Best {{category_name}} Providers for Kids in {{loc_string}}</title> {% elif category == "college-preparation" %} <title> Best {{category_name}} Providers in {{loc_string}}</title> {% elif category == "dance" or category == "music-and-instruments" %} <title> Best Providers for {{category_name}} lessons in {{loc_string}}</title> {% else %} <title> Best {{category_name}} providers for Kids in {{loc_string}}</title> {% endif %} {% endblock %} {% load static from staticfiles %} {% block loadAdditionalCSS %} {% load staticfiles %} {% endblock %} {% block content %} <br> <div class="modal fade" id="changelocation" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form class="form-horizontal" role="form"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="myModalLabel">Change Location</h4> </div> <div class="modal-body"> <div class="form-group"> <label for="clocation" class="col-sm-4 control-label">Change Location</label> <div class="col-sm-8"> <input class="form-control" id="clocation" placeholder="Enter Location" required="" type="text"> </div> </div> <div class="form-group"> <label for="cdefault" for="location" class="col-sm-4"> </label> <div class="col-sm-8 col-lg-8"> <input type="checkbox">Set as Default </div> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary">Update Location</button> </div> </div> </form> </div> </div> </div> <div class="container-fluid"> {% if category == "academicslanguages" %} {% include "activities/elements/page-title.html" with title="Best "|add:category_name|add:" Tutors in "|add:loc_string %} {% elif category == "multifunctional" %} {% include "activities/elements/page-title.html" with title="Best "|add:category_name|add:" Providers for Kids in "|add:loc_string %} {% elif category == "college-preparation" %} {% include "activities/elements/page-title.html" with title="The Best "|add:category_name|add:" Providers in "|add:loc_string %} {% elif category == "dance" or category == "music-and-instruments" %} {% include "activities/elements/page-title.html" with title="Best Providers for "|add:category_name|add:" Lessons in "|add:loc_string %} {% else %} {% include "activities/elements/page-title.html" with title="Best "|add:category_name|add:" Providers for Kids in "|add:loc_string %} {% endif %} <div class="col-sm-3 col-md-3 side-nav-panel"> <div class="panel-group pushmenu-left mobile-filter" id="accordion"> {% for category in categories %} {% with category_name_slug=category.name_slug%} <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion" href="#collapse{{category_name_slug}}" id="{{category_name_slug}}"> <span class="glyphicon glyphicon-chevron-down pull-right"></span> <a id="{{category_name_slug}}" href= "{% url 'view_category_all_listings' category_name_slug city_name_slug %}" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'ClassProvidersLeftNavCatLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedCatLink' });" >{{category.name}} </a> </a> </h4> </div> <div id="collapse{{category_name_slug}}" class="panel-collapse collapse"> <div class="panel-body"> <ul> <!-- for object in the set that is returned by the function --> {% for obj in subcategories|keyvalue:category_name_slug %} <!-- <li><a href="/classes/view/{{obj}}">{{ obj }} </a></li> --> <li><a id="{{obj.name_slug}}" href = "{% url 'view_category_listings' obj.name_slug city_name_slug %}" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'ClassProvidersLeftNavSubCatLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedSubCatLink' });" >{{ obj.name }}</a></li> {% endfor %} </ul> </div> </div> </div> {% endwith %} {% endfor %} <p></p> <p><a href="/kids-activities/all-categories">See all Categories/tags</a></p> </div> </div> <div class="col-lg-6 col-md-6"> {% if service_locations %} {% for sl in service_locations %} <div class="cat-section"> <div class="row"> <div class="col-lg-4 col-md-4 image-thumb"> {% if sl.primary_photo_url %} <a href="/kidsactivities/{{sl.name_slug}}"> <img src= "{{ sl.primary_photo_url }}" alt="{{ sl.primary_photo_description }}" class="img-rounded"> </a> {% elif sl.service_logo_url %} <a href="/kidsactivities/{{sl.name_slug}}"> <img src= "{{sl.service_logo_url}}" class="img-rounded" alt ="{{sl.name_slug}}"> </a> {% else %} {% if "other" in sl.service_subcategory_slug %} <a href="/kidsactivities/{{sl.name_slug}}"> <img src= "{% static "" %}img/homepage/{{sl.service_category_slug}}.jpg" alt="{{service_category}}" class="img-rounded"> </a> {% else %} <a href="/kidsactivities/{{sl.name_slug}}"> <img src= "{% static "" %}img/homepage/{{sl.service_subcategory_slug}}.jpg" alt="{{sl.service_subcategory}}" class="img-rounded"> </a> {% endif %} {% endif %} </div> <div class="col-lg-4 col-md-4"> <h3 style="margin:0px;"><a href="/kidsactivities/{{sl.name_slug}}" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'ClassProvidersServiceNameLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedClassProvidersServiceNameLink' });"> {{sl.service_name}} </a></h3> {% if sl.rating_average %} <div> <div><b></b></div> {% include "services/user_service/rating.html" with rating_average=sl.rating_average %} </div><!-- business ratings --> {% endif %} <div> {{sl.class_count_display}} </div><!--classes-listed--> <div class="listing-tags"> {% for tag in sl.tags %} {% if forloop.counter < 5 %} <a href="/activities/search_results?q={{ search_query_string }}&amp;tag={{ tag }}&amp;st=tag&amp;loc={{city_name_slug}}&amp;sort=">{{ tag }}</a>{% if forloop.counter < sl.tag_count and forloop.counter < 4 %},&nbsp;{% endif %} {% endif %} {% endfor %} </div><!--listing-tags--> </div> <!-- class providers - address should be in this order as city,(space) state (space) zipcode --> <div class="col-lg-4 col-md-4"> <span>{{sl.address}}</span> <br> {% if sl.address2 %} <span>{{ sl.address2 }}</span> <br/> {% endif %} <span>{{sl.city}}, {{sl.state}} {{sl.zipcode}}</span> {% if sl.has_multiple_locations %} <br> <span> <a href="/kidsactivities/{{ sl.name_slug }}"> More Locations </a></span> {% endif %} {% if sl.register_online_allowed %} <br> <a href="/{{sl.name_slug}}/classes-camps-schedule"><span style= "color: #16A085">Register Online</span></a> {% endif %} {% if sl.has_discounts_available %} <br> <a href="/{{sl.name_slug}}/classes-camps-schedule"><span style= "color: #16A085">Discounts Available</span></a> {% endif %} </div> </div> <br/> <div class="row"> <div class="col-lg-12 col-md-12"> {% if sl.service_description != 'null' %} <span>{{sl.service_description|truncatechars:243}}</span> {% endif %} <div class="clearfix"> </div> </div> </div> </div> {% endfor %} {% else %} <span style="color:#FF8C00"> No class providers in your area under this category. {% if not request.user.is_authenticated %}<a href="/accounts/register">User Sign Up</a> <font color="black">|</font> <a href="/services/register">Provider Sign Up{% endif %} </span> {% endif %} </div> <div class="col-lg-3 col-md-3"> {% if discounts_and_deals %} <ul class="list-group"> <li class="list-group-item active"><strong>Discounts and Deals</strong></li> <!-- might need another field in the future to distinguish admin created discounts --> {% for provider_name_slug, class_session_sqs in discounts_and_deals.items %} {% with discount=class_session_sqs|get_discount_from_class_session_sqs %} {% if discount.creator.service %} <li class="list-group-item"> {% if discount.is_percent_discount %} {{discount.discount_amount}}% {% else %} ${{discount.discount_amount}} {% endif %} {{discount.discount_name}} for <a href="/{{provider_name_slug}}/classes-camps-schedule"> {{class_session_sqs.class_name}} </a> {% if class_session_sqs.provider_has_multiple_discounts %} and other discounts {% endif %} by <a href="/kidsactivities/{{provider_name_slug}}#classes"> {{class_session_sqs.provider_name}}</a> </li> {% endif %} {% endwith %} {% endfor %} </ul> {% endif %} {% include "activities/elements/widgets.html" with widget_type="signup_updates" %} {% include "activities/elements/widgets.html" with widget_type="recent_activities" %} {% include "activities/elements/widgets.html" with widget_type="popular_services" %} </div> </div> </br> {% endblock %} {% block loadAdditionalJS %} <!-- Common JS --> {% include "activities/elements/script.html" %} <script> $('#nav_classproviders').addClass("selected-tab"); $menuLeft = $('.pushmenu-left'); $nav_list = $('.nav_list'); $nav_list.click(function () { $(this).toggleClass('active'); $('.pushmenu-push').toggleClass('pushmenu-push-toright'); $menuLeft.toggleClass('pushmenu-open'); }); var category = "{{ category }}"; var subcategory = "{{ subcategory }}"; // function to refresh the page, encoding current state of the page, // such as the field to sort on var refresh = function() { var sortingData = $('#sort_select').serialize(); var url = ""; {% if subcategory %} url = "{% url 'view_category_listings' subcategory city_name_slug %}" {% else %} url = "{% url 'view_category_all_listings' category city_name_slug %}" {% endif %} window.location = url + "?" + sortingData; }; $("#sort_select").change(refresh); var url_params = getUrlParameters(window.location.toString()) if ('sort' in url_params) { $('#sort_select').val(url_params['sort'].replace(/\+/g, ' ')) } function collapse_left_nav(category, subcategory) { console.log(category); console.log(subcategory); selector = "#" + category; $(selector).parent().parent().next().collapse('toggle'); $(selector).addClass('active-menu-item'); selector = "#" + subcategory; $("li " + selector).parent().addClass('active'); } $(document).ready(function() { collapse_left_nav(category, subcategory); }); </script> <script> try{ var pageType = "Class Providers All" ga('set', 'dimension1', 'pageType'); ga('send', 'pageview'); }catch(error){ console.log(error.message) } </script> {% endblock %}