{% comment %} {% endcomment %} {% comment %} {% if node.node_type == "objectnode" or node.node_type == "objectlink" %} {% endif %} {% endcomment %} {% if "add" in node.actions %} {% with "add" as action %} {% comment %} {% endcomment %} {% if node.node_type == "classnode" and not node.display_subclasses and not node.constraint.max_objects or node.constraint.max_objects < node.entity.objects.count %} {% include "action_button.html" %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "objectlink" and not node.parent.node_type == "listoflinks" and not node.parent.node_type == "subclassnode" and not node.value %} {% if node.link.reverse %} {% include "action_button.html" %} {% else %} {% if "modify" in node.parent.actions %} {% with node.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "listoflinks" and not node.display_subclasses %} {% if node.link.reverse %} {% include "action_button.html" %} {% else %} {% if "modify" in node.parent.actions %} {% with node.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "subclassnode" %} {% if node.link.reverse %} {% include "action_button.html" %} {% else %} {% if "modify" in node.parent.parent.actions %} {% with node.parent.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endif %} {% endwith %} {% endif %} {% comment %} {% endcomment %} {% if "delete" in node.actions %} {% with "delete" as action %} {% comment %} {% endcomment %} {% if node.node_type == "objectnode"%} {% with node.is_deletable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "objectlink" and not node.parent.node_type == "listoflinks" and node.value and not node.link.required %} {% if node.link.reverse %} {% with node.is_deletable as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% if "modify" in node.parent.actions %} {% if node.is_deletable and node.parent.is_editable %} {% with True as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% with False as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endif %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "objectlink" and node.parent.node_type == "listoflinks" and not node.link.required %} {% if node.link.reverse %} {% with node.is_deletable as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% if "modify" in node.parent.parent.actions %} {% if node.is_deletable and node.parent.parent.is_editable %} {% with 1 as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% with 0 as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endif %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "objectlink" and node.parent.node_type == "subclassnode" and not node.link.required %} {% if node.link.reverse %} {% with node.is_deletable as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% if "modify" in node.parent.parent.parent.actions %} {% if node.is_deletable and node.parent.parent.parent.is_editable %} {% with 1 as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% with 0 as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endif %} {% endif %} {% endwith %} {% endif %} {% comment %} {% endcomment %} {% if "modify" in node.actions %} {% with "modify" as action %} {% comment %} {% endcomment %} {% if node.node_type == "objectnode" %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "objectlink" and not node.parent.node_type == "listoflinks" and not node.parent.node_type == "subclassnode" and node.value %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% if node.node_type == "objectlink" and not node.parent.node_type == "listoflinks" and not node.parent.node_type == "subclassnode" and not node.link.required and not node.value %} {% with "link" as action %} {% if node.link.reverse %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% if "modify" in node.parent.actions %} {% with node.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endwith %} {% endif %} {% if node.node_type == "objectlink" and not node.parent.node_type == "listoflinks" and not node.parent.node_type == "subclassnode" and not node.link.required and node.value %} {% with "unlink" as action %} {% if node.link.reverse %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% if "modify" in node.parent.actions %} {% with node.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endwith %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "objectlink" and node.parent.node_type == "listoflinks" %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% if not node.link.required %} {% with "unlink" as action %} {% if node.link.reverse %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% if "modify" in node.parent.parent.actions %} {% with node.parent.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endwith %} {% endif %} {% endif %} {% if node.node_type == "listoflinks" and not node.display_subclasses %} {% with "link" as action %} {% if node.link.reverse %} {% include "action_button.html" %} {% else %} {% if "modify" in node.parent.actions %} {% with node.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endwith %} {% endif %} {% if node.node_type == "subclassnode" %} {% with "link" as action %} {% if node.link.reverse %} {% include "action_button.html" %} {% else %} {% if "modify" in node.parent.parent.actions %} {% with node.parent.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endwith %} {% endif %} {% comment %} {% endcomment %} {% if node.node_type == "objectlink" and node.parent.node_type == "subclassnode" %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% if not node.link.required %} {% with "unlink" as action %} {% if node.link.reverse %} {% with node.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% else %} {% if "modify" in node.parent.parent.parent.actions %} {% with node.parent.parent.parent.is_editable as action_possible %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %} {% endwith %} {% endif %} {% endif %} {% endwith %} {% endif %} {% if "tag" in node.actions %} {% if node.node_type == "objectnode" or node.node_type == "objeclink" %} {% with "tag" as action %} {% include "action_button.html" %} {% endwith %} {% endif %} {% endif %}