{# @description Names in a row: Ana Silva, Ben Wu and Chen Li. Past max the rest are counted, the count linking to more_url when given. #} {# @prop contributors:text | description:"Contributions or contributors, as a list or queryset." #} {# @prop max:number | default:3 | description:"Names shown before the count. 0 shows everyone." #} {# @prop total:number | description:"The real total, when contributors was already cut short." #} {# @prop format:select['family_given','family_initial','initials_family'] | description:"Name format, as for c-contributor.name." #} {# @prop identifier:boolean | description:"Follow each name with its ORCID iD or ROR icon." #} {# @prop link:boolean | default:true | description:"Link each name to the contributor's page." #} {# @prop more_url:text | description:"Where the full list lives." #} {# @prop empty:text | description:"Text shown when nobody is credited. Nothing is drawn without it." #} {# @prop class:text | description:"Extra CSS classes on the root element." #} {% load i18n contributor_tags %} {% split_contributors contributors max total as group %} {% if group.shown %} {% for c in group.shown %}{% if not forloop.first %}{% if forloop.last and not group.more %} {% translate "and" %} {% else %}, {% endif %}{% endif %}{% endfor %}{% if group.more %} {% translate "and" %} {% blocktranslate count counter=group.more asvar others %}{{ counter }} other{% plural %}{{ counter }} others{% endblocktranslate %}{% if more_url %}{{ others }}{% else %}{{ others }}{% endif %}{% endif %} {% elif empty %} {{ empty }} {% endif %}