diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2021-02-10 08:44:56 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2021-02-10 08:44:56 +0000 |
| commit | 43efe21f03d30b2a5b1eed412a89ee0e21e9bb68 (patch) | |
| tree | 0bf3218ca712b8b261a0e933a57593a587cd65af /views/mods/mod_downloadplus/settings_edit_templates.phtml | |
| parent | 762953d5237cb365d1a5dda83d05c3f11599fa8b (diff) | |
- Feature: Globale Bilder in globalen Variationen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7841 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_downloadplus/settings_edit_templates.phtml')
| -rw-r--r-- | views/mods/mod_downloadplus/settings_edit_templates.phtml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/views/mods/mod_downloadplus/settings_edit_templates.phtml b/views/mods/mod_downloadplus/settings_edit_templates.phtml index 498aed4..a3e97ee 100644 --- a/views/mods/mod_downloadplus/settings_edit_templates.phtml +++ b/views/mods/mod_downloadplus/settings_edit_templates.phtml @@ -46,7 +46,10 @@ <div v-if="template" class="template">
<div class="form-group form-group-sm has-feedback">
- <label class="col-sm-6 control-label" for="wpsg_mod_downloadplus_filename"><?php echo __('Name des Templates', 'wpsg'); ?></label>
+ <label class="col-sm-6 control-label label-copy" for="wpsg_mod_downloadplus_filename">
+ <a href="#" title="<?php echo __('Template kopieren', 'wpsg'); ?>" @click="copyTemplate()"><span class="wpsg-glyphicon glyphicon glyphicon-copy"></span></a>
+ <span><?php echo __('Name des Templates', 'wpsg'); ?></span>
+ </label>
<div class="col-sm-6">
<div class="wpsg_field_wrap wpsg_field_wrap_template_name">
<input type="text" v-model="template.name" />
@@ -179,6 +182,8 @@ #wpsg_dp_templates_app .file_wrap { display:flex; justify-content:space-between; align-items:center; }
#wpsg_dp_templates_app .file_wrap .file { display:flex; gap:1rem; justify-content:flex-end; align-items:center; }
#wpsg_dp_templates_app .file_wrap .file .wpsg-glyphicon { margin-right:8px; }
+ #wpsg_dp_templates_app .label-copy { display:flex; justify-content:space-between; }
+ #wpsg_dp_templates_app .label-copy .glyphicon { font-size:14px; }
</style>
@@ -220,6 +225,19 @@ },
+ copyTemplate: function() {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie das Template kopieren möchten?', 'wpsg'); ?>')) return false;
+
+ let new_template = JSON.parse(JSON.stringify(this.template));
+
+ new_template.name += ' (Kopie)';
+
+ this.arTemplates.push(new_template);
+ this.template = new_template;
+
+ },
+
removeTemplate: function() {
if (!confirm('<?php echo __('Sind Sie sich sicher? Das ganze Template und alle Felder werden gelöscht.', 'wpsg'); ?>')) return;
|
