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.

view.twig 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <div class="thin">
  2. <div class="linkbox">
  3. <a href="/apply.php" class="brackets">Apply</a>
  4. {% if id and not is_staff %}
  5. <a href="/apply.php?action=view" class="brackets">View your applications</a>
  6. {% endif %}
  7. {% if is_staff %}
  8. {% if resolved or (id and not resolved) %}
  9. <a href="/apply.php?action=view" class="brackets">Current applications</a>
  10. {% endif %}
  11. {% if not resolved %}
  12. <a href="/apply.php?action=view&status=resolved" class="brackets">Resolved applications</a>
  13. {% endif %}
  14. <a href="/apply.php?action=admin" class="brackets">Manage roles</a>
  15. {% endif %}
  16. </div>
  17. {% if id %}
  18. <div class="box">
  19. <div class="head"{% if app.isResolved %} style="font-style: italic;"{% endif %}>{{ app.roleTitle }}
  20. {% if is_staff %}
  21. <div style="float: right;">
  22. <form name="role_resolve" method="POST" action="/apply.php?action=view&amp;id={{ id }}">
  23. <input type="submit" name="resolve" value="{% if app.isResolved %}Reopen{% else %}Resolve{% endif %}" />
  24. <input type="hidden" name="id" value="{{ id }}"/>
  25. <input type="hidden" name="auth" value="{{ auth }}"/>
  26. </form>
  27. </div>
  28. <br />Application received from {{ app.userId|user_full }} received {{ app.created|time_diff }}.
  29. {% endif %}
  30. </div>
  31. <div class="pad">
  32. <p>{{ app.body|bb_format }}</p>
  33. {% if not app.isResolved %}
  34. <form id="thread_note_reply" name="thread_note_replay" method="POST" action="/apply.php?action=view&amp;id={{ id }}">
  35. {% endif %}
  36. <table class="forum_post wrap_overflow box vertical_margin">
  37. {% for note in app.story(is_staff) %}
  38. <tr class="colhead_dark">
  39. <td colspan="2">
  40. <div style="float: left; padding-top: 10px;">{{ note.user_id|user_url }} - {{ note.created|time_diff }}</div>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td colspan="2" style="border: 2px solid
  45. {%- if not is_staff -%}
  46. #808080
  47. {%- else -%}
  48. {%- if note.visibility == 'staff' -%}
  49. #FF8017
  50. {%- else -%}
  51. #347235
  52. {%- endif -%}
  53. {%- endif -%}
  54. ;">
  55. <div style="margin: 5px 4px 20px 4px">
  56. {{ note.body|bb_format }}
  57. </div>
  58. {% if is_staff and not app.isResolved %}
  59. <div style="float: right; padding-top: 10px 0; margin-bottom: 6px;">
  60. <input type="submit" name="note-delete-{{ note.id }}" value="delete" style="height: 20px; padding: 0 3px;"/>
  61. </div>
  62. {% endif %}
  63. </td>
  64. </tr>
  65. {% endfor %}
  66. {% if not app.isResolved %}
  67. {% if is_staff %}
  68. <tr>
  69. <td class="label">Visibility</td>
  70. <td>
  71. <div>
  72. <input type="radio" name="visibility" value="public" /><label for="public">public <span style="color: #347235">(member will see this reply)</span></label><br />
  73. <input type="radio" name="visibility" value="staff" checked /><label for="staff">staff <span style="color: #FF8017">(only staff will see this reply)</span></label><br />
  74. </div>
  75. <td>
  76. </tr>
  77. {% endif %}
  78. <tr>
  79. <td class="label">Reply</td>
  80. <td>
  81. {{ note.preview|raw }}
  82. {{ note.field|raw }}
  83. </td>
  84. </tr>
  85. <tr>
  86. <td colspan="2">
  87. <div style="text-align: center;">
  88. <input type="hidden" name="id" value="{{ id }}"/>
  89. <input type="hidden" name="auth" value="{{ auth }}"/>
  90. {{ note.button|raw }}
  91. <input type="submit" id="submit" value="Save" />
  92. </div>
  93. </td>
  94. </tr>
  95. {% endif %}
  96. </table>
  97. </form>
  98. </div>
  99. </div>
  100. {% else %}
  101. <h3>{% if resolved %}Resolved{% else %}Current{% endif %} Applications</h3>
  102. {% for a in list %}
  103. {% if loop.first %}
  104. <table>
  105. <tr class="colhead">
  106. <td>Role</td>
  107. {% if is_staff %}
  108. <td>Applicant</td>
  109. {% endif %}
  110. <td>Date Created</td>
  111. <td>Comments</td>
  112. <td>Last comment from</td>
  113. <td>Last comment added</td>
  114. </tr>
  115. {% endif %}
  116. <tr>
  117. <td><a href="/apply.php?action=view&amp;id={{ a.ID }}">{{ a.Role }}</a></td>
  118. {% if is_staff %}
  119. <td><a href="/user.php?id={{ a.UserID }}">{{ a.Username }}</a></td>
  120. {% endif %}
  121. <td>{{ a.Created|time_diff }}</td>
  122. <td>{{ a.nr_notes|number_format }}</td>
  123. <td><a href="/user.php?id={{ a.last_UserID }}">{{ a.last_Username }}</a></td>
  124. <td>{% if a.last_Created %}{{ a.last_Created|time_diff }}{% endif %}</td>
  125. </tr>
  126. {% if loop.last %}
  127. </table>
  128. {% endif %}
  129. {% else %}
  130. <div class="box pad">The cupboard is empty. There are no applications to show.</div>
  131. {% endfor %}
  132. {% endif %}
  133. </div>