]> wagnertech.de Git - mfinanz.git/blob - templates/webpages/customer_vendor/tabs/vcnotes.html
date error in mapping
[mfinanz.git] / templates / webpages / customer_vendor / tabs / vcnotes.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE L %]
4 [%- USE LxERP %]
5
6 <div id="vcnotes">
7   [% IF ( SELF.notes && SELF.notes.size ) %]
8      <p>
9        <table>
10         <tr>
11           <th class="listheading">[% 'Delete' | $T8 %]</th>
12           <th class="listheading">[% 'Subject' | $T8 %]</th>
13           <th class="listheading">[% 'Created on' | $T8 %]</th>
14           <th class="listheading">[% 'Created by' | $T8 %]</th>
15           <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
16           <th class="listheading">[% 'Follow-Up for' | $T8 %]</th>
17           <th class="listheading">[% 'Follow-Up done' | $T8 %]</th>
18         </tr>
19
20         [%- FOREACH row = SELF.notes %]
21           <tr class="listrow[% loop.count % 2 %]">
22             <td>
23               [% IF ( !SELF.note || SELF.note.id != row.id ) %]
24                 [% L.checkbox_tag('delete_notes[]', value = row.id) %]
25               [% END %]
26             </td>
27
28             <td>
29               <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>
30             </td>
31
32             <td>
33               [% row.itime.to_kivitendo | html %]
34             </td>
35
36             <td>
37               [% row.employee.safe_name | html %]
38             </td>
39
40             <td>
41               [% row.follow_up.follow_up_date.to_kivitendo | html %]
42             </td>
43
44             <td>
45               [% FOREACH employee = row.follow_up.created_for_employees -%]
46                 [% employee.safe_name | html %][% IF !loop.last %]<br>[% END -%]
47               [% END %]
48             </td>
49
50             <td>
51               [% IF ( row.follow_up.follow_up_date ) %]
52                 [% IF ( row.follow_up.done ) %]
53                   [% 'Yes' | $T8 %]
54                 [% ELSE %]
55                   [% 'No' | $T8 %]
56                 [% END %]
57               [% END %]
58             </td>
59           </tr>
60         [% END %]
61       </table>
62     </p>
63   [% END %]
64
65   <h2>
66     [% IF ( SELF.note.id ) %]
67       [% 'Edit note' | $T8 %]
68     [% ELSE %]
69       [% 'Add note' | $T8 %]
70     [% END %]
71   </h2>
72
73   [% L.hidden_tag('note.id', SELF.note.id) %]
74
75   <p>
76     <table>
77       [% IF SELF.note_followup.done -%]
78       <tr class="fu_finished">
79         <td>[% 'Finished' | $T8 %]</td>
80         <td>[% 'by' | $T8 %] [% HTML.escape(SELF.note_followup.done.employee.safe_name) %]</td>
81         <td colspan="2">[% 'at' | $T8 %] [% HTML.escape(SELF.note_followup.done.done_at_as_timestamp_s) %]</td>
82       </tr>
83       [% END %]
84       <tr>
85         <td valign="right">[% 'Subject' | $T8 %]</td>
86
87         <td colspan="3">
88           [% L.input_tag_trim('note.subject', SELF.note.subject, size = 50) %]
89         </td>
90       </tr>
91
92       <tr>
93         <td valign="right" align="top">[% 'Body' | $T8 %]</td>
94
95         <td align="top" colspan="3">
96           [% L.textarea_tag('note.body', SELF.note.body, cols = 50 rows = 10) %]
97         </td>
98       </tr>
99
100       <tr>
101         <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
102
103         <td colspan="3">
104           [% L.date_tag('note_followup.follow_up_date', SELF.note_followup.follow_up_date) %]
105         <td>
106       </tr>
107
108       <tr>
109         <td valign="right" align="top">[% 'for' | $T8 %]</td>
110 <td valign="top">
111       <table>
112        <tr class="listheading">
113        <th>[% L.checkbox_tag('checkall_checkboxes', label='', id='ckeckall', checkall="[data-checkall=1]") %]</th>
114        <th>[% LxERP.t8('All users') %]</th>
115        </tr>
116
117        [% FOREACH employee = SELF.all_employees %]
118         [% SET checked = 0 %]
119         [% FOREACH cfe = SELF.note_followup.created_for_employees %]
120          [% IF cfe.id == employee.id %][% SET checked = 1 %][% LAST %][% END %]
121         [% END %]
122        <tr class="listrow">
123          <td>[% L.checkbox_tag('note_followup.created_for_employees[]', value=employee.id, checked=checked, "data-checkall"=1, class="employee_check") %]</td>
124          <td><label for='created_for_employees[]'>[% HTML.escape(employee.safe_name) %]</label><td>
125        </tr>
126         [% END %]
127       </table>
128      <td>
129      <td valign="top">
130       <table>
131        <tr class="listheading"><th>[% LxERP.t8('Users that are a member in this group') %] ([% LxERP.t8('click on a group to add the group\'s users') %])</th></tr>
132         [% FOREACH auth_group = SELF.all_auth_groups %]
133          <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">
134           <td class="listrow1"><b>←&nbsp;[% auth_group.name %]</b>: [% auth_group.description %]</td>
135          </tr>
136          [% FOREACH employee = auth_group.get_employees %]
137           <tr class="listrow0"><td>&nbsp;&nbsp;&nbsp;[% employee.safe_name %]</td></tr>
138          [% END %]
139         [% END %]
140       </table>
141      </td>
142       </tr>
143
144       <tr>
145         <td>&nbsp;</td>
146
147         <td>
148           [% L.checkbox_tag('note_followup_done', checked = SELF.note_followup.done) %]
149           <label for="note_followup_done">[% 'Follow-Up done' | $T8 %]</label>
150         </td>
151       </tr>
152
153     </table>
154   </p>
155 </div>