diff -r 138b898e0f7e -r 511bff609c3d annot-server/webapp/admin.py --- a/annot-server/webapp/admin.py Fri Oct 24 18:31:47 2014 +0200 +++ b/annot-server/webapp/admin.py Fri Oct 24 21:03:17 2014 +0200 @@ -41,18 +41,26 @@ output = [] for c in model.categories_json.get("categories",[]): - if "subcategories" in c and len(c["subcategories"])>0: - for sc in c["subcategories"]: - output.append({"name": sc["code"],"keywords": [ sc["label"] ], "color" : sc["color"] }) - else: - output.append({"name": c["code"],"keywords": [ c["label"] ], "color" : c["color"] }) + #if "subcategories" in c and len(c["subcategories"])>0: + # for sc in c["subcategories"]: + # output.append({"name": sc["code"],"keywords": [ sc["label"] ], "color" : sc["color"] }) + #else: + output.append({"name": c["code"] if "code" in c else "","keywords": [ c["label"] ], "color" : c["color"] }) base_url = getattr(config,'LDT_PLATFORM_BASE_URL','') + "/ldt/embediframe/?" - url_query_params = {'project_id': model.project_id, 'polemic': 'all', 'polemics_list': json.dumps(output, separators=(',',':'))} + url_query_params = {'project_id': model.project_id, + 'polemic': 'all', + 'polemic__max_elements': 200, + 'createannotation': True, + 'createannotation_polemics': False, + 'tag_titles': "" + 'polemics_list': json.dumps(output, separators=(',',':'))} url = base_url + urllib.urlencode(url_query_params) - return Markup("%s" % (url,url[:80]+"...")) + embed = "" % url + + return Markup("Lien :

Code embed :" % (url, url, embed)) class EventView(ModelView):