Subversion Repositories SmartDukaan

Rev

Rev 3106 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#set($ticket = $action.getTicket())
#set($lastActivity = $action.getLastActivity())
#set($ticketId = $ticket.getId())
<div >
<div id="bottom-infopane-upper">
    <form id="update-ticket-form" ticketId="$ticketId" _method="put" method="post" action="">
        <table>
            <colgroup>
                <col width="200px"/>
                <col width="250px"/>
                <col width="20px"/>
                <col width="200px"/>
                <col width="250px"/>
            </colgroup>
            <tr >
                <td ><label>Category:</label></td>
                <td >
                <select name="ticketCategory" class="width10">
                    #foreach( $ticketCategory in $action.getTicketCategories() )
                        #if($ticketCategory.name() == $lastActivity.getTicketCategory().name())
                            <option value="$ticketCategory.name()" selected="selected">$ticketCategory.name()</option>
                        #else
                            <option value="$ticketCategory.name()">$ticketCategory.name()</option>
                        #end
                    #end
                </select>
                </td>
                <td></td>
                #if($ticket.getOrderId() != 0)
                    <td ><label>Order Id:</label></td>
                    <td >$ticket.getOrderId()</td> 
                #else
                    <td colspan="2"></td>
                #end
            </tr>
            <tr >
                <td ><label>Description:</label></td>
                <td colspan="4"><textarea id="description"  class="required" name="description" rows="3" cols="75"></textarea></td>
            </tr>
            <tr >
                <td ><label>Assignee:</label></td>
                #if($action.getLoggerRole().equals("Agent"))
                    <td >$action.getAgent($lastActivity.getTicketAssigneeId()).getEmailId()</td>
                #else
                    <td >
                    <select name="ticketAssigneeEmailId" class="required email width10">
                        #foreach( $agent in $action.getAllAgents() )
                            #if($agent.getId() == $lastActivity.getTicketAssigneeId())
                                <option value="$agent.getEmailId()" selected="selected">$agent.getEmailId()</option>
                            #else
                                <option value="$agent.getEmailId()">$agent.getEmailId()</option>
                            #end
                        #end
                    </select>
                    </td>
                #end
                <td ></td>
                <td ><label>Agent who contacted:</label></td>
                <td >$action.getCurrentAgentEmailId()</td>
            </tr>
            <tr >
                <td ><label>Status:</label></td>
                <td >
                <select name="ticketStatus" class="width10">
                    #foreach( $ticketStatus in $action.getTicketStatuses() )
                        #if($ticketStatus.name() == $lastActivity.getTicketStatus().name())
                            <option value="$ticketStatus.name()" selected="selected">$ticketStatus.name()</option>
                        #else
                            <option value="$ticketStatus.name()">$ticketStatus.name()</option>
                        #end
                    #end
                </select>
                </td>
                <td ></td>
                <td ><label>Priority:</label></td>
                <td >
                <select name="ticketPriority" class="width10">
                    #foreach( $ticketPriority in $action.getTicketPriorities() )
                        #if($ticketPriority.name() == $lastActivity.getTicketPriority().name())
                            <option value="$ticketPriority.name()" selected="selected">$ticketPriority.name()</option>
                        #else
                            <option value="$ticketPriority.name()">$ticketPriority.name()</option>
                        #end
                    #end
                </select>
                </td>
            </tr>
            <tr >
                <td ><label>Medium of contact:</label></td>
                <td>
                <select name="contactMedium" class="width10">
                    #foreach( $contactMedium in $action.getContactMedia() )
                        #if($contactMedium.name() == "PHONE")
                            <option value="$contactMedium.name()" selected="selected">$contactMedium.name()</option>
                        #else
                            <option value="$contactMedium.name()">$contactMedium.name()</option>
                        #end
                    #end
                </select>
                </td>
                <td />
                <td ><label>Time of contact:</label></td>
                <td ><input type="text" name="contactTimestamp" value="$action.getContactTimestamp()" class="required"/></td>
            </tr>
            <tr >
                <td colspan="2"></td>
                <td colspan="2"><input type="submit" value="Save" /></td>
                <td ><input type="hidden" name="userId" value="$ticket.getCustomerId()"/></td>
            </tr>
        </table>
    </form>
    <br />
</div>
<h2 >Activities</h2>
<div id="bottom-infopane-lower">
    <table id="activity-table">
        <colgroup >
            <col width="50px"/>
            <col width="250px"/>
            <col width="50px"/>
            <col width="50px"/>
            <col width="50px"/>
            <col width="50px"/>
            <col width="50px"/>
            <col width="50px"/>
            <col width="50px"/>
        </colgroup>
        <thead >
            <tr >
                <th >Activity Id</th>
                <th >Description</th>
                <th >Time of contact</th>
                <th >Contact Medium</th>
                <th >Category</th>
                <th >Assignee</th>
                <th >Created by</th>
                <th >Status</th>
                <th >Priority</th>
            </tr>
        </thead>
        <tbody >
        #foreach($activity in $action.getActivities())
            #set($date = $action.convertDate($activity.getContactTimestamp()))
            <tr >
                <td >$activity.getId()</td>
                <td title="$activity.getDescription()">$activity.getDescription()</td>
                <td title="$date">$date</td>
                <td >$activity.getContactMedium().name()</td>
                <td >$activity.getTicketCategory().name()</td>
                <td >$action.getAgent($activity.getTicketAssigneeId()).getEmailId()</td>
                <td >$action.getAgent($activity.getCreatorId()).getEmailId()</td>
                <td >$activity.getTicketStatus().name()</td>
                <td >$activity.getTicketPriority().name()</td>
            </tr>
        #end
        </tbody>
    </table>
</div>
</div>