Skip to content

Commit

Permalink
Assign user_roles as array rather than string
Browse files Browse the repository at this point in the history
This makes it possible to push more values later on.
  • Loading branch information
Daniel Fowler committed Mar 27, 2015
1 parent d954172 commit f17a58d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _includes/badges_push_dynamic.html
Expand Up @@ -2,22 +2,22 @@
{% if user_roles %}
{% assign user_roles = user_roles | push: 'author' %}
{% else %}
{% assign user_roles = 'author' %}
{% assign user_roles = 'author' | split: "|" %}
{% endif %}
{% endif %}

{% if project_maintainers contains user_username %}
{% if user_roles %}
{% assign user_roles = user_roles | push: 'project-maintainer' %}
{% else %}
{% assign user_roles = 'project-maintainer' %}
{% assign user_roles = 'project-maintainer' | split: "|" %}
{% endif %}
{% endif %}

{% if project_contributors contains user_username %}
{% if user_roles %}
{% assign user_roles = user_roles | push: 'project-contributor' %}
{% else %}
{% assign user_roles = 'project-contributor' %}
{% assign user_roles = 'project-contributor' | split: "|" %}
{% endif %}
{% endif %}

0 comments on commit f17a58d

Please sign in to comment.