# Path: apps/team/control.py
# def get_team_emails(team, excludes=None):
# def get_teams(account):
# def get_or_404(link):
# def is_member(account, team):
# def create(account, name, country, logo, application):
# def notify_staff_team_created(sender, **kwargs):
# def notify_team_join_request_created(sender, **kwargs):
# def notify_team_join_request_processed(sender, **kwargs):
# def notify_concerned_remove_request_created(sender, **kwargs):
# def notify_team_remove_request_created(sender, **kwargs):
# def notify_team_remove_request_processed(sender, **kwargs):
# def can_replace_logo(account, team):
# def replace_logo(account, team, logo):
# def can_join(account, team):
# def create_join_request(account, team, application):
# def can_process_join_request(account, join_request):
# def process_join_request(account, join_request, response, status):
# def has_remove_request(concerned, team):
# def can_create_remove_request(requester, concerned, team):
# def can_process_remove_request(account, remove_request):
# def create_remove_request(requester, concerned, team, reason):
# def process_remove_request(account, remove_request, response, status):
# def site_link_exists(team, site):
# def can_create_link(account, team, site, profile):
# def can_delete_link(account, team, link):
# def link_create(account, team, site, profile):
# def link_delete(account, team, link):


from django import template
from django.utils.translation import ugettext as _
from apps.team import control
from apps.common.templatetags.condition_tag import condition_tag
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 





register = template.Library()


@register.tag
@condition_tag
def if_member(account, team):
    return account and control.is_member(account, team)


@register.tag
@condition_tag
def if_can_join(account, team):
    return account and control.can_join(account, team)


@register.tag
@condition_tag
def if_can_process_join_request(account, join_request):

# Path: apps/team/control.py
# def get_team_emails(team, excludes=None):
# def get_teams(account):
# def get_or_404(link):
# def is_member(account, team):
# def create(account, name, country, logo, application):
# def notify_staff_team_created(sender, **kwargs):
# def notify_team_join_request_created(sender, **kwargs):
# def notify_team_join_request_processed(sender, **kwargs):
# def notify_concerned_remove_request_created(sender, **kwargs):
# def notify_team_remove_request_created(sender, **kwargs):
# def notify_team_remove_request_processed(sender, **kwargs):
# def can_replace_logo(account, team):
# def replace_logo(account, team, logo):
# def can_join(account, team):
# def create_join_request(account, team, application):
# def can_process_join_request(account, join_request):
# def process_join_request(account, join_request, response, status):
# def has_remove_request(concerned, team):
# def can_create_remove_request(requester, concerned, team):
# def can_process_remove_request(account, remove_request):
# def create_remove_request(requester, concerned, team, reason):
# def process_remove_request(account, remove_request, response, status):
# def site_link_exists(team, site):
# def can_create_link(account, team, site, profile):
# def can_delete_link(account, team, link):
# def link_create(account, team, site, profile):
# def link_delete(account, team, link):


# Path: apps/team/templatetags/team_tags.py
from django import template
from django.utils.translation import ugettext as _
from apps.team import control
from apps.common.templatetags.condition_tag import condition_tag

# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 





register = template.Library()


@register.tag
@condition_tag
def if_member(account, team):
    return account and control.is_member(account, team)


@register.tag
@condition_tag
def if_can_join(account, team):
    return account and control.can_join(account, team)


@register.tag
@condition_tag
def if_can_process_join_request(account, join_request):

    return control.can_process_join_request(account, join_request)