@check_login_required
@check_local_site_access
def bug_infobox(request, review_request_id, bug_id, template_name=u'reviews/bug_infobox.html', local_site=None):
 (review_request, response) = _find_review_request(request, review_request_id, local_site)
 if (not review_request):
  return response
 repository = review_request.repository
 bug_tracker = repository.bug_tracker_service
 if (not bug_tracker):
  return HttpResponseNotFound(_(u'Unable to find bug tracker service'))
 if (not isinstance(bug_tracker, BugTracker)):
  return HttpResponseNotFound((_(u'Bug tracker %s does not support metadata') % bug_tracker.name))
 bug_info = bug_tracker.get_bug_info(repository, bug_id)
 bug_description = bug_info[u'description']
 bug_summary = bug_info[u'summary']
 bug_status = bug_info[u'status']
 if ((not bug_summary) and (not bug_description)):
  return HttpResponseNotFound((_(u'No bug metadata found for bug %(bug_id)s on bug tracker %(bug_tracker)s') % {u'bug_id': bug_id, u'bug_tracker': bug_tracker.name}))
 escaped_description = escape(bug_description).replace(u'\n\n', u'<br/><br/>')
 return render_to_response(template_name, RequestContext(request, {u'bug_id': bug_id, u'bug_description': mark_safe(escaped_description), u'bug_status': bug_status, u'bug_summary': bug_summary}))

@ check_login_required @ check_local_site_access def bug_infobox ( request , review_request_id , bug_id , template_name = u'reviews/bug_infobox.html' , local_site = None ) : ( review_request , response ) = _find_review_request ( request , review_request_id , local_site ) if ( not review_request ) : return response repository = review_request . repository bug_tracker = repository . bug_tracker_service if ( not bug_tracker ) : return HttpResponseNotFound ( _ ( u'Unable to find bug tracker service' ) ) if ( not isinstance ( bug_tracker , BugTracker ) ) : return HttpResponseNotFound ( ( _ ( u'Bug tracker %s does not support metadata' ) % bug_tracker . name ) ) bug_info = bug_tracker . get_bug_info ( repository , bug_id ) bug_description = bug_info [ u'description' ] bug_summary = bug_info [ u'summary' ] bug_status = bug_info [ u'status' ] if ( ( not bug_summary ) and ( not bug_description ) ) : return HttpResponseNotFound ( ( _ ( u'No bug metadata found for bug %(bug_id)s on bug tracker %(bug_tracker)s' ) % { u'bug_id' : bug_id , u'bug_tracker' : bug_tracker . name } ) ) escaped_description = escape ( bug_description ) . replace ( u'\n\n' , u'<br/><br/>' ) return render_to_response ( template_name , RequestContext ( request , { u'bug_id' : bug_id , u'bug_description' : mark_safe ( escaped_description ) , u'bug_status' : bug_status , u'bug_summary' : bug_summary } ) )
displays a bug info popup .