{% load i18n plmapp_tags %}
{% with doc_file.locked as locked %}
{% if is_contributor and obj.is_editable %}
{% if not locked or doc_file.locker == request.user %}
{% trans "CHECK-IN" %}
{% endif %}
{% if not locked %}
{% if doc_file.checkout_valid %}
{% trans "CHECK-OUT" %}
{% else %}
{% trans "Native related file is locked" %}
{% endif %}
{% elif doc_file.locker != request.user %}
{% blocktrans with doc_file.locker as locker %}Locked by {{ locker }}{%endblocktrans %}
{% endif %}
{% else %}
{{ is_contributor|yesno:"Object is not editable, you are not a contributor" }}
{% endif %}
{% endwith %}