Subversion Repositories SmartDukaan

Rev

Rev 7162 | 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>
16244 manish.sha 94
						<option value = "PMAgent">PMAgent</option>
4793 amar.kumar 95
					</select>
96
				</td>
16244 manish.sha 97
				<td id ="agent-role-error">&nbsp;</td>
4793 amar.kumar 98
			</tr>
99
			<tr>
16244 manish.sha 100
				<td>ProfitMandi CRM User: </td>
101
				<td><input type='checkBox' id = 'pmCrmUser' name = 'pmCrmUser'></td>
102
            </tr>
103
			<tr>
4793 amar.kumar 104
					<td>Password: </td>
105
					<td><input type="password" id = "create-password1" name="password"/></td>
106
					<td id ="agent-password1-error">&nbsp;</td>
107
			</tr>
108
			<tr>
109
					<td>ReEnter Password: </td>
110
					<td><input type="password" id = "create-password2" name="password2"/></td>
111
					<td id ="agent-password2-error">&nbsp;</td>
112
			</tr>
113
			<tr>
114
				<td>Manager Email: </td>
115
				<td>
116
					<select id = "manager-email-id" name = "managerEmailId">
117
					#foreach($agent in $action.getAgents())
118
						#set( $emailId = $agent.getEmailId())
119
						#set($id = $agent.getId())
120
						<option id = $id >$emailId</option>
121
					#end
122
					</select>
123
				</td>
124
			</tr>
125
			<br/>
126
 
127
			<tr> 
128
				<td colspan = "2" ><input type="submit" value = "Create Agent "id="create-agent"/></td> 
129
            </tr>
130
 
131
		</table>
132
    </form>
133
</div>
134
 
135
 
136
<div id = "deactivate-agent-div" class = "hidden" align = "center">
137
	<h1>Deactivate Agent</h1>
138
	<select id = "deactivate-agent-email" name ="emailId" >
139
		#foreach($agent in $action.getAgents())
140
			#set( $emailId = $agent.getEmailId())
141
			#set($id = $agent.getId())
142
			#if($id != 1)
143
				<option id = $id>$emailId</option>
144
			#end
145
		#end
146
	</select>
147
	<input type = "button" id = "deactivate-agent" value = "Deactivate" />
148
</div>
149
 
150
<div id="change-password-div" class = "hidden" >
151
	<h1>Change Password</h1>
152
	<form id = "change-password-form">
153
		<table >
154
			<colgroup>
155
                <col width="200px"/>
156
                <col width="300px"/>
157
            </colgroup>
158
 
159
			<tr>
160
				<td>Select Agent : </td>
161
				<td>
162
					<select id = "agentEmail" name = "emailId">
163
					#foreach($agent in $action.getAgents())
164
						#set( $emailId = $agent.getEmailId())
165
						#set($id = $agent.getId())
166
						#if($id != 1)
167
							<option>$emailId</option>
168
						#end
169
					#end
170
					</select>
171
				</td>
172
            </tr>
173
			<tr>
174
				<td>Enter New Password : </td>
175
				<td><input type="password" id = "change-password1" name="newPassword"/></td>
176
			</tr>
177
			<tr>
178
				<td>ReEnter Password: </td>
179
				<td><input type="password" id = "change-password2" name="password2"/></td>
180
			</tr>
181
			<tr>
182
				<td colspan ="2"><input type ="button" id = "change-agent-password"value = "Change Password" /></td>
183
			</tr>
184
		</table>
185
	</form>
186
</div>
187
 
5168 amar.kumar 188
<div id = "change-agent-role-div" class = "hidden" align = "center">
189
	<h1>Change Agent Role</h1>
190
	<form id="change-agent-role-form" >
191
        <table>
192
			<colgroup>
193
                <col width="200px"/>
194
                <col width="300px"/>
195
            </colgroup>
196
			<tr>
197
                <td>Select Agent : </td>
198
				<td>
199
					<select id = "deactivate-agent-email" name ="id" >
200
            		#foreach($agent in $action.getAgents())
201
            			#set( $emailId = $agent.getEmailId())
202
            			#set($id = $agent.getId())
203
            			#if($id != 1)
204
            				<option id = $id value = $id>$emailId</option>
205
            			#end
206
            		#end
207
					</select>
208
				</td>
209
			<tr>
210
				<td>Choose Role(s) : </td>
211
				<td>
212
					<select id = "changed-role" name = "role" multiple = "multiple">
213
						<option value = "Agent">Agent</option>
214
						<option value = "Outbound">Outbound</option>
215
						<option value = "TeamLead">TeamLead</option>
216
					</select>
217
				</td>
218
			</tr>
219
		</table>
220
		<br />
221
		<br />
222
		<input type = "submit" id = "change-agent-role" value = "Change Role" />
223
	</form>
224
	<h4 >Note : All previous roles will be overwritten by new roles</h5>
225
</div>
226
 
227
 
4793 amar.kumar 228
<div id="bottom-infopane">
229
</div>
230
#end