{% with state=record.sync_state %} {% if state.code == "synchronized" %} {{ state.label }} {{ state.synchronized }}/{{ state.total }} {% elif state.code == "partially-synchronized" %} {{ state.label }} {{ state.synchronized }}/{{ state.total }} {% elif state.code == "not-synchronized" %} {{ state.label }} 0/{{ state.total }} {% elif state.code == "not-applicable" %} {{ state.label }} {% else %} Unknown {% endif %} {% if record.sync_url %} {% endif %} {% endwith %}