Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
33103 amit.gupta 1
<section class="wrapper">
2
    <div class="row">
3
        <div class="col-lg-12">
4
            <h3 class="page-header"><i class="icon_document_alt"></i>USER</h3>
5
            <ol class="breadcrumb">
6
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
7
                <li><i class="icon_document_alt"></i>Create Auth User</li>
8
            </ol>
9
        </div>
10
    </div>
11
    <form id="create-scheme-form">
12
        <div class="row">
29209 manish 13
 
33103 amit.gupta 14
            <div class="col-lg-2 form-group">
15
                <input placeholder="Employee Code" id="authUserEmployeeCode" name="authUserEmployeeCode" type="text"
16
                       value="" class="form-control input-sm">
17
            </div>
18
            <div class="col-lg-2 form-group">
19
                <input placeholder="First Name" id="authUserFirstName" name="authUserFirstName" type="text" value=""
20
                       class="form-control input-sm">
21
            </div>
22
            <div class="col-lg-2 form-group">
23
                <input placeholder="Last Name" id="authUserLastName" name="authUserLastName" type="text" value=""
24
                       class="form-control input-sm">
25
            </div>
26
            <div class="col-lg-2 form-group">
27
                <input placeholder="Email" id="authUserEmail" name="authUserEmail" type="email" value=""
28
                       class="form-control input-sm">
29
            </div>
30
            <div class="col-lg-2 form-group">
31
                <input placeholder="Mobile Number" id="authUserMobileNumber" name="authUserMobileNumber" type="Number"
32
                       value="" class="form-control input-sm" pattern="\d{3}[\-]\d{3}[\-]\d{4}" required>
33
            </div>
34
            <div class="col-lg-2 form-group">
35
                <input placeholder="Gmail Id" id="authUserGmailId" name="authUserGmailId" type="text" value=""
36
                       class="form-control input-sm" required>
37
            </div>
38
            <div class="col-lg-2 form-group">
39
                <input placeholder="Image" id="authUserImage" name="authUserImage" type="text" value=""
40
                       class="form-control input-sm">
41
            </div>
42
        </div>
43
        <div class="row">
44
            <div class="col-lg-3">
45
                <input class="btn btn-primary create-auth-user" type="button" value="Create Auth User">
46
            </div>
47
        </div>
48
    </form>
49
    <br><br>
50
    <div id="auth-user-table">
51
        <div class="row">
52
            <div class="col-lg-12">
53
                <table class="table table-striped table-advance table-hover" id="authTable">
54
                    <thead>
55
                    <tr>
33065 raveendra. 56
                        <th>Employee Code</th>
57
                        <th>First Name</th>
58
                        <th>Last Name</th>
59
                        <th>Email</th>
60
                        <th>Mobile Number</th>
61
                        <th>Gmail Id</th>
62
                        <th>Image</th>
33103 amit.gupta 63
                        <th>Reporting Manager</th>
33065 raveendra. 64
                        <th>Created Date</th>
65
                        <th>Reset Password</th>
66
                        <th>Remove</th>
67
 
68
 
69
                    </tr>
33103 amit.gupta 70
                    </thead>
71
                    <tbody>
32463 jai.hind 72
 
33103 amit.gupta 73
                        #if(!$authUsers.isEmpty())
74
                            #foreach( $authUser in $authUsers )
75
                            <tr>
76
                                <td>$authUser.getEmployeeCode()</td>
77
                                <td>$authUser.getFirstName()</td>
78
                                <td>$authUser.getLastName()</td>
79
                                <td>$authUser.getEmailId()</td>
80
                                <td>$authUser.getMobileNumber()</td>
81
                                <td>#if($authUser.getGmailId())
82
                                    <span>$authUser.getGmailId()</span>
83
                                    <button class="mk_gmail_edit btn btn-primary" data-id="$authUser.getEmailId()">
84
                                        Update
85
                                    </button>
86
                                #else
87
                                    <span></span>
88
                                    <button class="mk_gmail_edit btn btn-primary" data-id="$authUser.getEmailId()">Add
