Skip to content

Commit

Permalink
Merge pull request nyuhsl#151 from nyuhsl/feature/dont-collapse-long-…
Browse files Browse the repository at this point in the history
…author-lists

Un-collapse author lists per discussion
  • Loading branch information
ianlamb77 authored Aug 16, 2019
2 parents 0501908 + 5ae5fd5 commit 9acae1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
16 changes: 2 additions & 14 deletions app/Resources/views/default/view_dataset_external.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ $(function () {
<div class="dataset-authors-section">
<span class="dataset-detail-authors">Author(s):
{% set correspondingAuthorExists = false %}
{% set authorCount = 0 %}
{% for author in dataset.getAuthorships %}
{% set popoverContent = '' %}
{% set authorNote = '' %}
Expand All @@ -122,23 +121,12 @@ $(function () {
{% if author.isCorrespondingAuthor %}
{% set correspondingAuthorExists = true %}
{% set authorClass = authorClass ~ ' corresponding-author' %}
{% set authorNote = authorNote ~ '+' %}
{% set authorNote = authorNote ~ '*' %}
{% endif %}

{% if popoverContent %}<a tabindex="0" class="author-name" role="button" data-toggle="popover" title="{{ author.getPerson.getFullName }}" data-content="{{ popoverContent }}">{% endif %}<span class="{{ authorClass }}">{{ author.getPerson.getFullName }}</span><span class="author-note">{{ authorNote }}</span>{% if popoverContent %}</a>{% endif %}{% if not loop.last and authorCount != 4%}, {% endif %}
{% if popoverContent %}<a tabindex="0" class="author-name" role="button" data-toggle="popover" title="{{ author.getPerson.getFullName }}" data-content="{{ popoverContent }}">{% endif %}<span class="{{ authorClass }}">{{ author.getPerson.getFullName }}</span><span class="author-note">{{ authorNote }}</span>{% if popoverContent %}</a>{% endif %}{% if not loop.last %}, {% endif %}

{% set authorCount = authorCount + 1 %}
{% if authorCount == 5 and not loop.last %}
&hellip;<a class="collapsed-toggle authors-collapse" data-toggle="collapse" href="#collapsed-authors" aria-expanded="false" aria-controls="collapsed-authors">
See more...
</a>
<div class="collapse" id="collapsed-authors">
{% endif %}
{% endfor %}

{% if authorCount > 4 %}
</div>
{% endif %}

</span>
{% if correspondingAuthorExists %}
Expand Down
16 changes: 2 additions & 14 deletions app/Resources/views/default/view_dataset_internal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ $(function () {
<div class="dataset-authors-section">
<span class="dataset-detail-authors">Author(s):
{% set correspondingAuthorExists = false %}
{% set authorCount = 0 %}
{% for author in dataset.getAuthorships %}
{% set popoverContent = '' %}
{% set authorNote = '' %}
Expand All @@ -97,23 +96,12 @@ $(function () {
{% if author.isCorrespondingAuthor %}
{% set correspondingAuthorExists = true %}
{% set authorClass = authorClass ~ ' corresponding-author' %}
{% set authorNote = authorNote ~ '+' %}
{% set authorNote = authorNote ~ '*' %}
{% endif %}

{% if popoverContent %}<a tabindex="0" class="author-name" role="button" data-toggle="popover" title="{{ author.getPerson.getFullName }}" data-content="{{ popoverContent }}">{% endif %}<span class="{{ authorClass }}">{{ author.getPerson.getFullName }}</span><span class="author-note">{{ authorNote }}</span>{% if popoverContent %}</a>{% endif %}{% if not loop.last and authorCount != 4%}, {% endif %}
{% if popoverContent %}<a tabindex="0" class="author-name" role="button" data-toggle="popover" title="{{ author.getPerson.getFullName }}" data-content="{{ popoverContent }}">{% endif %}<span class="{{ authorClass }}">{{ author.getPerson.getFullName }}</span><span class="author-note">{{ authorNote }}</span>{% if popoverContent %}</a>{% endif %}{% if not loop.last %}, {% endif %}

{% set authorCount = authorCount + 1 %}
{% if authorCount == 5 and not loop.last %}
&hellip;<a class="collapsed-toggle authors-collapse" data-toggle="collapse" href="#collapsed-authors" aria-expanded="false" aria-controls="collapsed-authors">
See more...
</a>
<div class="collapse" id="collapsed-authors">
{% endif %}
{% endfor %}

{% if authorCount > 4 %}
</div>
{% endif %}

</span>
{% if correspondingAuthorExists %}
Expand Down

0 comments on commit 9acae1f

Please sign in to comment.