BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

invite-tree.twig 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <div class="thin">
  2. <div class="header">
  3. <h2>{{ user.id|user_url|raw }} &rsaquo; <a href="user.php?action=invite&amp;userid={{ user.id }}">Invites</a> &rsaquo; Tree</h2>
  4. </div>
  5. <div class="box pad">
  6. <div class="invitetree pad">
  7. {% if info.total == 0 %}
  8. <p>Nobody turned up to the gig.</p>
  9. {% else %}
  10. <p>
  11. This tree has {{ info.total|number_format }} entries, {{ info.branch|number_format }} branches, and a depth of {{ depth }}.
  12. It has
  13. {%- if classes|length > 1 -%}
  14. {%- for c in classes -%}
  15. {{ loop.last ? ' and' : (loop.first ? '' : ',') }}
  16. {{ c|raw }}
  17. {%- endfor -%}
  18. {%- else -%}
  19. {{ classes.0 }}
  20. {%- endif -%}.
  21. {{ info.disabled }}{% if info.disabled == 1 %} user is {% else %} users are {% endif %}
  22. disabled ({{ (info.disabled / info.total * 100)|number_format }}%)
  23. and {{ info.donor }}{% if info.donor == 1 %} user has {% else %} users have {% endif %}
  24. donated ({{ (info.donor / info.total * 100)|number_format }}%).
  25. </p>
  26. <p>
  27. The amount uploaded by direct invitees is {{ info.upload_top|octet_size }};
  28. the amount downloaded by direct invitees is {{ info.download_top|octet_size }} and the
  29. aggregate ratio is <span class="stat">{{ ratio(info.upload_top, info.download_top) }}</span>.
  30. </p>
  31. {% if depth > 1 %}
  32. <p>
  33. The total amount uploaded by the entire tree is {{ info.upload_total|octet_size }};
  34. the total amount downloaded is {{ info.download_total|octet_size }} and the
  35. aggregate ratio is <span class="stat">{{ ratio(info.upload_total, info.download_total) }}</span>.
  36. </p>
  37. {% endif %}
  38. {% if info.paranoid %}
  39. <p style="font-weight: bold;">
  40. {{ info.paranoid }} user{{ info.paranoid == 1 ? '' : 's' }} ({{ (info.paranoid / info.total * 100)|number_format }}%)
  41. {{ info.paranoid == 1 ? 'is' : 'are' }} too paranoid to have their stats shown here,
  42. and {{ info.paranoid == 1 ? 'was' : 'were' }} not factored into the upload and download totals.
  43. </p>
  44. {% endif %}
  45. {% endif %}
  46. {{ markup|raw }}
  47. </div>
  48. </div>
  49. </div>