123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- {% from 'macro/form.twig' import selected %}
-
- <div class="thin">
- <div class="header">
- <h2>Staff PM › {{ pm.subject }}</h2>
- <div class="linkbox">
- {% for view in heading %}
- <a href="staffpm.php{{ view.link }}" class="brackets">{{ view.title }}{% if view.count %} ({{ view.count }}){% endif %}</a>
- {% endfor %}
-
- {% if viewer.permitted('admin_staffpm_stats') %}
- <a href="staffpm.php?action=scoreboard&view=user" class="brackets">View user scoreboard</a>
- <a href="staffpm.php?action=scoreboard&view=staff" class="brackets">View staff scoreboard</a>
- {% endif %}
- {% if viewer.isFLS %}
- <a href="staffpm.php" class="brackets">Main Staff Inbox</a>
- <a title="Replies to your own Staff PMs are here" href="staffpm.php?action=userinbox" class="brackets">Personal Staff Inbox</a>
- {% endif %}
- {% if not viewer.isStaffPMReader %}
- <a href="staffpm.php" class="brackets">Back to inbox</a>
- {% endif %}
- </div>
- </div>
- <br />
- <div id="inbox">
- {% for message in pm.thread %}
- <div class="box vertical_space" id="post{{ messsage.id }}">
- <div class="head">
- <a class="postid" href="staffpm.php?action=viewconv&id={{ pm.id }}#post{{ message.id }}" style="font-weight: normal;">#{{ message.id }}</a>
- <strong>{{ message.user_id|user_full|raw }}</strong> {{ message.sent_date|time_diff }}
- {% if pm.inProgress %}
- - <a href="#quickpost" onclick="Quote('{{ message.id }}', '{{ pm.author.username }}');" class="brackets">Quote</a>
- {% endif %}
- </div>
- <div class="body">{{ message.body|bb_format|raw }}</div>
- </div>
- <div align="center" style="display: none;"></div>
- {% endfor %}
-
- {% if viewer.isStaffPMReader %}
- {% if pm.inProgress %}
- <div id="common_answers" class="hidden">
- <div class="box vertical_space">
- <div class="head">
- <strong>Preview</strong>
- </div>
- <div id="common_answers_body" class="body">Select an answer from the drop-down to view it.</div>
- </div>
- <br />
- <div class="center">
- <select id="common_answers_select" onchange="UpdateMessage();">
- <option id="first_common_response">Select a message</option>
- {% for id, c in common %}
- <option value="{{ id }}">{{ c.Name }}</option>
- {% endfor %}
- </select>
- <input type="button" title="Use this message as the basis for your reply" value="Use message" onclick="SetMessage();" />
- <input type="button" value="Create new/Edit Common Response" onclick="location.href='staffpm.php?action=responses&convid={{ pm.id }}';" />
- </div>
- </div>
- {% endif %}
- <div id="ajax_message" class="hidden center alertbar"></div>
- {% endif %}
-
- <h3>Reply</h3>
- <div class="box pad" id="reply_box">
- <div id="buttons" class="center">
- <form class="manage_form" name="staff_messages" action="staffpm.php" method="post" id="messageform">
- {{ textarea.getBuffer|raw }}
- <br />
- {% if viewer.isFLS %}
- <input type="button" value="Assign to staff" onclick="location.href='staffpm.php?action=assign&to=staff&convid={{ pm.id }}';" />
- <input type="button" value="Assign to forum staff" onclick="location.href='staffpm.php?action=assign&to=forum&convid={{ pm.id }}';" />
- {% elseif viewer.isStaff %}
- <select id="assign_to" name="assign">
- <optgroup label="User classes">
- <option value="class_0"{{ selected(pm.unassigned and pm.classLevel == 0) }}>First Line Support</option>
- {% for class in staff_level %}
- <option value="class_{{ class.level }}"{{ selected(class.level == pm.class_level) }}>{{ class.Name }}</option>
- {% endfor %}
- </optgroup>
- <optgroup label="Staff">
- {% for id, username in staff %}
- <option value="user_{{ id }}"{{ selected(not pm.unassigned and pm.assigned.id == id) }}>{{ username }}</option>
- {% endfor %}
- </optgroup>
- <optgroup label="First Line Support">
- {% for id, username in fls %}
- <option value="user_{{ id }}"{{ selected(not pm.unassigned and pm.assigned.id == id) }}>{{ username }}</option>
- {% endfor %}
- </optgroup>
- </select>
- <input type="button" onclick="Assign();" value="Assign" />
- {% endif %}
-
- {% if not pm.inProgress %}
- <input type="button" value="Unresolve" onclick="location.href='staffpm.php?action=unresolve&id={{ pm.id }}';" />
- {% else %}
- <input type="button" value="Resolve" onclick="location.href='staffpm.php?action=resolve&id={{ pm.id }}';" />
- {% if viewer.isStaffPMReader %}
- <input type="button" title="Create, edit and use canned replies" value="Common answers" onclick="$('#common_answers').gtoggle();" />
- {% endif %}
- <input type="button" id="previewbtn" value="Preview" class="hidden button_preview_{{ textarea.getID }}" />
- <input type="submit" value="Reply" />
- {% endif %}
- <input type="hidden" name="action" value="takepost" />
- <input type="hidden" name="convid" value="{{ pm.id }}" id="convid" />
- </form>
- </div>
- </div>
- </div>
- </div>
|