Symlink für Brieffunktion. Ferner vergessenes template-Verzeichnis
authorJan Büren <jan@kivitendo-premium.de>
Wed, 11 Mar 2015 14:56:28 +0000 (15:56 +0100)
committerJan Büren <jan@kivitendo-premium.de>
Wed, 11 Mar 2015 14:56:28 +0000 (15:56 +0100)
letter.pl [new symlink]
templates/webpages/letter/edit.html [new file with mode: 0644]
templates/webpages/letter/load_drafts.html [new file with mode: 0644]
templates/webpages/letter/report_bottom.html [new file with mode: 0644]
templates/webpages/letter/report_top.html [new file with mode: 0644]
templates/webpages/letter/search.html [new file with mode: 0644]

diff --git a/letter.pl b/letter.pl
new file mode 120000 (symlink)
index 0000000..385000d
--- /dev/null
+++ b/letter.pl
@@ -0,0 +1 @@
+am.pl
\ No newline at end of file
diff --git a/templates/webpages/letter/edit.html b/templates/webpages/letter/edit.html
new file mode 100644 (file)
index 0000000..fa6a8a0
--- /dev/null
@@ -0,0 +1,200 @@
+[%- USE HTML %]
+[%- USE T8 %]
+[%- USE L %]
+<body onload="[% onload %]" width=100%>
+
+ <div class="listtop">[% title %]</div>
+
+ <form action='letter.pl' method='POST'>
+
+  <input type="hidden" name="letter.id" value="[% letter.id | html %]">
+  <input type="hidden" name="letter.draft_id" value="[% letter.draft_id | html %]">
+  <input type="hidden" name="title" value="[% title | html %]">
+  <input type="hidden" name="type" value="[% type | html %]">
+  <input type="hidden" name="print_nextsub" value="print_letter">
+
+
+<p>
+ <table width=100%>
+  [%- IF SAVED_MESSAGE %]
+  <tr>
+    <td colspan=2>[% SAVED_MESSAGE %]</td>
+  </tr>
+  <tr height=10px><td></td></tr>
+  [%- END %]
+  <tr>
+   <td width=50%>
+    <!-- upper left block -->
+     <table width=90%>
+      <tr>
+       <th align='right'>[% 'Customer' | $T8 %]:</th>
+       <td>
+        [%- INCLUDE 'generic/multibox.html'
+             name          = 'letter.customer',
+             style         = 'width:60%',
+             DATA          = ALL_CUSTOMERS,
+             id_sub        = 'vc_keys',
+             label_key     = 'name',
+             select        = vc_select,
+             limit         = myconfig_vclimit,
+             allow_textbox = 1,
+             force_textbox = limit_exceeded_all_customer
+             onChange      = "document.getElementById('update_button').click();" -%]
+[%- IF letter.customer_id %]
+        <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="edit_vc_window([% letter.customer_id | html %], 'customer')">
+[%- END %]
+        <input type='hidden' name='letter.oldcustomer' value='[% letter.oldcustomer | html %]'>
+        <input type='hidden' name='letter.customer_id' value='[% letter.customer_id | html %]'>
+[%- UNLESS myconfig_vclimit < ALL_CUSTOMERS.size %]
+        <input type="hidden" name="letter.select[% vc %]" value="1">
+[%- END %]
+      </tr>
+      <tr>
+       <th align='right'>[% 'Contact Person' | $T8 %]</th>
+       <td>
+        [%- INCLUDE 'generic/multibox.html'
+             name       = 'letter.cp_id',
+             style      = 'width:100%',
+             DATA       = ALL_CONTACTS,
+             id_key     = 'cp_id',
+             label_sub  = 'ct_labels',
+             show_empty = 1 -%]
+       </td>
+      </tr>
+      <tr>
+       <th align='right'>[% 'Your Reference' | $T8 %]:</th>
+       <td><input name='letter.reference' style='width:70%' value='[% letter.reference %]'></td>
+      </tr>
+     </table>
+    <!-- /upper left block -->
+   </td>
+   <td width=50%>
+    <!-- upper right block -->
+     <table align=center width=90%>
+      <tr>
+       <th align='right'>[% 'Letternumber' | $T8 %]:</th>
+       <td><input name='letter.letternumber' style='width:70%' value='[% letter.letternumber %]'></td>
+      </tr>
+      <tr>
+       <th align='right'>[% 'Date' | $T8 %]:</th>
+        <td>[% L.date_tag('letter.date', date, readonly=readonly) %]</td>
+       </td>
+      </tr>
+     </table>
+    <!-- /upper right block -->
+   </td>
+  </tr>
+
+  <tr height=20></tr>
+
+  <tr>
+   <td colspan=2 width=100%>
+    <!-- central block -->
+     <table width=80%>
+      <tr>
+       <th align=right>[% 'Subject' | $T8 %]</th>
+       <td><textarea name='letter.subject' style='width:100%;font-weight:bold' rows=1>[% letter.subject %]</textarea></td>
+      </tr>
+       <th align=right>[% 'Greeting' | $T8 %]</th>
+       <td><input name='letter.greeting' style='width:100%;font-weight:bold' value="[% letter.greeting | html %]"></td>
+      </tr>
+      <tr>
+      <tr>
+       <th align=right>[% 'Body' | $T8 %]</th>
+       <td><textarea name='letter.body' style='width:100%' rows=20>[% letter.body | html %]</textarea></td>
+      </tr>
+      <tr height=10></tr>
+       <th align=right>[% 'Internal Notes' | $T8 %]</th>
+       <td><textarea name='letter.intnotes' style='width:100%' rows=4>[% letter.intnotes | html %]</textarea></td>
+      </tr>
+
+      <tr>
+       <th></th>
+       <td>
+        <table width=90%>
+         <tr>
+          <td>
+           <table width=100%>
+            <tr>
+             <td>[% 'Employee' | $T8 %]</td>
+            </tr>
+            <tr>
+             <td>
+              [%- INCLUDE 'generic/multibox.html'
+                   name          = 'letter.employee_id',
+                   default       = letter.employee_id,
+                   style         = 'width:70%;font-weight:bold',
+                   DATA          = ALL_EMPLOYEES,
+                   id_key        = 'id',
+                   label_key     = 'name',
+                   limit         = vclimit,
+                   show_empty    = 1,
+                   allow_textbox = 0,
+                   force_textbox = limit_exceeded_ALL_EMPLOYEES
+                   onChange      = "document.getElementById('update_button').click();" -%]
+             </td>
+            </tr>
+            <!-- tr><td><input name="employee_position" style=width:70% value='[% employee_position %]'></td></tr -->
+           </table>
+          </td>
+          <td>
+           <table width=100%>
+            <tr>
+             <td>[% 'Salesman' | $T8 %]</td>
+            </tr>
+            <tr>
+             <td>
+              [%- INCLUDE 'generic/multibox.html'
+                   name          = 'letter.salesman_id',
+                   default       = letter.salesman_id,
+                   style         = 'width:70%;font-weight:bold',
+                   DATA          = ALL_SALESMEN,
+                   id_key        = 'id',
+                   label_key     = 'name',
+                   limit         = vclimit,
+                   show_empty    = 1,
+                   allow_textbox = 0,
+                   force_textbox = limit_exceeded_ALL_SALESMAN
+                   onChange      = "document.getElementById('update_button').click();" -%]
+             </td>
+            </tr>
+           </table>
+          </td>
+          <td>
+          </td>
+         </tr>
+        </table>
+       </td>
+      </tr>
+     </table>
+    <!-- /central block -->
+   </td>
+  </tr>
+  <tr>
+    <td colspan=3><hr size="3" noshade></td>
+  </tr>
+  <tr>
+   <td>
+     [% print_options %]
+   </td>
+  </tr>
+ </table>
+</p>
+
+<input type="hidden" name="action" value="dispatcher">
+<input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
+<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
+<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
+<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
+<input class="submit" type="submit" name="action_save_letter_draft" value="[% 'Save Draft' | $T8 %]">
+
+ </form>
+
+    <script type="text/javascript">
+     <!--
+       Calendar.setup({ inputField : "date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "date_button" });
+     //-->
+    </script>
+
+</body>
+
diff --git a/templates/webpages/letter/load_drafts.html b/templates/webpages/letter/load_drafts.html
new file mode 100644 (file)
index 0000000..78c04cd
--- /dev/null
@@ -0,0 +1,41 @@
+[%- USE T8 %]
+[%- USE HTML %]
+<h1>[% 'Load letter draft' | $T8 %]</h1>
+
+ <form method="post" name="Form" action="letter.pl">
+  <table width="100%">
+   <tr>
+    <td>
+     [% 'The following drafts have been saved and can be loaded.' | $T8 %]
+    </td>
+   </tr>
+   <tr>
+    <td>
+     <table>
+      <tr>
+       <th class="listheading">&nbsp;</th>
+       <th class="listheading">[% 'Date' | $T8 %]</th>
+       <th class="listheading">[% 'Subject' | $T8 %]</th>
+       <th class="listheading">[% 'Customer' | $T8 %]</th>
+      </tr>
+
+      [% FOREACH row = LETTER_DRAFTS %]
+       <tr class="listrow[% loop.count % 2 %]">
+        <td><input type="checkbox" name="checked_[% row.id %]" value="1"></td>
+        <td>[% HTML.escape(row.date) %]</td>
+        <td><a href="letter.pl?action=edit&callback=letter.pl&draft=1&id=[% HTML.url(row.id) %]">[% HTML.escape(row.subject) %]</a></td>
+        <td>[% HTML.escape(row.customer) %]</td>
+       </tr>
+      [% END %]
+     </table>
+    </td>
+   </tr>
+   <tr>
+     <input type="hidden" name="action" value="dispatcher">
+     <input type="hidden" name="draft" value="1"><!-- maybe not needed -->
+     <input type="submit" class="submit" name="letter_draft_action" value="[% 'Skip' | $T8 %]">
+     <input type="submit" class="submit" name="letter_draft_action" value="[% 'Delete drafts' | $T8 %]">
+   </td>
+   </tr>
+  </table>
+ </form>
diff --git a/templates/webpages/letter/report_bottom.html b/templates/webpages/letter/report_bottom.html
new file mode 100644 (file)
index 0000000..da543df
--- /dev/null
@@ -0,0 +1,7 @@
+[% USE HTML%]
+[%- USE T8 %]
+ <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
+ [%- FOREACH item = HIDDEN %]
+ <input type="hidden" name="[% HTML.escape(item.key) %]" value="[% HTML.escape(item.value) %]">
+ [%- END %]
+</form>
diff --git a/templates/webpages/letter/report_top.html b/templates/webpages/letter/report_top.html
new file mode 100644 (file)
index 0000000..548c4ed
--- /dev/null
@@ -0,0 +1,10 @@
+[%- IF OPTIONS.size %]
+<p>
+ [%- FOREACH option = OPTIONS %]
+ [%- option %][% UNLESS loop.last %]<br>[% END %]
+ [%- END %]
+</p>
+[%- END %]
+
+<form action="letter.pl" method="post" name="Form">
+
diff --git a/templates/webpages/letter/search.html b/templates/webpages/letter/search.html
new file mode 100644 (file)
index 0000000..e8ce72f
--- /dev/null
@@ -0,0 +1,92 @@
+[% USE HTML %]
+[% USE T8 %]
+<body onload="on_load()">
+
+ <script type="text/javascript">
+  <!--
+      function on_load() {
+        Calendar.setup({ inputField : "date_from", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "date_from_trigger" });
+        Calendar.setup({ inputField : "date_to",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "date_to_trigger" });
+        document.Form.subject.focus();
+      }
+    -->
+ </script>
+
+ <div class="listtop">[% title %]</div>
+
+ <form action="letter.pl" method="post" name="Form">
+  <input type="hidden" name="nextsub" value="report">
+
+  <p>
+   <table>
+    <tr>
+     <th align='right'>[% 'Letternumber' | $T8 %]</th>
+     <td><input name='letternumber' style='width:250px' value='[% letternumber %]'></th>
+    </tr>
+    <tr>
+     <td align="right">[% 'Customer' | $T8 %]</td>
+     <td>
+        [%- INCLUDE 'generic/multibox.html'
+             name          = 'customer',
+             style         = 'width:250px',
+             DATA          = ALL_CUSTOMERS,
+             id_key        = 'id',
+             label_key     = 'name',
+             select        = vc_select,
+             limit         = myconfig_vclimit,
+             allow_textbox = 1,
+             show_empty    = 1,
+             force_textbox = limit_exceeded_all_customer
+             onChange      = "document.getElementById('update_button').click();" -%]
+[%- IF myconfig_vclimit > ALL_CUSTOMERS.size %]
+       <input type="hidden" name='selectcustomer' value="1">
+[%- END %]
+     </td>
+    </tr>
+
+    <tr>
+     <td align="right">[% 'Contact' | $T8 %]</td>
+     <td><input name="contact" style='width:250px'></td>
+    </tr>
+
+    <tr>
+     <td align="right">[% 'Subject' | $T8 %]</td>
+     <td><input name="subject" style='width:250px'></td>
+    </tr>
+
+    <tr>
+     <td align="right">[% 'Body' | $T8 %]</td>
+     <td><input name="body" style='width:250px'></td>
+    </tr>
+
+    <tr>
+     <td align='right'>[% 'From' | $T8 %]</td>
+     <td>
+      <input name="date_from" id="date_from" size="12">
+      <input type="button" name="date_from_button" id="date_from_trigger" value="?">
+      [% 'To (time)' | $T8 %]
+      <input name="date_to" id="date_to" size="12">
+      <input type="button" name="date_to_button" id="date_to_trigger" value="?">
+     </td>
+    </tr>
+<!--
+    <tr>
+     <td align="right">[% 'Include in Report' | $T8 %]</td>
+     <td>
+
+      <table>
+      </table>
+
+     </td>
+    </tr>
+-->
+   </table>
+  </p>
+
+  <p>
+   <input type="submit" name="action" value="[% 'Continue' | $T8 %]">
+  </p>
+ </form>
+
+</body>
+</html>