Subversion Repositories SmartDukaan

Rev

Rev 3411 | Rev 3499 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3106 mandeep.dh 1
#set($messages = $action.getActionErrors())
2
#if($messages && $messages.size() != 0)
3
    #foreach($message in $messages)
4
        $message <br/>
5
    #end
6
#else
3090 mandeep.dh 7
#set($ticket = $action.getTicket())
8
#set($ticketId = $ticket.getId())
9
<div >
3397 mandeep.dh 10
<div id="mail-div" class="hidden">
3206 mandeep.dh 11
    <form id="mail-form">
12
        <table >
13
            <colgroup >
14
                <col width="10%"/>
15
                <col width="90%"/>
16
            </colgroup>
17
            <tbody >
3405 mandeep.dh 18
                #if($ticket.isSetCustomerId())
19
                #set($customerEmailId = $action.getUser($ticket.getCustomerId()).getEmail())
20
                #else
3422 mandeep.dh 21
                #set($customerEmailId = $ticket.getCustomerEmailId())
3269 mandeep.dh 22
                #end
3206 mandeep.dh 23
                <tr >
24
                    <td ><span >Reply to:</span></td>
3405 mandeep.dh 25
                    <td >$customerEmailId</td>
3206 mandeep.dh 26
                </tr>
27
                <tr >
28
                    <td ><span >Subject:</span></td>
29
                    <td ><textarea name="subject" rows="1" class="required" cols="75">$action.getSubject()</textarea></td>
30
                </tr>
31
                <tr >
32
                    <td ><span >Body:</span></td>
33
                    <td ><textarea name="body" rows="12" class="required" cols="75"></textarea></td>
34
                </tr>
35
                <tr >
3405 mandeep.dh 36
                    <td ><input type="hidden" name="customerEmailId" value="$customerEmailId"/></td>
3206 mandeep.dh 37
                    <td ><input type="submit" value="Send mail and save ticket"/></td>
38
                </tr>
39
            </tbody>
40
        </table>
41
    </form>
42
</div>
3090 mandeep.dh 43
<div id="bottom-infopane-upper">
44
    <form id="update-ticket-form" ticketId="$ticketId" _method="put" method="post" action="">
45
        <table>
46
            <colgroup>
47
                <col width="200px"/>
48
                <col width="250px"/>
3106 mandeep.dh 49
                <col width="120px"/>
3090 mandeep.dh 50
                <col width="200px"/>
3106 mandeep.dh 51
                <col width="300px"/>
3090 mandeep.dh 52
            </colgroup>
3405 mandeep.dh 53
            #if($ticket.isSetCustomerId())
54
            #else
55
                <tr >
56
                    <td >Customer Name: </td>
57
                    <td >
58
                        #if($ticket.isSetCustomerName())
59
                            <input type="text" name="customerName" value="$ticket.getCustomerName()"/>
60
                        #else
61
                            <input type="text" name="customerName"/>
62
                        #end
63
                    </td>
64
                    <td ></td>
65
                    <td >Customer Mobile No: </td>
66
                    <td >
67
                        #if($ticket.isSetCustomerMobileNumber())
68
                            <input type="text" name="customerMobileNumber" value="$ticket.getCustomerMobileNumber()"/>
69
                        #else
70
                            <input type="text" name="customerMobileNumber"/>
71
                        #end
72
                    </td>
73
                </tr>
74
            #end
3090 mandeep.dh 75
            <tr >
3106 mandeep.dh 76
                <td ><label>Description:</label></td>
3405 mandeep.dh 77
                <td colspan="4"><textarea id="description" class="required" name="description" rows="2" cols="90">$ticket.getDescription()</textarea></td>
3106 mandeep.dh 78
            </tr>
79
            <tr >
3090 mandeep.dh 80
                <td ><label>Category:</label></td>
81
                <td >
3106 mandeep.dh 82
                <select name="category" class="width10">
83
                    #foreach( $category in $action.getTicketCategories() )
84
                        #if($category.name() == $ticket.getCategory().name())
85
                            <option value="$category.name()" selected="selected">$category.name()</option>
