Exemplo n.º 1
0
function template_reply_post()
{
    global $context;
    template_ticket_info();
    template_ticket_content();
    template_ticket_meta();
    template_ticket_footer();
    template_preview();
    template_ticket_shd_replyarea();
    if (!empty($context['ticket_form']['do_replies'])) {
        template_ticket_begin_replies();
        template_ticket_do_replies();
        template_ticket_end_replies();
    }
    template_ticket_pageend();
}
/**
 *	Displays the quick reply/go advanced box
 *
 *	This function handles displaying of the templates that make up the Quick Reply / Go Advanced area, drawing on {@link SimpleDesk-Post.template.php} for core posting templates.
 *
 *	Prior to 1.1 this was part of {@link template_viewticket()}
 *
 *	@since 2.0
*/
function template_quickreply()
{
    global $context, $scripturl, $options, $txt, $settings;
    if ($context['can_reply'] && !empty($options['display_quick_reply'])) {
        echo '
		<br />
		<div class="tborder">
			<div class="title_bar', $options['display_quick_reply'] == 2 ? ' grid_header' : '', '" id="quickreplyheader">
				<h3 class="titlebg">
					<span class="floatright"><a href="#" onclick="oQuickReply.swap(); return false;"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.png" alt="+" id="quickReplyExpand" class="icon" style="display:none;" /></a></span>
					<img src="', $settings['default_images_url'], '/simpledesk/respond.png" alt="x" />
					<a href="', $scripturl, '?action=helpdesk;sa=reply;ticket=', $context['ticket_id'], ';num_replies=', $context['ticket']['num_replies'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="oQuickReply.swap(); return false;">', $txt['shd_reply_ticket'], '</a>
				</h3>
			</div>
			<div class="roundframe" id="quickReplyOptions"', $options['display_quick_reply'] != 2 ? ' style="display: none"' : '', '>
				<div class="content">
					<form action="', $scripturl, '?action=helpdesk;sa=savereply" method="post" accept-charset="', $context['character_set'], '" name="postreply" id="postreply" onsubmit="submitonce(this);smc_saveEntities(\'postreply\', [\'shd_reply\'], \'field\');" enctype="multipart/form-data" style="margin: 0;">';
        if ($context['can_go_advanced']) {
            echo '
					<div class="description shd_advancedbutton floatright" id="shd_goadvancedbutton" style="display:none;">
						<a onclick="goAdvanced(); return false;" href="', $scripturl, '?action=helpdesk;sa=reply;ticket=', $context['ticket_id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['shd_go_advanced'], '</a><br />
					</div>';
        }
        template_ticket_postbox();
        template_ticket_meta();
        echo '
					</form>
				</div>
			</div>
			<span id="quickreplyfooter" class="lowerframe"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '><span></span></span>
		</div>
		<script type="text/javascript"><!-- // --><![CDATA[
		document.getElementById("quickReplyExpand").style.display = "";
		document.getElementById("shd_goadvancedbutton").style.display = "";
		// ]]></script>';
    }
}