diff options
| author | hartmut <noreply@maennchen1.de> | 2017-10-27 14:05:45 +0000 |
|---|---|---|
| committer | hartmut <noreply@maennchen1.de> | 2017-10-27 14:05:45 +0000 |
| commit | 38f20718ad0c0e13243e8a9a120797c24b7f5a5d (patch) | |
| tree | 1c9fd16acce5645f647df154b6c60923008a2e5a /views | |
| parent | e69ddd0e1b7e00c1917f8695f7290023f3282f85 (diff) | |
Bewertungen im BE bearbeitbar
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6659 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
| -rw-r--r-- | views/css/admin.css | 16 | ||||
| -rw-r--r-- | views/js/font-awesome-4.5.0/HELP-US-OUT.txt | 7 | ||||
| -rw-r--r-- | views/produkt/addedit_rating.phtml | 104 |
3 files changed, 127 insertions, 0 deletions
diff --git a/views/css/admin.css b/views/css/admin.css index 954fdf1..545e1c0 100644 --- a/views/css/admin.css +++ b/views/css/admin.css @@ -192,6 +192,22 @@ table.wpsgitrecht_table { width:100%; } .wpsg_productview_backend-sold-out { color:#dc3232; font-weight:700; }
.wpsg_productview_backend-available { color:#7ad03a; font-weight:700; float:left; margin-right:5px; }
+/* Bewertung */
+.wpsg_rating { background-color:#29556E; }
+.sto_comment_form .comment_list,
+.sto_comment_form .comment_form { width:55rem; }
+.wpsg_comment_form .comment { background-color:#ececec; padding:20px; margin-bottom:30px; }
+.wpsg_comment_form .wpsg_star_wrap { float:right; }
+.wpsg_comment_form .wpsg_bewertung_comment_name { font-weight:bold; color:#29556e; text-transform:uppercase; float:left; }
+.wpsg_comment_form .wpsg_bewertung_comment_date { padding:20px 0px; color:#29556e; }
+.wpsg_comment_form .wpsg_bewertung_comment_text { color:#29556e; }
+.wpsg_comment_form .row { margin-left:0px !important; }
+.wpsg_star_wrap { font-size:15px; font-weight:normal; margin-bottom:5px; }
+.wpsg_star_wrap .fa { margin-right:5px; }
+.wpsg_star_wrap { color:#F8E71C; text-shadow:-1px 0 #F6B03A, 0 1px #F6B03A, 1px 0 #F6B03A, 0 -1px #F6B03A; }
+.wpsg_star_wrap .fa-star-active { color:#C8C8C8; text-shadow:-1px 0 #9B9B9B, 0 1px #9B9B9B, 1px 0 #9B9B9B, 0 -1px #9B9B9B; }
+.wpsg_comment_form .wpsg_star_wrap { float:right; }
+
/* Bestellverwaltung */
.wpsg_order .wpsg_status_link_wrap { min-height:50px; float:left; display:inline-block; }
.wpsg_order .col_checkbox { width:20px; }
diff --git a/views/js/font-awesome-4.5.0/HELP-US-OUT.txt b/views/js/font-awesome-4.5.0/HELP-US-OUT.txt new file mode 100644 index 0000000..cfd9d9f --- /dev/null +++ b/views/js/font-awesome-4.5.0/HELP-US-OUT.txt @@ -0,0 +1,7 @@ +I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, +Fonticons (https://fonticons.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, +comprehensive icon sets or copy and paste your own. + +Please. Check it out. + +-Dave Gandy diff --git a/views/produkt/addedit_rating.phtml b/views/produkt/addedit_rating.phtml new file mode 100644 index 0000000..44a6265 --- /dev/null +++ b/views/produkt/addedit_rating.phtml @@ -0,0 +1,104 @@ +<?php
+
+ /**
+ * Template für die Integration der Produktbewertung in die Produktverwaltung
+ */
+
+?>
+
+<div id="wpsg_be_rating">
+<?php echo wpsg_drawForm_AdminboxStart(__('Produktbewertung', 'wpsg')); ?>
+
+
+ <div class="row">
+ <div class="col-sm-12">
+
+ <?php if (wpsg_isSizedArray($this->view['arCom'])) { ?>
+
+ <div class="row">
+ <div class="wpsg_comment_form col-sm-12">
+
+
+ <?php foreach ($this->view['arCom'] as $com) { ?>
+
+ <div class="row" id ="wpsg_rating_<?php echo __($com['comment_ID'], 'wpsg'); ?>">
+
+ <div class="comment col-sm-11">
+
+ <div class="wpsg_bewertung_comment_name">
+
+ <?php echo __($com['comment_author'], 'wpsg'); ?>
+
+ </div>
+ <div class="wpsg_star_wrap" style="display:inline-block;">
+ <?php
+ $cnt = $com['meta_value'];
+ for ($i = 0; $i < $cnt; $i++)
+ echo '<i class="fa fa-star"></i>';
+ ?>
+ </div>
+ <br />
+
+ <?php //setlocale(LC_TIME, "de_DE.UTF-8"); ?>
+ <?php //date_default_timezone_set('Europe/Berlin'); ?>
+ <div class="wpsg_bewertung_comment_date">
+
+ <?php echo '<div>'.date_i18n('d.F Y', strtotime($com['comment_date'])); ?>
+ <?php /* echo strftime('%d.%B %Y', strtotime($oWP_Comment->comment_date)); */ ?>
+
+ </div>
+
+ <div class="wpsg_bewertung_comment_text">
+
+ <?php echo '</div><br />'; ?>
+ <?php echo __($com['comment_content'], 'sto'); ?>
+ <?php echo '<br />'; ?>
+
+ </div>
+ </div>
+ <div class="wpsg_comment_form col-sm-1">
+ <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Bewertung löschen', 'wpsg'); ?>" onclick="return wpsg_removeRating(<?php echo $com['comment_ID']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
+
+ </div>
+
+ </div>
+
+ <?php } ?>
+
+ </div>
+ </div>
+
+ <?php } else { ?>
+ <?php echo __('Keine Bewertungen vorhanden'); ?>
+ <?php } ?>
+ </div>
+ </div>
+
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+/**
+ * Wird aufgerufen wenn eine Bewertung gelöscht werden soll
+ */
+function wpsg_removeRating(c_id)
+{
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bewertung löschen möchten?', 'wpsg'); ?>')) return false;
+
+ //jQuery('#wpsg_be_rating').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+ jQuery('#wpsg_rating_'+c_id).html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&cmd=ratingDel&noheader=1&c_id=' + c_id,
+ success: function(data) {
+ //jQuery('#wpsg_be_rating').replaceWith(data);
+ jQuery('#wpsg_rating_'+c_id).hide();
+ }
+ } );
+
+ return false;
+}
+/* ]]> */</script>
|
