]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/customer_vendor/tabs/vcnotes.html
date error in mapping
[mfinanz.git] / templates / webpages / customer_vendor / tabs / vcnotes.html
index cf21b519d78891f4c1a2f2faccd93fa45bd5380d..f2cacaab212729612f1ecee9b892937154c384ce 100644 (file)
@@ -1,6 +1,7 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE L %]
+[%- USE LxERP %]
 
 <div id="vcnotes">
   [% IF ( SELF.notes && SELF.notes.size ) %]
@@ -41,7 +42,9 @@
             </td>
 
             <td>
-              [% row.follow_up.created_for_employee.safe_name | html %]
+              [% FOREACH employee = row.follow_up.created_for_employees -%]
+                [% employee.safe_name | html %][% IF !loop.last %]<br>[% END -%]
+              [% END %]
             </td>
 
             <td>
 
   <p>
     <table>
+      [% IF SELF.note_followup.done -%]
+      <tr class="fu_finished">
+        <td>[% 'Finished' | $T8 %]</td>
+        <td>[% 'by' | $T8 %] [% HTML.escape(SELF.note_followup.done.employee.safe_name) %]</td>
+        <td colspan="2">[% 'at' | $T8 %] [% HTML.escape(SELF.note_followup.done.done_at_as_timestamp_s) %]</td>
+      </tr>
+      [% END %]
       <tr>
         <td valign="right">[% 'Subject' | $T8 %]</td>
 
-        <td>
-          [% L.input_tag('note.subject', SELF.note.subject, size = 50) %]
+        <td colspan="3">
+          [% L.input_tag_trim('note.subject', SELF.note.subject, size = 50) %]
         </td>
       </tr>
 
       <tr>
         <td valign="right" align="top">[% 'Body' | $T8 %]</td>
 
-        <td align="top">
+        <td align="top" colspan="3">
           [% L.textarea_tag('note.body', SELF.note.body, cols = 50 rows = 10) %]
         </td>
       </tr>
       <tr>
         <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
 
-        <td>
+        <td colspan="3">
           [% L.date_tag('note_followup.follow_up_date', SELF.note_followup.follow_up_date) %]
-          [% 'for' | $T8 %]
-          [% L.select_tag(
-               'note_followup.created_for_user',
-               SELF.all_employees,
-               default = SELF.note_followup.created_for_user,
-               title_key = 'safe_name'
-             )
-          %]
-        </td>
+        <td>
+      </tr>
+
+      <tr>
+        <td valign="right" align="top">[% 'for' | $T8 %]</td>
+<td valign="top">
+      <table>
+       <tr class="listheading">
+       <th>[% L.checkbox_tag('checkall_checkboxes', label='', id='ckeckall', checkall="[data-checkall=1]") %]</th>
+       <th>[% LxERP.t8('All users') %]</th>
+       </tr>
+
+       [% FOREACH employee = SELF.all_employees %]
+        [% SET checked = 0 %]
+        [% FOREACH cfe = SELF.note_followup.created_for_employees %]
+         [% IF cfe.id == employee.id %][% SET checked = 1 %][% LAST %][% END %]
+        [% END %]
+       <tr class="listrow">
+         <td>[% L.checkbox_tag('note_followup.created_for_employees[]', value=employee.id, checked=checked, "data-checkall"=1, class="employee_check") %]</td>
+         <td><label for='created_for_employees[]'>[% HTML.escape(employee.safe_name) %]</label><td>
+       </tr>
+        [% END %]
+      </table>
+     <td>
+     <td valign="top">
+      <table>
+       <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>
+        [% FOREACH auth_group = SELF.all_auth_groups %]
+         <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">
+          <td class="listrow1"><b>←&nbsp;[% auth_group.name %]</b>: [% auth_group.description %]</td>
+         </tr>
+         [% FOREACH employee = auth_group.get_employees %]
+          <tr class="listrow0"><td>&nbsp;&nbsp;&nbsp;[% employee.safe_name %]</td></tr>
+         [% END %]
+        [% END %]
+      </table>
+     </td>
       </tr>
 
       <tr>
         <td>&nbsp;</td>
 
         <td>
-          [% L.checkbox_tag('note_followup.done', checked = SELF.note_followup.done) %]
+          [% L.checkbox_tag('note_followup_done', checked = SELF.note_followup.done) %]
           <label for="note_followup_done">[% 'Follow-Up done' | $T8 %]</label>
         </td>
       </tr>