3090 mandeep.dh 86
                        #else
3106 mandeep.dh 87
                            <option value="$category.name()">$category.name()</option>
3090 mandeep.dh 88
                        #end
89
                    #end
90
                </select>
91
                </td>
92
                <td></td>
3106 mandeep.dh 93
                <td ><label>Order Id:</label></td>
94
                <td >
3168 mandeep.dh 95
                    #if($ticket.isSetOrderId())
3106 mandeep.dh 96
                        $ticket.getOrderId()
97
                    #else
98
                        N/A
99
                    #end
100
                </td>
3090 mandeep.dh 101
            </tr>
102
            <tr >
103
                <td ><label>Assignee:</label></td>
3405 mandeep.dh 104
                #if($action.isAssigneeEditable())
3090 mandeep.dh 105
                    <td >
3106 mandeep.dh 106
                    <select name="assigneeEmailId" class="width10">
3090 mandeep.dh 107
                        #foreach( $agent in $action.getAllAgents() )
3106 mandeep.dh 108
                            #if($agent.getId() == $ticket.getAssigneeId())
3090 mandeep.dh 109
                                <option value="$agent.getEmailId()" selected="selected">$agent.getEmailId()</option>
110
                            #else
111
                                <option value="$agent.getEmailId()">$agent.getEmailId()</option>
112
                            #end
113
                        #end
114
                    </select>
115
                    </td>
3405 mandeep.dh 116
                #else
117
                    #if ($ticket.isSetAssigneeId())
118
                        #set($assigneeEmailId = $action.getAgent($ticket.getAssigneeId()).getEmailId())
119
                        <td >$assigneeEmailId
120
                            <input type="hidden" name="assigneeEmailId" value="$assigneeEmailId"/>
121
                        </td>
122
                    #else
123
                        <td >N/A
124
                            <input type="hidden" name="assigneeEmailId" value=""/>
125
                        </td>
126
                    #end
3090 mandeep.dh 127
                #end
128
                <td ></td>
3106 mandeep.dh 129
                <td ><label>Created by:</label></td>
130
                <td >$action.getAgent($ticket.getCreatorId()).getEmailId()</td>
3090 mandeep.dh 131
            </tr>
132
            <tr >
133
                <td ><label>Status:</label></td>
134
                <td >
3106 mandeep.dh 135
                <select name="status" class="width10">
136
                    #foreach( $status in $action.getTicketStatuses() )
137
                        #if($status.name() == $ticket.getStatus().name())
138
                            <option value="$status.name()" selected="selected">$status.name()</option>
3090 mandeep.dh 139
                        #else
3106 mandeep.dh 140
                            <option value="$status.name()">$status.name()</option>
3090 mandeep.dh 141
                        #end
142
                    #end
143
                </select>
144
                </td>
145
                <td ></td>
146
                <td ><label>Priority:</label></td>
147
                <td >
3106 mandeep.dh 148
                <select name="priority" class="width10">
149
                    #foreach( $priority in $action.getTicketPriorities() )
150
                        #if($priority.name() == $ticket.getPriority().name())
151
                            <option value="$priority.name()" selected="selected">$priority.name()</option>
3090 mandeep.dh 152
                        #else
3106 mandeep.dh 153
                            <option value="$priority.name()">$priority.name()</option>
3090 mandeep.dh 154
                        #end
155
                    #end
156
                </select>
157
                </td>
158
            </tr>
159
            <tr >
3106 mandeep.dh 160
                <td ><label>Activity Type:</label></td>
161
                <td colspan="4">
3339 mandeep.dh 162
                <select id="activity-type" name="activityType" class="width-activity-type">
3106 mandeep.dh 163
                    #foreach( $type in $action.getActivityTypes() )
164
                        #if($type.name() == "OTHER")
165
                            <option value="$type.name()" selected="selected">$type.name()</option>
3090 mandeep.dh 166
                        #else
3106 mandeep.dh 167
                            <option value="$type.name()">$type.name()</option>
3090 mandeep.dh 168
                        #end
169
                    #end
170
                </select>
