]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/customer_vendor/tabs/vcnotes.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / customer_vendor / tabs / vcnotes.html
1 [% USE T8 %]
2 [% USE HTML %]
3 [% USE L %]
4 [% USE LxERP %]
5 [% USE date %]
6
7 <div id="vcnotes">
8
9 <div class="wrapper">
10
11 <!-- PENDENT: wieso Datum nicht descending sortiert? -->
12 [% IF ( SELF.notes && SELF.notes.size ) %]
13 <table class="tbl-list width-moderate">
14   <caption>[% 'Follow-Ups' | $T8 %]</caption>
15   <thead>
16     <tr>
17       <th>[% 'Delete' | $T8 %]</th>
18       <th>[% 'Subject' | $T8 %]</th>
19       <th>[% 'Created on' | $T8 %]</th>
20       <th>[% 'Created by' | $T8 %]</th>
21       <th>[% 'Follow-Up Date' | $T8 %]</th>
22       <th>[% 'Follow-Up for' | $T8 %]</th>
23       <th>[% 'Follow-Up done' | $T8 %]</th>
24     </tr>
25   </thead>
26   <tbody>
27     [% FOREACH row = SELF.notes %]
28       <tr>
29         <td>
30           [% IF ( !SELF.note || SELF.note.id != row.id ) %]
31             [% L.checkbox_tag('delete_notes[]', value = row.id) %]
32           [% END %]
33         </td>
34         <td>
35           <a href="controller.pl?action=CustomerVendor/edit&db=[% SELF.is_vendor() ? 'vendor' : 'customer' %]&id=[% HTML.url(SELF.cv.id) %]&note_id=[% HTML.url(row.id) %]">[% HTML.escape(row.subject) %]</a>
36         </td>
37         <td>[% row.itime.to_kivitendo | html %]</td>
38         <td>[% row.employee.safe_name | html %]</td>
39         <td>[% row.follow_up.follow_up_date.to_kivitendo | html %]</td>
40         <td>
41           [% FOREACH employee = row.follow_up.created_for_employees -%]
42             [% employee.safe_name | html %][% IF !loop.last %]<br>[% END -%]
43           [% END %]
44         </td>
45         <td>
46           [% IF ( row.follow_up.follow_up_date ) %]
47             [% IF ( row.follow_up.done ) %]
48               [% 'Yes' | $T8 %]
49             [% ELSE %]
50               [% 'No' | $T8 %]
51             [% END %]
52           [% END %]
53         </td>
54       </tr>
55     [% END #/FOREACH %]
56   </tbody>
57 </table>
58 [% END %]
59
60 [% L.hidden_tag('note.id', SELF.note.id) %]
61
62 <table class="tbl-horizontal">
63   <caption>
64     [% IF ( SELF.note.id ) %]
65       [% 'Edit note' | $T8 %]
66     [% ELSE %]
67       [% 'Add note' | $T8 %]
68     [% END %]
69   </caption>
70   <tbody>
71     [% IF SELF.note_followup.done -%]
72     <tr class="fu_finished">
73       <th>[% 'Finished' | $T8 %]</th>
74       <td>[% 'by' | $T8 %] [% HTML.escape(SELF.note_followup.done.employee.safe_name) %]</td>
75       <td colspan="2">[% 'at' | $T8 %] [% HTML.escape(SELF.note_followup.done.done_at_as_timestamp_s) %]</td>
76     </tr>
77     [% END %]
78     <tr>
79       <th>[% 'Subject' | $T8 %]</th>
80       <td>[% L.input_tag_trim('note.subject', SELF.note.subject, class="wi-verywide") %]</td>
81     </tr>
82     <tr>
83       <th>[% 'Follow-Up On' | $T8 %]</th>
84       <td>
85         [% IF SELF.note_followup.follow_up_date ; SET thedate=SELF.note_followup.follow_up_date ; ELSE; SET thedate=date.format(date.now, '%d.%m.%Y'); END %]
86         [% L.date_tag('note_followup.follow_up_date', thedate, class="wi-date") %]
87       </td>
88     </tr>
89     <tr>
90       <th><label for="note_followup_done" title="[% 'Follow-Up done' | $T8 %]">[% 'Done' | $T8 %]</label></th>
91       <td>[% L.checkbox_tag('note_followup.done', checked = SELF.note_followup.done) %]</td>
92     </tr>
93     <tr>
94       <th>[% 'Body' | $T8 %]</th>
95       <td >[% L.textarea_tag('note.body', SELF.note.body, rows=10, class="wi-verywide") %]</td>
96     </tr>
97     <tr>
98       <td>[% 'for' | $T8 %]</td>
99       <td>
100         <table>
101           <tr class="listheading">
102             <th>[% L.checkbox_tag('checkall_checkboxes', label=LxERP.t8('All users'), id='ckeckall', checkall="[data-checkall=1]") %]</th>
103           </tr>
104           [% FOREACH employee = SELF.all_employees %]
105             [% SET checked = 0 %]
106             [% FOREACH cfe = SELF.note_followup.created_for_employees %]
107               [% IF cfe.id == employee.id %][% SET checked = 1 %][% LAST %][% END %]
108             [% END %]
109             <tr class="listrow">
110               <td>[% L.checkbox_tag('note_followup.created_for_employees[]', value=employee.id, checked=checked,
111                                     "data-checkall"=1, class="employee_check", label=employee.safe_name) %]</td>
112             </tr>
113           [% END %]
114         </table>
115       <td>
116       <td>
117         <table>
118           <tr class="listheading">
119             <th>[% LxERP.t8('Users that are a member in this group') %]<br>([% LxERP.t8('click on a group to add the group\'s users') %])</th>
120           </tr>
121           [% FOREACH auth_group = SELF.all_auth_groups %]
122             <tr onclick="follow_up_do_select(this)" data-ids='[% FOREACH employee = auth_group.get_employees %][% employee.id %][% IF !loop.last %],[% END%][% END%]' class="interactive cursor-pointer">
123               <td class="listrow1"><b>←&nbsp;[% auth_group.name %]</b>: [% auth_group.description %]</td>
124             </tr>
125             [% FOREACH employee = auth_group.get_employees %]
126               <tr class="listrow0"><td>&nbsp;&nbsp;&nbsp;[% employee.safe_name %]</td></tr>
127             [% END %]
128           [% END %]
129         </table>
130       </td>
131     </tr>
132   </tbody>
133 </table>
134
135 </div>
136 </div>