Subversion Repositories SmartDukaan

Rev

Rev 33577 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33507 tejus.loha 1
<style>
2
 
3
 
4
    img:target {
5
        border: 5px solid red;
6
    }
7
 
8
    .lightbox {
9
        /* Default to hidden */
10
        display: none;
11
 
12
        /* Overlay entire screen */
13
        position: fixed;
14
        z-index: 999;
15
        top: 0;
16
        left: 0;
17
        right: 0;
18
        bottom: 0;
19
 
20
        /* A bit of padding around image */
21
        padding: 1em;
22
 
23
        /* Translucent background */
24
        background: rgba(0, 0, 0, 0.8);
25
    }
26
 
27
    /* Unhide the lightbox when it's the target */
28
    .lightbox:target {
29
        display: block;
30
    }
31
 
32
    .lightbox span {
33
        /* Full width and height */
34
        display: block;
35
        width: 100%;
36
        height: 100%;
37
 
38
        /* Size and position background image */
39
        background-position: center;
40
        background-repeat: no-repeat;
41
        background-size: contain;
42
    }
43
 
44
</style>
45
<section class="wrapper">
46
    <h2 class="text-center">Upload Your Document</h2>
47
    <hr>
48
 
49
    <table class="table-bordered table" id="OnboardingDocumentTable">
50
        <thead>
51
        <tr>
52
            <th>Documents</th>
53
            <th>Preview</th>
54
            #if($isApprover)
55
                <th>Status</th>
56
                <th>Action</th>
57
            #else
58
                <th>Status</th>
59
            #end
60
        </tr>
61
        </thead>
62
        <tbody>
63
            #set($counter=0)
64
            #foreach($loiDocMaster in $activeDocMasterList)
65
                #set($docId=0)
66
                #set($status=0)
67
                #set($status=$masterDocIdLoiDocMap.get($loiDocMaster.getId()).getOk())
68
                #if($masterDocIdLoiDocMap.get($loiDocMaster.getId()).getDocId())
69
                    #set($docId=$masterDocIdLoiDocMap.get($loiDocMaster.getId()).getDocId())
70
                #end
71
            <tr>
72
                <td class="docfile">
73
                    <input type="hidden" name="document-master-id" value="$loiDocMaster.getId()" class="masterId">
74
                    <input type="hidden" name="documentName" value="$loiDocMaster.getDocName()" class="documentName">
75
                    <input type="hidden" name="document-id" value="$docId" class="documentId">
76
                    #if(!$loiDocMaster.isOptional())
77
                        <label style="color: #688a7e">$loiDocMaster.getDocName()</label><span
78
                            style="color:red ;font-size: 140%">*</span>
79
                        <input type="file" required>
80
                    #else
81
                        <label style="color: #688a7e">$loiDocMaster.getDocName()</label>
82
                        <input type="file">
83
                    #end
84
                </td>
85
                <td>
86
                    #if($docId!=0)
87
                        <a href="#doc-id$counter">
88
                            <img src="${rc.contextPath}/download-attachment?documentId=$docId" width="100"
89
                                 alt="">
90
                        </a>
91
                        <a href="#" class="lightbox" id="doc-id$counter">
92
                            <span style="background-image:url('${rc.contextPath}/download-attachment?documentId=$docId')"></span>
93
                        </a><br>
94
                        <a href="${rc.contextPath}/download-attachment?documentId=$docId">Download & View</a>
95
                    #end
96
                </td>
97
 
98
                #if($isApprover && $docId!=0)
99
 
100
                    #if($status)
101
                        <td>Approved</td>
33577 tejus.loha 102
                    #elseif($status.equals(false))
33507 tejus.loha 103
                        <td>Rejected</td>
104
                    #else
105
                        <td>Need to Approval</td>
106
                    #end
107
 
108
                    <td>
35971 aman 109
                        #if($status == true)
33525 tejus.loha 110
                            <button class="mk_docApproval" data-form_id="$loiId"
111
                                    data-doc_master_id="$loiDocMaster.getId()"
35971 aman 112
                                    data-flag="false">Reject
113
                            </button>
114
                        #elseif($status == false)
115
                            <button class="mk_docApproval" data-form_id="$loiId"
116
                                    data-doc_master_id="$loiDocMaster.getId()"
33525 tejus.loha 117
                                    data-flag="true">Accept
118
                            </button>
35971 aman 119
                        #else
33525 tejus.loha 120
                            <button class="mk_docApproval" data-form_id="$loiId"
121
                                    data-doc_master_id="$loiDocMaster.getId()"
35971 aman 122
                                    data-flag="true">Accept
123
                            </button>
124
                            <button class="mk_docApproval" data-form_id="$loiId"
125
                                    data-doc_master_id="$loiDocMaster.getId()"
33525 tejus.loha 126
                                    data-flag="false">Reject
127
                            </button>
128
                        #end
33507 tejus.loha 129
                    </td>
130
 
131
                #else
132
                    #if($status)
133
                        <td>Approved</td>
33577 tejus.loha 134
                    #elseif($status.equals(false))
33507 tejus.loha 135
                        <td>Rejected</td>
136
                    #else
137
                        <td>Need to Approval</td>
138
                    #end
139
                #end
140
            </tr>
141
                #set($counter = $counter + 1)
142
            #end
143
        </tbody>
144
    </table>
33577 tejus.loha 145
    <div align="right">
146
        <button id="uploadDocumentbtn1" value="$loiId" class="btn-primary">Upload All</button>
147
    </div>
33507 tejus.loha 148
</section>
149
 
150
 
151
 
152