171
                </td>
3106 mandeep.dh 172
                </td>
3090 mandeep.dh 173
            </tr>
174
            <tr >
3106 mandeep.dh 175
                <td ><label>Activity description:</label></td>
3405 mandeep.dh 176
                <td colspan="4"><textarea class="required" name="activityDescription" rows="2" cols="90"></textarea></td>
3106 mandeep.dh 177
            </tr>
178
            <tr >
3090 mandeep.dh 179
                <td colspan="2"></td>
180
                <td colspan="2"><input type="submit" value="Save" /></td>
3405 mandeep.dh 181
                <td ><input type="hidden" name="userId" value="$ticket.getCustomerId()"/></td>
3090 mandeep.dh 182
            </tr>
183
        </table>
184
    </form>
185
</div>
186
<h2 >Activities</h2>
187
<div id="bottom-infopane-lower">
188
    <table id="activity-table">
189
        <thead >
3106 mandeep.dh 190
            <tr class="table-tr-header">
3090 mandeep.dh 191
                <th >Activity Id</th>
3106 mandeep.dh 192
                <th >Type</th>
3090 mandeep.dh 193
                <th >Description</th>
3106 mandeep.dh 194
                <th >Timestamp</th>
195
                <th >Created by</th>
196
                <th >Assignee</th>
3090 mandeep.dh 197
                <th >Category</th>
198
                <th >Status</th>
199
                <th >Priority</th>
3106 mandeep.dh 200
                <th >Ticket Description</th>
3405 mandeep.dh 201
                <!--th >Customer Name</th>
202
                <th >Customer Email Id</th>
203
                <th >Customer Mobile No</th-->
3090 mandeep.dh 204
            </tr>
205
        </thead>
206
        <tbody >
207
        #foreach($activity in $action.getActivities())
3106 mandeep.dh 208
            #set($date = $action.convertDate($activity.getCreationTimestamp()))
209
            #set($trClass = "table-tr-odd")
210
            #if($velocityCount % 2 == 0)
211
                #set($trClass = "table-tr-even")
212
            #end
213
            <tr class="$trClass">
214
                <td class="truncated-text">$activity.getId()</td>
215
                <td class="truncated-text">$activity.getType().name()</td>
3411 mandeep.dh 216
                <td class="truncated-text"><pre>$activity.getDescription()</pre></td>
3106 mandeep.dh 217
                <td class="truncated-text">$date</td>
218
                <td class="truncated-text">$action.getAgent($activity.getCreatorId()).getEmailId()</td>
3168 mandeep.dh 219
                #if($activity.isSetTicketAssigneeId())
220
                    <td class="truncated-text">$action.getAgent($activity.getTicketAssigneeId()).getEmailId()</td>
221
                #else
222
                    <td class="truncated-text">N/A</td>
223
                #end
3106 mandeep.dh 224
                <td class="truncated-text">$activity.getTicketCategory().name()</td>
225
                <td class="truncated-text">$activity.getTicketStatus().name()</td>
226
                <td class="truncated-text">$activity.getTicketPriority().name()</td>
227
                <td class="truncated-text">$activity.getTicketDescription()</td>
3405 mandeep.dh 228
                <!--td class="truncated-text">
229
                #if($activity.getCustomerName())
230
                    $activity.getCustomerName()
231
                #else
232
                    N/A
233
                #end
234
                </td>
235
                <td class="truncated-text">
236
                #if($activity.getCustomerEmailId())
237
                    $activity.getCustomerEmailId()
238
                #else
239
                    N/A
240
                #end
241
                </td>
242
                <td class="truncated-text">
243
                #if($activity.getCustomerMobileNumber())
244
                    $activity.getCustomerMobileNumber()
245
                #else
246
                    N/A
247
                #end
248
                </td-->                
3090 mandeep.dh 249
            </tr>
250
        #end
251
        </tbody>
252
    </table>
253
</div>
3106 mandeep.dh 254
</div>
255
#end
256
<script >
3339 mandeep.dh 257
$(document).ready(truncateText(70));
3390 mandeep.dh 258
</script>