Subversion Repositories wpShopGermany4

Rev

Rev 6152 | Rev 6383 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Kundenübersichtsseite im Backend
5
	 */
6
 
7
?>
5750 daniel 8
<div class="wpsg_customer" id="wpsg-bs">
1924 daniel 9
 
5750 daniel 10
    <nav class="navbar navbar-default">
1924 daniel 11
 
5552 thomas 12
		<div class="container-fluid">
13
			<div class="navbar-header">
5750 daniel 14
				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
5552 thomas 15
			</div>
5750 daniel 16
			<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
17
				<ul class="nav navbar-nav">
6133 thomas 18
					<li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo wpsg_translate(__("Kundenverwaltung (#1# Kunden)", "wpsg"), $this->view['countAll']); ?></a></li>
6366 hartmut 19
					<li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter <?php echo ((wpsg_isTrue($this->view['hasFilter']))?'activexxxx':''); ?>" id="wpsg-customer-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
5750 daniel 20
                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
21
				</ul>
22
				<ul class="nav navbar-nav navbar-right">
23
                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=import&noheader=1"><span class="glyphicon glyphicon-import"></span><?php echo __("Import", "wpsg"); ?></a></li>
6081 hartmut 24
					<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
5750 daniel 25
					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export", "wpsg"); ?></a></li>
5552 thomas 26
					<?php } ?>
27
				</ul>
28
			</div>
29
		</div>
5750 daniel 30
 
6366 hartmut 31
        <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo ((wpsg_isTrue($this->view['hasFilter']))?'none':'none'); ?>;">
5750 daniel 32
            <div class="row">
5552 thomas 33
				<div class="col-lg-4">
34
					<form method="post" id="filter_form">
5750 daniel 35
 
5751 daniel 36
						<input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
5750 daniel 37
 
5751 daniel 38
                        <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
39
						<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
5750 daniel 40
 
5751 daniel 41
						<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
5750 daniel 42
 
6366 hartmut 43
						<?php echo wpsg_drawForm_SubmitButton(__('Kunden suchen')); ?><br />
5750 daniel 44
 
5552 thomas 45
					</form>
46
				</div>
47
			</div>
5750 daniel 48
        </div>
49
 
50
    </nav>
51
 
52
    <?php if ($this->view['pages'] > 1) { ?>
53
        <nav class="pagination_wrap">
54
            <ul class="pagination">
55
                <?php if ($this->view['arFilter']['page'] > 1) { ?>
56
                    <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
57
                <?php } ?>
58
                <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
59
                    <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
60
                <?php } ?>
61
                <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
62
                    <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('Nächste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
63
                <?php } ?>
64
            </ul>
65
        </nav>
66
	<?php } ?>
67
 
68
	<div class="wpsg_clear"></div>
69
 
1067 daniel 70
	<?php echo $this->writeBackendMessage(); ?>
71
 
5750 daniel 72
	<div class="content">
73
 
74
        <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
75
 
76
            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
77
                <thead>
78
                    <tr>
79
                        <th class="manage-column column-title wpsg_pic_col"></th>
5751 daniel 80
                        <th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
5750 daniel 81
                        <th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
82
                        <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
83
                    </tr>
84
                </thead>
85
                <tbody>
86
                    <?php foreach ($this->view['arData'] as $c) { ?>
87
                    <tr>
88
                        <td class="wpsg_pic_col">
89
 
5751 daniel 90
                            <img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
91
 
5750 daniel 92
                        </td>
93
                        <td class="col_name column-title">
5751 daniel 94
                            <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
5750 daniel 95
                            <?php if (strlen($c->getEMail()) > 0) { ?>
96
                                <a href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail();  ?></a>
97
                            <?php } ?>
98
                            <div class="row-actions">
5752 daniel 99
                                <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
5750 daniel 100
                                |
101
                                <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie den Kunden löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=del&edit_id=<?php echo $c->id; ?>&noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
102
                                |
5934 hartmut 103
                                <span class="order"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $c->id; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a></span>
5750 daniel 104
                            </div>
105
                        </td>
106
                        <td class="col_adress">
107
                            <?php echo ((strlen($c->getCompany()) > 0)?$c->getCompany().'<br />':''); ?>
108
                            <?php echo $c->getStreet(); ?><br />
109
                            <?php echo trim($c->getZip().' '.$c->getCity()); ?>
110
                            <?php /*echo $c->plz.' '.$c->ort.' '.$c->land_kuerzel; */?><br />
111
                        </td>
112
                        <td class="col_status">
113
                            <?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $c->getOrderCount()); ?><br />
114
                            <?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($c->getOrderAmount(), $this->get_option('wpsg_currency'))); ?>
115
                            <?php if ($c->getOrderCount() > 0) { ?>
116
                            <br />
117
                            <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter[k_id]=<?php echo $c->id; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a>
118
                            <?php } ?>
119
                        </td>
120
                    </tr>
121
                    <?php } ?>
122
                </tbody>
123
            </table>
124
 
125
            <?php if ($this->view['pages'] > 1) { ?>
126
                <nav class="pagination_wrap pagination_wrap_bottom">
127
                    <ul class="pagination">
128
                        <?php if ($this->view['arFilter']['page'] > 1) { ?>
129
                            <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
130
                        <?php } ?>
131
                        <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
132
                            <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
133
                        <?php } ?>
134
                        <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
135
                            <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('Nächste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
136
                        <?php } ?>
137
                    </ul>
138
                </nav>
139
            <?php } ?>
140
 
141
        <?php } else { ?>
5753 daniel 142
 
143
            <?php echo wpsg_drawForm_AdminboxStart(); ?>
144
    		<?php echo __('Keine Kunden in der Datenbank.', 'wpsg'); ?>
145
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
146
 
5750 daniel 147
        <?php } ?>
148
 
149
    </div>
150
 
151
</div>
5751 daniel 152
 
5750 daniel 153
<script type="text/javascript">/* <![CDATA[ */
154
 
5751 daniel 155
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
156
    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
5750 daniel 157
    <?php } ?>
158
 
159
	function goPage(page)
160
	{
161
 
6152 thomas 162
		//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
5750 daniel 163
 
164
		jQuery('#wpsg_seite').val(page);
165
		jQuery('#filter_form').submit();
166
 
167
		return false;
168
 
169
	} // function goPage(page)
170
 
171
/* ]]> */</script>