def request_item(request, full_request=False): li = T.li(class_='request clearfix')( display_date(request.target_date), T.span(class_='email')(T.a(href=urls.user_home(request.owner))(logic.user_info(request.owner).full_name), ':'), T.a(href=request.uri, class_='request-subject')(request.subject), ) if full_request: li( T.a(request.branch, href=config.git_branch_url % dict(branch=request.branch)), T.p(class_='content')(request.message), ) if request.target_date > util.tznow().date(): li.attrs['class'] += ' future' if request.urgent: li.attrs['class'] += ' urgent' if request.state == 'rejected': li.attrs['class'] += ' rejected' if request.owner == users.get_current_user(): li.attrs['class'] += ' own' li(request_badges(request), T.span(request.branch, class_='branch'), T.div(linkify(request.message), class_='message')) return li
def request_item(request): li = T.li(class_='request clearfix')( display_date(request.target_date), ' ', T.span(class_='email')(T.a(href=urls.user_home(request.owner))(logic.user_info(request.owner).full_name), ':'), ' ', T.a(href=request.uri, class_='request-subject')(request.subject), ' ', T.span(class_='verify')(request.time_to_verify), ) if request.target_date > util.tznow().date(): li.attrs['class'] += ' future' if request.urgent: li.attrs['class'] += ' urgent' if request.state == 'rejected': li.attrs['class'] += ' rejected' if request.owner == users.get_current_user(): li.attrs['class'] += ' own' if request.branch and '/' in request.branch: repo, _, branch = request.branch.partition('/') repo = 'devs/%s.git' % repo else: repo, branch = 'yelp-main.git', request.branch request_branch = T.a(request.branch, class_='branch', href=config.git_branch_url % dict(repo=repo,branch=branch)) li( ' ', request_badges(request), ' ', request_branch, ' ', T.div(linkify(request.message), class_='message'), ) return li
def request_item(request): li = T.li(class_='request')( display_date(request.target_date), T.span(class_='email')(T.a(href=urls.user_home(request.owner))(request.owner.nickname())), T.a(href=request.uri, class_='request-subject')(request.subject), ) if request.target_date > logic.tznow().date(): li.attrs['class'] += ' future' if request.urgent: li.attrs['class'] += ' urgent' if request.state == 'rejected': li.attrs['class'] += ' rejected' if request.owner == users.get_current_user(): li.attrs['class'] += ' own' li(request_badges(request)) return li
def user_home_link(user, user_info): return T.span(class_='email')(T.a(href=urls.user_home(user))(user_info.full_name))
def user_home_link(user): return T.span(class_='email')(T.a(href=urls.user_home(user))(user.nickname()))