# # Collective Knowledge # # See CK LICENSE.txt for licensing details. # See CK COPYRIGHT.txt for copyright details. # # Developer: Grigori Fursin # cfg={} # Will be updated by CK (meta description of this module) work={} # Will be updated by CK (temporal data) ck=None # Will be updated by CK (initialized CK kernel) # Local settings # ============================================================================ def init(i): return {'return':0} ############################################################################## # view entry as html def html_viewer(i): """ Input: { data_uoa url_base url_pull } Output: { return - return code = 0, if successful > 0, if error (error) - error text if return > 0 } """ h='' raw='no' top='no' duoa=i['data_uoa'] burl=i['url_base'] purl=i['url_pull'] if duoa!='': # Load entry rx=ck.access({'action':'load', 'module_uoa':work['self_module_uid'], 'data_uoa':duoa}) if rx['return']>0: return rx dd=rx['dict'] duid=rx['data_uid'] name=dd.get('name','') email=dd.get('email','') personal_web=dd.get('personal_web_page','') prof_web=dd.get('professional_web_page','') l_image=dd.get('large_image','') s_image=dd.get('small_image','') cjobs=dd.get('current_jobs',[]) h+='
\n' if l_image!='': h+=' ' h+=' | \n' h+='\n'
h+=' '+name+' \n' h+=' \n' h+=' \n' if len(cjobs)>0: h+='\n' for q in cjobs: t=q.get('title','') o=q.get('organization','') ow=q.get('organization_web','') hx='' if t!='': hx+=t if o!='': if hx!='':hx+=', ' if ow=='': hx+=o else: hx+=''+o+'' h+='\n' h+=' '+hx+' \n' h+='\n' h+=' \n' h+=' \n' h+='
| \n'
h+='