Beispiel #1
0
def advanced_map_view(request):
    pilegroups = [(pilegroup, ordered_piles(pilegroup))
                  for pilegroup in ordered_pilegroups()]

    return render_to_response_per_partner('advanced_map.html', {
            'pilegroups': pilegroups
            }, request)
Beispiel #2
0
def level3_test_links(request):
    '''Temporary page for Level 3 page user testing on smartphones.'''
    piles = []
    for pilegroup in ordered_pilegroups():
        for pile in ordered_piles(pilegroup):
            piles.append((pile, get_simple_url('simple', pilegroup, pile)))
    return render(request, 'level3_test_links.html', {'piles': piles})
Beispiel #3
0
def level3_test_links(request):
    '''Temporary page for Level 3 page user testing on smartphones.'''
    piles = []
    for pilegroup in ordered_pilegroups():
        for pile in ordered_piles(pilegroup):
            piles.append((pile, get_simple_url('simple', pilegroup, pile)))
    return render(request, 'level3_test_links.html', {
            'piles': piles
        })
Beispiel #4
0
def video_view(request):
    # The Getting Started video is first, followed by videos for the pile
    # groups and piles in the order that they are presented in the stepwise
    # pages at the beginning of plant identification.
    videos = []
    getting_started_video = Video.objects.get(title="Getting Started")
    if getting_started_video:
        videos.append({"title": getting_started_video.title, "youtube_id": getting_started_video.youtube_id})

    for pilegroup in ordered_pilegroups():
        videos.append(_get_video_dict(pilegroup.friendly_title, pilegroup.video))
        for pile in ordered_piles(pilegroup):
            videos.append(_get_video_dict(pile.friendly_title, pile.video))

    return render_to_response("gobotany/video.html", {"videos": videos}, context_instance=RequestContext(request))
Beispiel #5
0
def level1(request, key):
    short_name = partner_short_name(request)
    groups_list_page = GroupsListPage.objects.get()

    pilegroups = []
    for pilegroup in ordered_pilegroups():
        images = _images_with_copyright_holders(
            ContentImage.objects.filter(
                pilegroupimage__pile_group=pilegroup)
            .select_related('image_type'))
        pilegroups.append((pilegroup, images, get_simple_url(key, pilegroup)))

    return render_per_partner('simple.html', {
                'partner_site': short_name,
                'groups_list_page': groups_list_page,
                'key': key,
                'pilegroups': pilegroups
                }, request)
Beispiel #6
0
def level1(request, key):
    short_name = partner_short_name(request)
    groups_list_page = GroupsListPage.objects.get()

    pilegroups = []
    for pilegroup in ordered_pilegroups():
        images = _images_with_copyright_holders(
            ContentImage.objects.filter(pilegroupimage__pile_group=pilegroup).
            select_related('image_type'))
        pilegroups.append((pilegroup, images, get_simple_url(key, pilegroup)))

    return render_per_partner(
        'simple.html', {
            'partner_site': short_name,
            'groups_list_page': groups_list_page,
            'key': key,
            'pilegroups': pilegroups
        }, request)
Beispiel #7
0
def video_view(request):
    # The Getting Started video is first, followed by videos for the pile
    # groups and piles in the order that they are presented in the stepwise
    # pages at the beginning of plant identification.
    videos = []
    getting_started_video = Video.objects.get(title='Getting Started')
    if getting_started_video:
        videos.append({'title': getting_started_video.title,
                       'youtube_id': getting_started_video.youtube_id});

    for pilegroup in ordered_pilegroups():
        videos.append(_get_video_dict(pilegroup.friendly_title,
                                      pilegroup.video))
        for pile in ordered_piles(pilegroup):
            videos.append(_get_video_dict(pile.friendly_title, pile.video))

    return render_to_response_per_partner('video.html', {
           'videos': videos,
           }, request)
Beispiel #8
0
def video_view(request):
    # The Getting Started video is first, followed by videos for the pile
    # groups and piles in the order that they are presented in the stepwise
    # pages at the beginning of plant identification.
    videos = []
    getting_started_video = Video.objects.get(title='Getting Started')
    if getting_started_video:
        videos.append({
            'title': getting_started_video.title,
            'youtube_id': getting_started_video.youtube_id
        })

    for pilegroup in ordered_pilegroups():
        videos.append(
            _get_video_dict(pilegroup.friendly_title, pilegroup.video))
        for pile in ordered_piles(pilegroup):
            videos.append(_get_video_dict(pile.friendly_title, pile.video))

    return render_per_partner('video.html', {
        'videos': videos,
    }, request)
Beispiel #9
0
def advanced_map_view(request):
    pilegroups = [(pilegroup, ordered_piles(pilegroup)) for pilegroup in ordered_pilegroups()]

    return render_to_response(
        "gobotany/advanced_map.html", {"pilegroups": pilegroups}, context_instance=RequestContext(request)
    )
Beispiel #10
0
def advanced_map_view(request):
    pilegroups = [(pilegroup, ordered_piles(pilegroup))
                  for pilegroup in ordered_pilegroups()]

    return render_per_partner('advanced_map.html', {'pilegroups': pilegroups},
                              request)
Beispiel #11
0
def advanced_map_view(request):
    pilegroups = [(pilegroup, ordered_piles(pilegroup)) for pilegroup in ordered_pilegroups()]

    return render_per_partner("advanced_map.html", {"pilegroups": pilegroups}, request)