{# @description Avatar, name and one short line beneath: a person's affiliation, or an organization's type and place. Given a Contribution, the roles on that credit follow as badges. Use it anywhere a contributor is named on their own. Inside a c-list, use c-contributor.row. #} {# @prop contributor:text | description:"A Person, an Organization, or a Contribution." #} {# @prop size:select['sm','md'] | default:sm | description:"The avatar size." #} {# @prop secondary:text | description:"Text for the second line instead. none leaves the line out." #} {# @prop link:boolean | default:true | description:"Link the name to the contributor's page." #} {# @prop class:text | description:"Extra CSS classes on the root element." #} {% load contributor_tags %} {% with c=contributor|as_contributor fallback=contributor.get_real_instance.primary_organization %} {% if c %} {% with roles=contributor.roles.all organization=contributor.affiliation|default:fallback line=c.summary %}
{% if secondary == "none" %} {% elif secondary %}
{{ secondary }}
{% elif organization %}
{% elif line %}
{{ line }}
{% endif %} {% if roles %}
{% for role in roles %}{% endfor %}
{% endif %}
{% endwith %} {% endif %} {% endwith %}