diff -r 25c28dd19898 -r fef4317b915f src/hdalab/views/profile.py --- a/src/hdalab/views/profile.py Tue Aug 26 15:50:55 2014 +0200 +++ b/src/hdalab/views/profile.py Tue Aug 26 18:11:26 2014 +0200 @@ -28,7 +28,8 @@ from hdalab.models.renkan import HdalabRenkan from hdalab.views.ajax import filter_generic from renkanmanager.models import Renkan -from renkanmanager.utils import LineNodePlacer, renkan_copier, renkan_deleter +from renkanmanager.utils import LineNodePlacer, renkan_copier, renkan_deleter,\ + CircleNodePlacer from renkanmanager.views import RenkanGetPut import json import uuid @@ -115,6 +116,8 @@ rk = get_object_or_404(Renkan, rk_id=rk_id) return HttpResponse(rk.content, content_type="application/json") + shape = request.GET.get("shape", "") + # Start dict for renkan json now = datetime.now().strftime("%Y-%m-%d %H:%M") @@ -150,6 +153,8 @@ ordered_tags = TaggedSheet.objects.filter(datasheet=notice).select_related("tag", "tag__dbpedia_fields", "tag__category").order_by('order')[:15] # Prepare Node placer : np = LineNodePlacer() + if shape=="circle": + np = CircleNodePlacer() np.init({"datasheet": (1, 1), "tags": (2, len(ordered_tags))}) # Place notice : content["nodes"].append({ @@ -209,6 +214,8 @@ # Prepare Node placer : np = LineNodePlacer() + if shape=="circle": + np = CircleNodePlacer() np.init({"datasheet": (1, len(notices)), "tags": (2, len(all_tags))}) # Place notices @@ -318,6 +325,8 @@ # Prepare Node placer : np = LineNodePlacer() + if shape=="circle": + np = CircleNodePlacer() np.init({"tags": (1, len(all_tags)), "datasheet": (2, len(filter_output["contents"])), "related": (3, len(related_tags))}) for t in all_tags: