Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4793 amar.kumar 1
 
2
<div id="top-infopane">
3
#set($messages = $action.getActionErrors())
4
 
5
#if($messages && $messages.size() != 0)
6
    #foreach($message in $messages)
7
        $message <br/>
8
    #end
9
#else
10
<div id="action-messages">
11
#set($messages = $action.getActionMessages())
12
#if($messages && $messages.size() != 0)
13
    #foreach($message in $messages)
14
        $message <br />
15
    #end
16
#end
17
</div>
18
<br/>
19
<table id = "agent-mgmnt-options">
20
	<tr>
21
		<td><a href = "#" id = "create-agent" class = "agent-option"> Create new Agent </a></td>
22
	</tr>
23
	<tr>
24
		<td><a href = "#" id = "deactivate-agent" class = "agent-option"> Deactivate Agent </a></td>
25
	</tr>
26
	<tr>
27
		<td><a href = "#" id = "change-password" class = "agent-option"> Change Password </a></td>
28
	</tr>
5168 amar.kumar 29
	<tr>
30
		<td><a href = "#" id = "change-role" class = "agent-option"> Change Agent Role </a></td>
31
	</tr>
5909 amar.kumar 32
</table>
4793 amar.kumar 33
 
34
<br/><br/><br/>
35
<div id = "agent-table" >
36
	<table id = "agents" class = "display">
37
		<thead>
38
			<tr>
39
				<th>Agent ID</th>
40
				<th>Name</th>
41
				<th>Email ID</th>
7162 kshitij.so 42
				<th>Role</th>
5168 amar.kumar 43
				<th>Open Ticket Count</th>
4793 amar.kumar 44
			</tr>
45
		</thead>
46
		<tbody>
47
			#foreach($agent in $action.getAgents())
48
				#set( $id = $agent.getId())
49
				#set( $name = $agent.getName())
50
				#set( $emailId = $agent.getEmailId())
7162 kshitij.so 51
				#set( $roles = $action.getRoleForAgent($emailId))
5168 amar.kumar 52
				#set( $ticketCount = $action.getOpenTicketCount($id))
4793 amar.kumar 53
				<tr>
54
					<td>$id</td>
55
					<td>$name</td>
56
					<td>$emailId</td>
7162 kshitij.so 57
					<td>#foreach ($role in $roles)$role&nbsp;#end</td>
5168 amar.kumar 58
                    <td><a href="#" class = "agent-ticket-count" agentId = $emailId>$ticketCount</a></td>
4793 amar.kumar 59
				</tr>
60
			#end
61
		</tbody>
62
	</table>
63
</div>
64
</div>
65
 
66
<div id="create-agent-div" class="hidden">
67
    <h1>Create new Agent</h1>
68
    <form id="create-agent-form" >
69
        <table>
70
 
71
			<colgroup>
72
                <col width="200px"/>
73
                <col width="300px"/>
74
				<col width="200px"/>
75
            </colgroup>
76
 
77
			<tr >
78
                <td>Agent Name: </td>
79
                <td><input type="text" id = "new-agent-name" name="name"/></td>
80
				<td id ="agent-name-error">&nbsp;</td>
81
            </tr>
82
			<tr>
83
				<td>Agent Email: </td>
84
				<td><input type="text" id = "new-agent-id" name="emailId"/></td>
85
				<td id ="agent-email-error">&nbsp;</td>
86
			</tr>
87
			<tr>
88
				<td>Role: </td>
89
				<td>
90
					<select id = "new-agent-role" name = "role" multiple = "multiple">
91
						<option value = "Agent">Agent</option>
92
						<option value = "Outbound">Outbound</option>
93
						<option value = "TeamLead">TeamLead</option>
94
					</select>
95
				</td>
96
			</tr>
97
			<tr>
98
					<td>Password: </td>
99
					<td><input type="password" id = "create-password1" name="password"/></td>
100
					<td id ="agent-password1-error">&nbsp;</td>
101
			</tr>
102
			<tr>
103
					<td>ReEnter Password: </td>
104
					<td><input type="password" id = "create-password2" name="password2"/></td>
