Kundennotizen auflisten und ändern
[kivitendo-erp.git] / templates / webpages / customer_vendor / tabs / vcnotes.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE L %]
4
5 <div id="vcnotes">
6   [% IF ( SELF.notes && SELF.notes.size ) %]
7      <p>
8        <table>
9         <tr>
10           <th class="listheading">[% 'Delete' | $T8 %]</th>
11           <th class="listheading">[% 'Subject' | $T8 %]</th>
12           <th class="listheading">[% 'Created on' | $T8 %]</th>
13           <th class="listheading">[% 'Created by' | $T8 %]</th>
14           <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
15           <th class="listheading">[% 'Follow-Up for' | $T8 %]</th>
16           <th class="listheading">[% 'Follow-Up done' | $T8 %]</th>
17         </tr>
18
19         [%- FOREACH row = SELF.notes %]
20           <tr class="listrow[% loop.count % 2 %]">
21             <td>
22               [% IF ( !SELF.note || SELF.note.id != row.id ) %]
23                 [% L.checkbox_tag('delete_notes[]', value = row.id) %]
24               [% END %]
25             </td>
26
27             <td>
28               <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>
29             </td>
30
31             <td>
32               [% row.itime.to_kivitendo | html %]
33             </td>
34
35             <td>
36               [% row.employee.safe_name | html %]
37             </td>
38
39             <td>
40               [% row.follow_up.follow_up_date.to_kivitendo | html %]
41             </td>
42
43             <td>
44               [% row.follow_up.created_for.safe_name | html %]
45             </td>
46
47             <td>
48               [% IF ( row.follow_up.follow_up_date ) %]
49                 [% IF ( row.follow_up.done ) %]
50                   [% 'Yes' | $T8 %]
51                 [% ELSE %]
52                   [% 'No' | $T8 %]
53                 [% END %]
54               [% END %]
55             </td>
56           </tr>
57         [% END %]
58       </table>
59     </p>
60   [% END %]
61
62
63   <div class="listtop">
64     [% IF ( SELF.note.id ) %]
65       [% 'Edit note' | $T8 %]
66     [% ELSE %]
67       [% 'Add note' | $T8 %]
68     [% END %]
69   </div>
70
71   [% L.hidden_tag('note.id', SELF.note.id) %]
72
73   <p>
74     <table>
75       <tr>
76         <td valign="right">[% 'Subject' | $T8 %]</td>
77
78         <td>
79           [% L.input_tag('note.subject', SELF.note.subject, size = 50) %]
80         </td>
81       </tr>
82
83       <tr>
84         <td valign="right" align="top">[% 'Body' | $T8 %]</td>
85
86         <td align="top">
87           [% L.textarea_tag('note.body', SELF.note.body, cols = 50 rows = 10) %]
88         </td>
89       </tr>
90
91       <tr>
92         <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
93
94         <td>
95           [% L.date_tag('note_followup.follow_up_date', SELF.note_followup.follow_up_date) %]
96           [% 'for' | $T8 %]
97           [% L.select_tag(
98                'note_followup.created_for_user',
99                SELF.all_employees,
100                default = SELF.note_followup.created_for_user,
101                title_key = 'safe_name'
102              )
103           %]
104         </td>
105       </tr>
106
107       <tr>
108         <td>&nbsp;</td>
109
110         <td>
111           [% L.checkbox_tag('note_followup.done', checked = SELF.note_followup.done) %]
112           <label for="note_followup_done">[% 'Follow-Up done' | $T8 %]</label>
113         </td>
114       </tr>
115
116     </table>
117   </p>
118 </div>