
{% load crispy_forms_tags %}

{% if control == "button" %}
  <div class="cvgraph-button">
    <button type="button" class="btn btn-secondary btn-sm" data-property-editor="true" data-form-id="form-rel-{{ node_id }}-edit-properties">
      <span class="octicon octicon-pencil"></span>&nbsp;{{ rel.start_node }}&nbsp;&rarr;&nbsp;{{ rel.end_node }}
    </button>
  </div>
{% endif %}

{% if control == "editor" %}
  <div style="display:none" id="form-rel-{{ node_id }}-edit-properties" class="cvgraph-editor">
    <form action="{% url 'cvgraph:change' %}" class="form-horizontal" method="post">
      {% csrf_token %}
      <input type="hidden" name="_labels" value="{{ labels }}"/>
      <input type="hidden" name="_id" value="{{ node_id }}"/>
      <input type="hidden" name="_operation" value="update"/>
      {{ form|crispy }}
      <div class="control-group">
        <div class="controls">
          <button type="submit" class="btn">Save</button>
        </div>
      </div>
    </form>
  </div>
{% endif %}


{% load crispy_forms_tags %}

{% if control == "button" %}
  <div class="cvgraph-button">
    <button type="button" class="btn btn-secondary btn-sm" data-property-editor="true" data-form-id="form-rel-{{ node_id }}-edit-properties">
      <span class="octicon octicon-pencil"></span>&nbsp;{{ rel.start_node }}&nbsp;&rarr;&nbsp;:{{ rel.end_node.labels.0 }}
    </button>
  </div>
{% endif %}

{% if control == "editor" %}
  <div style="display:none" id="form-rel-{{ node_id }}-edit-properties" class="cvgraph-editor">
    <form action="{% url 'cvgraph:change' %}" class="form-horizontal" method="post">
      {% csrf_token %}
      <input type="hidden" name="_labels" value="{{ labels }}"/>
      <input type="hidden" name="_id" value="{{ node_id }}"/>
      <input type="hidden" name="_operation" value="update"/>
      {{ form|crispy }}
      <div class="control-group">
        <div class="controls">
          <button type="submit" class="btn">Save</button>
        </div>
      </div>
    </form>
  </div>
{% endif %}

Reduce width of relationship edit button text
Reduce width of relationship edit button text
