diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2019-01-25 07:44:39 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2019-01-25 07:44:39 +0000 |
| commit | c9c2a9e0b1644ebd906fa03b267598aee84c4edb (patch) | |
| tree | b5021617fae86a262877481a9df9e24050676c79 /views/mods | |
| parent | 94b89b6ca6f6e6848a1f4c1be1184ed7ced427e7 (diff) | |
- Korrekturen Berechnung
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7264 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
| -rw-r--r-- | views/mods/mod_coverletter/order_view.phtml | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/views/mods/mod_coverletter/order_view.phtml b/views/mods/mod_coverletter/order_view.phtml index 6804fdb..3dbc4da 100644 --- a/views/mods/mod_coverletter/order_view.phtml +++ b/views/mods/mod_coverletter/order_view.phtml @@ -8,36 +8,28 @@ <?php echo wpsg_drawForm_AdminboxStart(__('Anschreiben', 'wpsg'));?>
- <?php if (sizeof($this->view['mod_anschreiben']['aranschreiben']) == 0 ) { ?>
+ <?php if (sizeof($this->view['mod_coverletter']['arCoverLetter']) == 0 ) { ?>
- <p><?php echo __('Bisher kein Anschreiben geschrieben.', 'wpsg'); ?></p>
+ <p><?php echo __('Bisher kein Anschreiben für diese Bestellung geschrieben.', 'wpsg'); ?></p>
- <?php } else { ?>
- <table>
- <?php foreach ($this->view['mod_anschreiben']['aranschreiben_gesamt'] as $a) { ?>
- <tr>
- <td>#<?php echo ($a['anr'] != ''); ?>
-
- <?php if ($a['anr'] != "") { ?>
- <?php echo wpsg_translate(__('Anschreiben gespeichert am #1#', 'wpsg'), date("d.m.Y", $a['ts_datum'])); ?>
- <?php } ?>
-
- </td>
- <td style="text-align:right;">
-
- <?php if ($a['anr'] != "") {
-
- $rfile = $this->callMod('wpsg_mod_anschreiben', 'getFilePath', array($this->view['data']['id'], true)).'A'.$r['anr'].'.pdf';
-
- } ?>
+ <?php } else { ?>
- </td>
- </tr>
- <?php } ?>
- </table>
- <?php } ?>
+ <?php foreach ($this->view['mod_coverletter']['arCoverLetter'] as $a) { ?>
- <br>
+ <div class="wpsg_flex wpsg_flex_justify_content_space_between">
+ <span>
+ <?php echo wpsg_translate(__('#2#: Anschreiben ##1#', 'wpsg'), $a['id'], wpsg_formatTimestamp(strtotime($a['cdate']))); ?>: <?php echo ((strlen($a['text']) > 50)?substr($a['text'],0,50).' ...':$a['text']); ?>
+ </span>
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_coverletter&noheader=1&action=ajax&order_id=<?php echo $a['order_id']; ?>&cl_id=<?php echo $a['id']; ?>&wpsg_mod_coverletter_get" target="_new">
+ <?php echo __('Download', 'wpsg'); ?>
+ </a>
+ </div>
+
+ <?php } ?>
+
+ <?php } ?>
+
+ <br />
<div class="wpsg_clear"></div>
@@ -66,6 +58,7 @@ <br />
<input type="submit" name="wpsg_mod_coverletter_write" value="<?php echo __("Speichern & Drucken", "wpsg"); ?>" style="float:left;" class="button button-primary" />
+ <input type="submit" name="wpsg_mod_coverletter_preview" onclick="wpsg_form_refresh = false;" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:left; margin-left:15px;" class="button" />
<div class="wpsg_clear"></div>
@@ -78,13 +71,21 @@ <script>
+ var wpsg_form_refresh = true;
+
jQuery('#wpsg_mod_coverletter_form').on('submit', function() {
- setTimeout(function() {
+ if (wpsg_form_refresh) {
+
+ setTimeout(function() {
- location.reload();
+ location.reload();
+
+ }, 1000);
- }, 1000);
+ }
+
+ wpsg_form_refresh = true;
} );
|
