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.

message.twig 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {% from 'macro/form.twig' import selected %}
  2. <div class="thin">
  3. <div class="header">
  4. <h2>Staff PM &rsaquo; {{ pm.subject }}</h2>
  5. <div class="linkbox">
  6. {% for view in heading %}
  7. <a href="staffpm.php{{ view.link }}" class="brackets">{{ view.title }}{% if view.count %} ({{ view.count }}){% endif %}</a>&nbsp;
  8. {% endfor %}
  9. {% if viewer.permitted('admin_staffpm_stats') %}
  10. <a href="staffpm.php?action=scoreboard&amp;view=user" class="brackets">View user scoreboard</a>
  11. <a href="staffpm.php?action=scoreboard&amp;view=staff" class="brackets">View staff scoreboard</a>
  12. {% endif %}
  13. {% if viewer.isFLS %}
  14. <a href="staffpm.php" class="brackets">Main Staff Inbox</a>
  15. <a title="Replies to your own Staff PMs are here" href="staffpm.php?action=userinbox" class="brackets">Personal Staff Inbox</a>
  16. {% endif %}
  17. {% if not viewer.isStaffPMReader %}
  18. <a href="staffpm.php" class="brackets">Back to inbox</a>
  19. {% endif %}
  20. </div>
  21. </div>
  22. <br />
  23. <div id="inbox">
  24. {% for message in pm.thread %}
  25. <div class="box vertical_space" id="post{{ messsage.id }}">
  26. <div class="head">
  27. <a class="postid" href="staffpm.php?action=viewconv&amp;id={{ pm.id }}#post{{ message.id }}" style="font-weight: normal;">#{{ message.id }}</a>
  28. <strong>{{ message.user_id|user_full|raw }}</strong> {{ message.sent_date|time_diff }}
  29. {% if pm.inProgress %}
  30. - <a href="#quickpost" onclick="Quote('{{ message.id }}', '{{ pm.author.username }}');" class="brackets">Quote</a>
  31. {% endif %}
  32. </div>
  33. <div class="body">{{ message.body|bb_format|raw }}</div>
  34. </div>
  35. <div align="center" style="display: none;"></div>
  36. {% endfor %}
  37. {% if viewer.isStaffPMReader %}
  38. {% if pm.inProgress %}
  39. <div id="common_answers" class="hidden">
  40. <div class="box vertical_space">
  41. <div class="head">
  42. <strong>Preview</strong>
  43. </div>
  44. <div id="common_answers_body" class="body">Select an answer from the drop-down to view it.</div>
  45. </div>
  46. <br />
  47. <div class="center">
  48. <select id="common_answers_select" onchange="UpdateMessage();">
  49. <option id="first_common_response">Select a message</option>
  50. {% for id, c in common %}
  51. <option value="{{ id }}">{{ c.Name }}</option>
  52. {% endfor %}
  53. </select>
  54. <input type="button" title="Use this message as the basis for your reply" value="Use message" onclick="SetMessage();" />
  55. <input type="button" value="Create new/Edit Common Response" onclick="location.href='staffpm.php?action=responses&amp;convid={{ pm.id }}';" />
  56. </div>
  57. </div>
  58. {% endif %}
  59. <div id="ajax_message" class="hidden center alertbar"></div>
  60. {% endif %}
  61. <h3>Reply</h3>
  62. <div class="box pad" id="reply_box">
  63. <div id="buttons" class="center">
  64. <form class="manage_form" name="staff_messages" action="staffpm.php" method="post" id="messageform">
  65. {{ textarea.getBuffer|raw }}
  66. <br />
  67. {% if viewer.isFLS %}
  68. <input type="button" value="Assign to staff" onclick="location.href='staffpm.php?action=assign&amp;to=staff&amp;convid={{ pm.id }}';" />
  69. <input type="button" value="Assign to forum staff" onclick="location.href='staffpm.php?action=assign&amp;to=forum&amp;convid={{ pm.id }}';" />
  70. {% elseif viewer.isStaff %}
  71. <select id="assign_to" name="assign">
  72. <optgroup label="User classes">
  73. <option value="class_0"{{ selected(pm.unassigned and pm.classLevel == 0) }}>First Line Support</option>
  74. {% for class in staff_level %}
  75. <option value="class_{{ class.level }}"{{ selected(class.level == pm.class_level) }}>{{ class.Name }}</option>
  76. {% endfor %}
  77. </optgroup>
  78. <optgroup label="Staff">
  79. {% for id, username in staff %}
  80. <option value="user_{{ id }}"{{ selected(not pm.unassigned and pm.assigned.id == id) }}>{{ username }}</option>
  81. {% endfor %}
  82. </optgroup>
  83. <optgroup label="First Line Support">
  84. {% for id, username in fls %}
  85. <option value="user_{{ id }}"{{ selected(not pm.unassigned and pm.assigned.id == id) }}>{{ username }}</option>
  86. {% endfor %}
  87. </optgroup>
  88. </select>
  89. <input type="button" onclick="Assign();" value="Assign" />
  90. {% endif %}
  91. {% if not pm.inProgress %}
  92. <input type="button" value="Unresolve" onclick="location.href='staffpm.php?action=unresolve&amp;id={{ pm.id }}';" />
  93. {% else %}
  94. <input type="button" value="Resolve" onclick="location.href='staffpm.php?action=resolve&amp;id={{ pm.id }}';" />&nbsp;
  95. {% if viewer.isStaffPMReader %}
  96. <input type="button" title="Create, edit and use canned replies" value="Common answers" onclick="$('#common_answers').gtoggle();" />
  97. {% endif %}
  98. <input type="button" id="previewbtn" value="Preview" class="hidden button_preview_{{ textarea.getID }}" />
  99. <input type="submit" value="Reply" />
  100. {% endif %}
  101. <input type="hidden" name="action" value="takepost" />
  102. <input type="hidden" name="convid" value="{{ pm.id }}" id="convid" />
  103. </form>
  104. </div>
  105. </div>
  106. </div>
  107. </div>