89
                                    </button>
90
                                #end
91
                                </td>
32463 jai.hind 92
 
33103 amit.gupta 93
                                <td>
32463 jai.hind 94
 
33103 amit.gupta 95
                                    #if($authUser.getImageUrl())
96
                                        <span> $authUser.getImageUrl() </span>
97
                                        <button class="img_edit btn btn-primary" data-id="$authUser.getEmailId()">Edit
98
                                        </button>
99
                                    #else
100
                                        <span></span>
101
                                        <button class="img_edit btn btn-primary" data-id="$authUser.getEmailId()">Edit
102
                                        </button>
103
                                    #end
104
 
105
                                </td>
106
 
107
                                #if($authUser.getManagerId() != 0)
108
                                    <td>
109
                                        <select class="form-control input-sm" id="auth-users" name="auth-users"
110
                                                placeholder="Authusers">
111
                                            #if($authUser.getManagerId()==0)
112
                                                <option value="" disabled>Choose Manager</option>
32463 jai.hind 113
                                            #end
33103 amit.gupta 114
                                            #foreach($activeAuthUser in $activeAuthUsers)
115
                                                <option value="$activeAuthUser.getId()"
116
                                                	#if($authUser.getManagerId()==$activeAuthUser.getId())
117
                                                        selected
118
                                                    #end
119
                                                >$activeAuthUser.getFullName()</option>
120
                                            #end
121
                                        </select>
122
                                        <button class="btn btn-primary add-manager" data-id="$authUser.getId()">Add
123
                                        </button>
124
                                    </td>
125
                                #end
32463 jai.hind 126
 
33103 amit.gupta 127
                                <td>$authUser.getFormattedCreateTimestamp()</td>
128
                                <td>
129
                                    <button class="btn btn-primary reset-password" data-id="$authUser.getEmailId()">
130
                                        Reset
131
                                    </button>
132
                                </td>
133
                                <td>
134
                                    <button class="btn btn-primary remove-user" data-id="$authUser.getId()">Remove
135
                                    </button>
136
                                </td>
32463 jai.hind 137
 
33103 amit.gupta 138
                            </tr>
139
                            #end
140
                        #else
141
                        <tr>
142
                            <td colspan="12" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
143
                        </tr>
144
                        #end
145
                    </tbody>
146
                </table>
147
            </div>
148
        </div>
24383 amit.gupta 149
    </div>
150
</section>
151
<div id="auth-user-details-container" style="background:white;background-color:white;">
152
</div>
33065 raveendra. 153
<script type="text/javascript">
33103 amit.gupta 154
    $(document).ready(function () {
29209 manish 155
 
33103 amit.gupta 156
        $('#authTable thead tr').clone(true).appendTo('#authTable thead');
157
        $('#authTable thead tr:eq(1) th').each(function (i) {
33065 raveendra. 158
            var title = $(this).text();
33103 amit.gupta 159
            $(this).html('<input type="text" style = "width:60%;" placeholder="Search ' + title + '" />');
29209 manish 160
 
33103 amit.gupta 161
            $('input', this).on('keyup change', function () {
162
                if (table.column(i).search() !== this.value) {
33065 raveendra. 163
                    table
33103 amit.gupta 164
                            .column(i)
165
                            .search(this.value)
166
                            .draw();
33065 raveendra. 167
                }
33103 amit.gupta 168
            });
33065 raveendra. 169
        });
33103 amit.gupta 170
        $(document).ready(function () {
33066 raveendra. 171
 
172
 
33103 amit.gupta 173
            var dtable = $('#authTable').DataTable({
33066 raveendra. 174
 
33103 amit.gupta 175
                pageLength: 10,
176
                paging: true,
177
                scrollCollapse: true,
178
                fixedHeader: true,
33066 raveendra. 179
 
180
 
181
            });
29209 manish 182
 
33103 amit.gupta 183
        });
184
    });
185
 
33065 raveendra. 186
</script>
29209 manish 187
 
188
 
189
 
33065 raveendra. 190
 
191
 
192
 
24383 amit.gupta 193