{% if version.changes.item_changes or version.changes.field_changes or version.changes.old == None %}

    {% for change in version.changes.field_changes %}

    	<button title="Changes to {{ change.field.verbose_name }}" type="button" class="btn btn-default btn-xs" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}
            {% include "RIGS/version_changes_change.html" %}
            {% endspaceless %}'>{{ change.field.verbose_name }}</button>

    {% endfor %}

    {% for itemChange in version.changes.item_changes %}
        <button title="Changes to item '{% if itemChange.new %}{{ itemChange.new.name }}{% else %}{{ itemChange.old.name }}{% endif %}'" type="button" class="btn btn-default btn-xs" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}
            <ul class="list-group">
            {% for change in itemChange.field_changes %}
                  <li class="list-group-item">
                    <h4 class="list-group-item-heading">{{ change.field.verbose_name }}</h4>
                    <div class="dont-break-out">{% include "RIGS/version_changes_change.html" %}</div>
                  </li>
            {% endfor %}
            </ul>
            
            {% endspaceless %}'>item '{% if itemChange.new %}{{ itemChange.new.name }}{% else %}{{ itemChange.old.name }}{% endif %}'</button>
    {% endfor %}
{% else %}
    nothing useful
{% endif %}
