Template source: activities/elements/widgets.html

{% load staticfiles %} {% load loc_tags %} {% load load_html_tags %} {% if widget_type == "recent_activities" %} {% if recent_activities %} <ul class="list-group"> <li class="list-group-item active"><strong>Recent Activity around {{city_name}}</strong></li> {% with request_loc_slug=request|get_loc_slug %} {% for activity in recent_activities %} {% if activity.get_cname == 'UserActivity'%} {% if activity.service %} <li class="list-group-item"><a href="/accounts/profile/view/{{activity.user.emailhash.hash_key}}"> {{activity.user.first_name}} {{activity.user.last_name}} </a> {{activity.activity_text}} <a href="/kidsactivities/{{activity.service.get_primary_name_slug}}"> {{activity.service.service_name}} </a> </li> {% elif activity.event %} {% if activity.user.service %} <li class="list-group-item"><a href="/accounts/regular_service_profile_public/{{activity.user.emailhash.hash_key}}"> {{activity.user.service.service_name}} </a> {{activity.activity_text}} <a href="/kidsevents/{{activity.event.event_name_slug}}/{{request_loc_slug}}"> {{activity.event.event_name}} </a> </li> {% else %} <li class="list-group-item"><a href="/accounts/profile/view/{{activity.user.emailhash.hash_key}}"> {{activity.user.first_name}} {{activity.user.last_name}} </a> {{activity.activity_text}} <a href="/kidsevents/{{activity.event.event_name_slug}}/{{request_loc_slug}}"> {{activity.event.event_name}} </a> </li> {% endif %} {% else %} <li class="list-group-item"><a href="/accounts/profile/view/{{activity.user.emailhash.hash_key}}"> {{activity.user.first_name}} {{activity.user.last_name}} </a> {{activity.activity_text}}</li> {% endif %} {% elif activity.get_cname == 'EventActivity'%} <li class="list-group-item"> {{ activity | load_html_for_activity }} </li> {% else %} <li class="list-group-item"><a href="/kidsactivities/{{activity.service_location.name_slug}}"> {{activity.service_location.service.service_name}}</a> {{activity.activity_text}} </li> {% endif %} {% endfor %} {% endwith %} </ul> {% endif %} {% endif%} {% if widget_type == "popular_services" %} {% if popular_services %} <ul class="list-group"> <li class="list-group-item active"><strong>Popular</strong></li> {% for popular_service in popular_services %} {% if popular_service.rating %} <li class="list-group-item" style="background:none !important;"> {% if popular_service.rating.rating_average >= 1 and popular_service.rating.rating_average < 1.25%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 1 star <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 1.25 and popular_service.rating.rating_average < 1.75 %} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 1.5 stars <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 1.75 and popular_service.rating.rating_average < 2.25%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 2 stars <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 2.5 and popular_service.rating.rating_average < 2.75%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 2.5 stars <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 2.75 and popular_service.rating.rating_average < 3.25%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 3 stars <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 3.25 and popular_service.rating.rating_average < 3.75%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 3.5 stars <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 3.75 and popular_service.rating.rating_average < 4.25%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 4 stars <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 4.25 and popular_service.rating.rating_average < 4.75%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 4.5 stars <b></b></div> {% endif %} {% if popular_service.rating.rating_average >= 4.75 and popular_service.rating.rating_average < 5.25%} <div><a href ="/kidsactivities/{{popular_service.get_primary_name_slug}}">{{popular_service.service_name}} </a>: 5 stars <b></b></div> {% endif %} {% include "services/user_service/rating.html" with rating_average=popular_service.rating.rating_average %} </li> {% endif%} {% endfor %} </ul> {% endif %} {% endif%} {% if widget_type == "signup_updates" %} {% if request.user.is_authenticated != True %} <ul class="list-group"> <li class="list-group-item active"><strong>Sign Up for FREE</strong></li> <li class="list-group-item"><p>Parents, don't miss out on trending after school activities, local events and community members in your neighborhood.</p><p><a href="/accounts/register/">Sign up</a> to get latest updates via email.</p></li> </ul> {% endif%} {% endif%}