diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2021-11-08 07:16:13 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2021-11-08 07:16:13 +0000 |
| commit | 7d375bb049a5de97482080a10ce7b53b248fcbe2 (patch) | |
| tree | e4eb641211b9145ddcb8dde897441526be8f649b /views | |
| parent | 234300c1c6b36ab523d0d136d880c87727964d1b (diff) | |
- Manuelle Bestellzustände4.3.6
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7957 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
| -rw-r--r-- | views/admin/module.phtml | 10 | ||||
| -rw-r--r-- | views/css/admin.css | 9 | ||||
| -rw-r--r-- | views/mods/mod_orderstates/settings_edit.phtml | 92 | ||||
| -rw-r--r-- | views/order/index.phtml | 2 |
4 files changed, 110 insertions, 3 deletions
diff --git a/views/admin/module.phtml b/views/admin/module.phtml index b10a264..e2efa01 100644 --- a/views/admin/module.phtml +++ b/views/admin/module.phtml @@ -144,7 +144,10 @@ <?php } ?>
- <?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || (@$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['demo_active'] === true || @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['active'] === true || $wpsg_update_data['modulinfo'][$_REQUEST['modul']]['free'] === true)) { ?>
+ <?php if ( !isset($this->arAllModule[$_REQUEST['modul']]->version) ||
+ @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['demo_active'] === true ||
+ @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['active'] === true ||
+ @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['free'] === true) { ?>
<hr />
@@ -168,7 +171,10 @@ <?php } else { ?>
- <?php if (@$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['demo_active'] === true || @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['active'] === true || $wpsg_update_data['modulinfo'][$_REQUEST['modul']]['free'] === true) { ?>
+ <?php if (
+ @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['demo_active'] === true ||
+ @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['active'] === true ||
+ @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['free'] === true) { ?>
<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
<?php } ?>
diff --git a/views/css/admin.css b/views/css/admin.css index 994d394..d41b510 100644 --- a/views/css/admin.css +++ b/views/css/admin.css @@ -84,6 +84,15 @@ #wpsg-bs .mr-4 { margin-right:1rem; }
#wpsg-bs .mt-0 { margin-top:0; }
#wpsg-bs .font-normal { font-weight:normal; }
+#wpsg-bs .flex { display:flex; }
+#wpsg-bs .justify-between { justify-content:space-between; }
+#wpsg-bs .items-center { align-items:center; }
+#wpsg-bs .mt-2 { margin-top:0.5rem; }
+#wpsg-bs .w-full { width:100%; }
+#wpsg-bs .p-1 { padding:0.25rem; }
+#wpsg-bs .box-border { box-sizing:border-box; }
+#wpsg-bs .text-right { text-align:right; }
+#wpsg-bs .none { display:none; }
.wp-admin #wpsg-bs select { max-width:100%; padding-right:0; line-height:initial; }
.wp-admin #wpsg-bs .checkbox input { margin-top:3px; width:15px; height:15px; }
diff --git a/views/mods/mod_orderstates/settings_edit.phtml b/views/mods/mod_orderstates/settings_edit.phtml new file mode 100644 index 0000000..2e2896c --- /dev/null +++ b/views/mods/mod_orderstates/settings_edit.phtml @@ -0,0 +1,92 @@ +<?php
+
+ declare(strict_types=1);
+
+ /**
+ * User: Daschmi (daschmi@daschmi.de)
+ * Date: 04.11.2021
+ * Time: 10:28
+ */
+
+?>
+
+<script src="<?php echo WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/views/js/vue3.js'; ?>"></script>
+
+<div id="wpsg_mod_orderstates_app">
+
+ <textarea name="wpsg_mod_orderstates[states]" class="none">{{arStates}}</textarea>
+
+ <p class="flex items-center justify-between">
+ <template v-if="arStatesNotDeleted.length === 0">
+ <?php echo __('Keine Bestellzustände angelegt.', 'wpsg'); ?>
+ </template>
+ <template v-if="arStatesNotDeleted.length === 1">
+ <?php echo __('Ein Bestellzustand wurde definiert.', 'wpsg'); ?>
+ </template>
+ <template v-else>
+ {{arStatesNotDeleted.length}} <?php echo __('Bestellzustände wurden definiert.', 'wpsg'); ?>
+ </template>
+ <a href="#" @click.prevent="add()">
+ <span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neuen Bestellzustand anlegen', 'wpsg'); ?>
+ </a>
+ </p>
+
+ <table class="w-full mt-2">
+ <tbody v-for="(row, i) of arStatesNotDeleted">
+ <tr>
+ <td class="p-1 w-full">
+ <input class="w-full box-border" type="text" v-model="row.name" />
+ </td>
+ <td class="p-1 text-right">
+
+ <a href="#" @click.prevent="deleteRow(row)" title="<?php echo __('Bestellzustand löschen', 'wpsg'); ?>">
+ <span class="glyphicon glyphicon-trash"></span>
+ </a>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</div>
+
+<script>
+
+ const Counter = {
+ data() {
+ return {
+ arStates: <?php echo json_encode($this->view['arStates']); ?>
+ }
+ },
+ computed: {
+ arStatesNotDeleted() {
+
+ let r = [];
+
+ for (let s of this.arStates) if (s.deleted !== '1') r.push(s);
+
+ return r;
+
+ }
+ },
+ methods: {
+ add() {
+
+ this.arStates.push({
+ id: 0,
+ name: '',
+ deleted: 0
+ });
+
+ },
+ deleteRow(row) {
+
+ row.deleted = '1';
+
+ }
+ }
+ }
+
+ Vue.createApp(Counter).mount('#wpsg_mod_orderstates_app')
+
+</script>
\ No newline at end of file diff --git a/views/order/index.phtml b/views/order/index.phtml index 59b315b..7eac747 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -13,7 +13,7 @@ $arPaymentKeySelect[$payment_key] = $payment['name'];
}
-
+
?>
<div class="wpsg_order" id="wpsg-bs">
|
