Skip to content

Commit

Permalink
Merge pull request #4672 from galaxyproject/adal-in
Browse files Browse the repository at this point in the history
Add support for former_affiliations
  • Loading branch information
hexylena authored Jan 23, 2024
2 parents 38aeb49 + 8a1ca90 commit bf587d2
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 5 deletions.
21 changes: 21 additions & 0 deletions CONTRIBUTORS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ bgruening:
bazante1:
name: Bazante Sanders
joined: 2020-12
affiliations:
- avans-atgm

BasileGoussard:
name: Basile Goussard
Expand Down Expand Up @@ -495,6 +497,8 @@ dirowa:
joined: 2021-10
linkedin: Donny Vrins
email: [email protected]
former_affiliations:
- avans-atgm

dlalgroup:
name: Dennis Lal group
Expand Down Expand Up @@ -746,8 +750,14 @@ hexylena:
fediverse_flavor: akkoma
affiliations:
- gallantries
- by-covid
- erasmusmc
- elixir-europe
- elixir-converge
former_affiliations:
- deNBI
- avans-atgm
- uni-freiburg
contact_for_training: false
location:
country: NL
Expand Down Expand Up @@ -803,6 +813,8 @@ ilveroluca:
name: Luca Pireddu
joined: 2023-04
orcid: 0000-0002-4663-5613
affiliations:
- by-covid

IrelCM:
name: Irelka Colina
Expand Down Expand Up @@ -999,6 +1011,8 @@ kikkomep:
joined: 2023-04
orcid: 0000-0002-5207-0030
elixir_node: it
affiliations:
- by-covid

KlemensFroehlich:
name: Klemens Fröhlich
Expand Down Expand Up @@ -1448,6 +1462,8 @@ pauldg:
joined: 2023-04
elixir_node: be
orcid: 0000-0002-8940-4946
affiliations:
- by-covid

paulzierep:
name: Paul Zierep
Expand Down Expand Up @@ -1656,6 +1672,8 @@ simleo:
joined: 2023-04
elixir_node: it
orcid: 0000-0001-8271-5429
affiliations:
- by-covid

slegras:
name: Stéphanie Legras
Expand Down Expand Up @@ -1697,6 +1715,8 @@ stain:
lon: -2.233631283105614
fediverse: https://scholar.social/@soilandreyes
fediverse_flavor: mastodon
affiliations:
- by-covid

stephanierobin:
name: Stéphanie Robin
Expand Down Expand Up @@ -1881,6 +1901,7 @@ wm75:
fediverse: https://scholar.social/@zerodivision
fediverse_flavor: mastodon
affiliations:
- by-covid
- uni-freiburg

xiliu:
Expand Down
7 changes: 6 additions & 1 deletion _includes/contributor-list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{%- if include.contributors -%}
{%- capture people -%}
{% for id in include.contributors %}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id=id %}{% else %}{% assign name = contributors[id].name | default: id -%}{{ name -}}{% endif %}{%- endfor -%}
{%- if include.shuffle -%}
{%- assign zz_contributors = include.contributors | shuffle -%}
{%- else -%}
{%- assign zz_contributors = include.contributors -%}
{%- endif -%}
{% for id in zz_contributors %}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id=id %}{% else %}{% assign name = contributors[id].name | default: id -%}{{ name -}}{% endif %}{%- endfor -%}
{%- if include.newcontributors -%}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id='newcontributors' %}{% endif %}{% endif %}
{%- endcapture -%}
{%- endif -%}
Expand Down
26 changes: 22 additions & 4 deletions _layouts/contributor_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,35 @@ <h2>Affiliations</h2>
</div>
{% endif %}

{% assign former_affil_count = entity.former_affiliations | size %}
{% if former_affil_count > 0 %}
<h2>Former Affiliations</h2>
<div class="contributors-line">
{% include _includes/contributor-list.html contributors=entity.former_affiliations badge=true %}
</div>
{% endif %}

{% assign member_count = entity.members | size %}
{% if member_count > 0 %}
<h2>Members</h2>
<p class="text-muted">These individuals have noted that they are affiliated in some way with this organisation. This list is non-exhaustive.</p>
<div class="contributors-line">
{% include _includes/contributor-list.html contributors=entity.members badge=true %}
{% include _includes/contributor-list.html contributors=entity.members badge=true shuffle=true %}
</div>
{% endif %}

{% assign former_member_count = entity.former_members | size %}
{% if former_member_count > 0 %}
<h2>Former Members</h2>
<p class="text-muted">These individuals have noted that they previously were affiliated in some way with this organisation. This list is non-exhaustive.</p>
<div class="contributors-line">
{% include _includes/contributor-list.html contributors=entity.former_members badge=true shuffle=true %}
</div>
{% endif %}

<h2>Contributions</h2>

{% if entity.funder %}
{% if entity.url %}
<a href="{{ entity.url }}">{{ entity.url }}</a>
{% endif %}
{{ entity.funding_statement | markdownify }}
{% endif %}

Expand Down Expand Up @@ -194,6 +208,10 @@ <h2>External Links</h2>
</div>
{% endif %}

{% if entity.url %}
Website: <a href="{{ entity.url }}">{{ entity.url }}</a>
{% endif %}

{% if entity.funding_id %}
Grant ID:
{% if entity.funding_system %}
Expand Down
22 changes: 22 additions & 0 deletions _plugins/gtn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ def get_topic(page)
page['path'].split('/')[1]
end

def shuffle(array)
array.shuffle
end

def get_og_desc(site, page); end

def get_og_title(site, page, reverse)
Expand Down Expand Up @@ -524,6 +528,24 @@ def group_icons(icons)
end
end
end

if contributor.key?('former_affiliations')
contributor['former_affiliations'].each do |affiliation|
if site.data['organisations'].key?(affiliation)
if !site.data['organisations'][affiliation].key?('former_members')
site.data['organisations'][affiliation]['former_members'] = []
end

site.data['organisations'][affiliation]['former_members'] << name
elsif site.data['funders'].key?(affiliation)
if !site.data['funders'][affiliation].key?('former_members')
site.data['funders'][affiliation]['former_members'] = []
end

site.data['funders'][affiliation]['former_members'] << name
end
end
end
end
end

Expand Down
9 changes: 9 additions & 0 deletions bin/schema-contributors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ mapping:
enum:
- ORGANISATIONS
- FUNDERS
former_affiliations:
type: seq
description: "A set of organisations you were previously affiliated with"
sequence:
- type: str
required: true
enum:
- ORGANISATIONS
- FUNDERS
elixir_node:
type: str
enum:
Expand Down
1 change: 1 addition & 0 deletions learning-pathways/data-driven-biology.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: learning-pathway
cover-image: /assets/images/genomics_intro.png
cover-image-alt: "Genomics intro"
tags: [introduction, real-course]
type: use
editorial_board:
- nekrut

Expand Down

0 comments on commit bf587d2

Please sign in to comment.