105
					<td id ="agent-password2-error">&nbsp;</td>
106
			</tr>
107
			<tr>
108
				<td>Manager Email: </td>
109
				<td>
110
					<select id = "manager-email-id" name = "managerEmailId">
111
					#foreach($agent in $action.getAgents())
112
						#set( $emailId = $agent.getEmailId())
113
						#set($id = $agent.getId())
114
						<option id = $id >$emailId</option>
115
					#end
116
					</select>
117
				</td>
118
			</tr>
119
			<br/>
120
 
121
			<tr> 
122
				<td colspan = "2" ><input type="submit" value = "Create Agent "id="create-agent"/></td> 
123
            </tr>
124
 
125
		</table>
126
    </form>
127
</div>
128
 
129
 
130
<div id = "deactivate-agent-div" class = "hidden" align = "center">
131
	<h1>Deactivate Agent</h1>
132
	<select id = "deactivate-agent-email" name ="emailId" >
133
		#foreach($agent in $action.getAgents())
134
			#set( $emailId = $agent.getEmailId())
135
			#set($id = $agent.getId())
136
			#if($id != 1)
137
				<option id = $id>$emailId</option>
138
			#end
139
		#end
140
	</select>
141
	<input type = "button" id = "deactivate-agent" value = "Deactivate" />
142
</div>
143
 
144
<div id="change-password-div" class = "hidden" >
145
	<h1>Change Password</h1>
146
	<form id = "change-password-form">
147
		<table >
148
			<colgroup>
149
                <col width="200px"/>
150
                <col width="300px"/>
151
            </colgroup>
152
 
153
			<tr>
154
				<td>Select Agent : </td>
155
				<td>
156
					<select id = "agentEmail" name = "emailId">
157
					#foreach($agent in $action.getAgents())
158
						#set( $emailId = $agent.getEmailId())
159
						#set($id = $agent.getId())
160
						#if($id != 1)
161
							<option>$emailId</option>
162
						#end
163
					#end
164
					</select>
165
				</td>
166
            </tr>
167
			<tr>
168
				<td>Enter New Password : </td>
169
				<td><input type="password" id = "change-password1" name="newPassword"/></td>
170
			</tr>
171
			<tr>
172
				<td>ReEnter Password: </td>
173
				<td><input type="password" id = "change-password2" name="password2"/></td>
174
			</tr>
175
			<tr>
176
				<td colspan ="2"><input type ="button" id = "change-agent-password"value = "Change Password" /></td>
177
			</tr>
178
		</table>
179
	</form>
180
</div>
181
 
5168 amar.kumar 182
<div id = "change-agent-role-div" class = "hidden" align = "center">
183
	<h1>Change Agent Role</h1>
184
	<form id="change-agent-role-form" >
185
        <table>
186
			<colgroup>
187
                <col width="200px"/>
188
                <col width="300px"/>
189
            </colgroup>
190
			<tr>
191
                <td>Select Agent : </td>
192
				<td>
193
					<select id = "deactivate-agent-email" name ="id" >
194
            		#foreach($agent in $action.getAgents())
195
            			#set( $emailId = $agent.getEmailId())
196
            			#set($id = $agent.getId())
197
            			#if($id != 1)
198
            				<option id = $id value = $id>$emailId</option>
199
            			#end
200
            		#end
201
					</select>
202
				</td>
203
			<tr>
204
				<td>Choose Role(s) : </td>
205
				<td>
206
					<select id = "changed-role" name = "role" multiple = "multiple">
207
						<option value = "Agent">Agent</option>
208
						<option value = "Outbound">Outbound</option>
209
						<option value = "TeamLead">TeamLead</option>
210
					</select>
211
				</td>
212
			</tr>
213
		</table>
214
		<br />
215
		<br />
216
		<input type = "submit" id = "change-agent-role" value = "Change Role" />
217
	</form>
218
	<h4 >Note : All previous roles will be overwritten by new roles</h5>
219
</div>
220
 
221
 
4793 amar.kumar 222
<div id="bottom-infopane">
223
</div>
224
#end