Subversion Repositories wpShopGermany4

Rev

Rev 7533 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3656 daniel 1
<?php
2
 
3
	/**
3999 thomas 4
	 * Template für die Kundengruppenübersicht im Backend
3656 daniel 5
	 */
6
 
7
?>
8
 
5751 daniel 9
<div class="wpsg_customergroup" id="wpsg-bs">
10
 
11
    <nav class="navbar navbar-default">
12
 
13
		<div class="container-fluid">
14
			<div class="navbar-header">
15
				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
3656 daniel 16
			</div>
5751 daniel 17
			<div class="collapse navbar-collapse" id="bs-customergroup-navbar-collapse-1">
18
				<ul class="nav navbar-nav">
6133 thomas 19
					<li role="presentation" class="wpsg-customergroup-tab-a active"><a href="#" onclick="return false;"><?php echo wpsg_translate(__("Kundengruppenverwaltung (#1# Kundengruppen)", "wpsg"), $this->view['countAll']); ?></a></li>
5751 daniel 20
                    <li role="presentation" class="wpsg-customergroup-tab-a wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>" id="wpsg-customergroup-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
21
					<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-Customergroup&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
22
				</ul>
23
				<ul class="nav navbar-nav navbar-right">
24
 
25
				</ul>
26
			</div>
3656 daniel 27
		</div>
5751 daniel 28
 
29
        <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
30
            <div class="row">
31
				<div class="col-lg-4">
32
					<form method="post" id="filter_form">
33
 
34
                        <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
35
 
36
                        <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
37
                        <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
38
 
39
                        <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
40
 
41
                        <?php echo wpsg_drawForm_SubmitButton(__('Kundengruppen suchen')); ?><br />
42
 
3656 daniel 43
					</form>
5751 daniel 44
				</div>
3656 daniel 45
			</div>
5751 daniel 46
        </div>
3656 daniel 47
 
5751 daniel 48
    </nav>
49
 
7533 daniel 50
	<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
51
 
6009 hartmut 52
    <?php if ($this->view['pages'] > $this->get_option('wpsg_mod_kundenverwaltung_group_perpage')) { ?>
5751 daniel 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
 
70
	<div class="content">
71
 
72
        <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
73
 
74
            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
75
                <thead>
76
                    <tr>
77
                        <th class="wpsg_order manage-column col-name" data-order="name"><?php echo __('Name', 'wpsg'); ?></th>
78
                        <th class="wpsg_order col-price" data-order="customercount"><?php echo __("Preisanzeige", 'wpsg'); ?></th>
79
                        <th class="wpsg_order col_customer" data-order="calculation"><?php echo __("Kunden", 'wpsg'); ?></th>
80
                    </tr>
81
                </thead>
82
                <tbody>
83
                    <?php foreach ($this->view['arData'] as $oCustomerGroup) { ?>
84
                    <tr>
85
                        <td class="col-name">
86
                            <?php echo wpsg_hspc($oCustomerGroup->name); ?>
87
                            <div class="row-actions">
88
                                <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=edit&edit_id=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
89
                                |
90
                                <span class="edit"><a title="<?php echo __("Kunden dieser Kundengruppe anzeigen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&customergroup=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Kunden anzeigen", "wpsg"); ?></a></span>
91
                                |
92
                                <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diese Kundengruppe 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-Customergroup&action=del&edit_id=<?php echo $oCustomerGroup->id; ?>&noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
93
                            </div>
94
                        </td>
95
                        <td class="col-price">
96
                            <?php if ($oCustomerGroup->calculation == WPSG_BRUTTO) { ?>
97
                            <?php echo __('Brutto Preise', 'wpsg'); ?>
98
                            <?php } else if ($oCustomerGroup->calculation == WPSG_NETTO) { ?>
99
                            <?php echo __('Netto Preise', 'wpsg'); ?>
100
                            <?php } else { ?>
101
                            <?php echo __('Standard', 'wpsg'); ?>
102
                            <?php } ?>
103
                        </td>
104
                        <td class="col-customer">
105
                            <?php echo wpsg_hspc($oCustomerGroup->customercount); ?>
106
                        </td>
107
                    </tr>
108
                    <?php } ?>
109
                </tbody>
110
            </table>
111
 
6009 hartmut 112
            <?php if ($this->view['pages'] > $this->get_option('wpsg_mod_kundenverwaltung_group_perpage')) { ?>
5751 daniel 113
                <nav class="pagination_wrap pagination_wrap_bottom">
114
                    <ul class="pagination">
115
                        <?php if ($this->view['arFilter']['page'] > 1) { ?>
116
                            <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>
117
                        <?php } ?>
118
                        <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
119
                            <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
120
                        <?php } ?>
121
                        <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
122
                            <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>
123
                        <?php } ?>
124
                    </ul>
125
                </nav>
126
            <?php } ?>
127
 
128
        <?php } else { ?>
5753 daniel 129
 
130
            <?php echo wpsg_drawForm_AdminboxStart(); ?>
131
    		<?php echo __('Keine Kundengruppen in der Datenbank.', 'wpsg'); ?>
132
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
133
 
5751 daniel 134
        <?php } ?>
135
 
136
    </div>
137
 
138
</div>
139
 
140
<script type="text/javascript">/* <![CDATA[ */
141
 
142
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
143
    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
144
    <?php } ?>
145
 
146
	function goPage(page)
147
	{
148
 
6152 thomas 149
		//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
5751 daniel 150
 
151
		jQuery('#wpsg_seite').val(page);
8040 karl 152
		jQuery('#filter_form').trigger('submit');
5751 daniel 153
 
154
		return false;
155
 
156
	} // function goPage(page)
157
 
158
/* ]]> */</script>