Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. <div class="songInfo ">
  2. <span class="skinColor-{{ skinName }} title">
  3. {{ song.media.title }}
  4. </span>
  5.  
  6. {% set _names = '' %}
  7. {% if song.ownedBy.artistName %}
  8. {% set _names = song.ownedBy.artistName %}
  9. {% else %}
  10. {% set _names = song.ownedBy.firstName + ' ' + song.ownedBy.lastName %}
  11. {% endif %}
  12.  
  13. {% if song.collaborators %}
  14.  
  15. {% set _names = '' %}
  16. {% set _separator = ', ' %}
  17.  
  18. {% if song.countAvailableCollaborators() > 3 %}
  19.  
  20. {% if song.ownedBy.artistName %}
  21. {% set _names = song.ownedBy.artistName %}
  22. {% else %}
  23. {% set _names = song.ownedBy.firstName + ' ' + song.ownedBy.lastName %}
  24. {% endif %}
  25.  
  26. {% set _names = _names ~ ' & <a href="javascript:;" class="_openCollaboratorsModalFromLink">' ~ song.countAvailableCollaborators() ~ ' others</a>' %}
  27.  
  28. {% else %}
  29.  
  30.  
  31. {% for collaborator in song.getCollaboratorsOwnerFirst() %}
  32.  
  33. {% if loop.index == loop.length-1 %}
  34. {% set _separator = ' & ' %}
  35. {% endif %}
  36.  
  37. {% if collaborator.user %}
  38.  
  39. {% set _collaboratorLink = 'javascript:;' %}
  40. {% if collaborator.user.enabled %}
  41. {% set _collaboratorLink = path( 'artist_detailed', { "id" : collaborator.user.id } ) %}
  42. {% else %}
  43. {% set _collaboratorLink = '#removed-account' %}
  44. {% endif %}">
  45.  
  46. {% set _names = _names ~ '<a href="' ~ _collaboratorLink ~ '">' %}
  47.  
  48. {% if collaborator.user.artistName %}
  49. {% set _names = _names ~ collaborator.user.artistName %}
  50. {% else %}
  51. {% set _names = _names ~ collaborator.user.firstName ~ ' ' ~ collaborator.user.lastName %}
  52. {% endif %}
  53.  
  54. {% set _names = _names ~ '</a>' %}
  55.  
  56. {% set _names = _names ~ _separator %}
  57.  
  58. {% endif %}
  59. {% endfor %}
  60. {% endif %}
  61.  
  62.  
  63. {% endif %}
  64.  
  65. <span class="author">
  66. by {{ _names|trim(_separator,'right')|raw }}
  67. </span>
  68. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement