def project_status_represent(value):
 if (current.auth.permission.format == 'geojson'):
  return value
 if (value >= 80):
  colour = '00ff00'
 elif (value >= 60):
  colour = 'ffff00'
 else:
  colour = 'ff0000'
 represent = IS_FLOAT_AMOUNT.represent(value, precision=2)
 return SPAN(represent, _class='project_status', _style=('background:#%s' % colour))

def project_status_represent ( value ) : if ( current . auth . permission . format == 'geojson' ) : return value if ( value >= 80 ) : colour = '00ff00' elif ( value >= 60 ) : colour = 'ffff00' else : colour = 'ff0000' represent = IS_FLOAT_AMOUNT . represent ( value , precision = 2 ) return SPAN ( represent , _class = 'project_status' , _style = ( 'background:#%s' % colour ) )
colour-coding of statuses @todo: configurable thresholds .