Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
6134 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Produktgruppenübersicht
5
	 */
6
 
7
?>
8
 
9
<div class="wpsg_productgroups" 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>
16
			</div>
17
			<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
18
				<ul class="nav navbar-nav">
6135 thomas 19
					<li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo wpsg_translate(__("Produktgruppenverwaltung (#1# Produktgruppen)", "wpsg"), $this->view['countAll']); ?></a></li>
6134 daniel 20
                    <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter" id="wpsg-customer-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
7561 daniel 21
                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php
22
 
23
						echo wpsg_admin_url('Productgroups', '', ['wpsg_mod_action' => 'add']);
24
 
25
					?>"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
6134 daniel 26
				</ul>
27
				<ul class="nav navbar-nav navbar-right">
28
				</ul>
29
			</div>
30
		</div>
31
 
32
        <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'); ?>;">
33
            <div class="row">
34
                <div class="col-lg-4">
35
                    <form method="post" id="filter_form">
36
 
7561 daniel 37
						<?php echo wp_nonce_field('wpsg-mod-productgroups-search'); ?>
38
 
6134 daniel 39
                        <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
40
 
41
                        <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
42
                        <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
43
 
44
                        <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
45
 
46
                        <?php echo wpsg_drawForm_SubmitButton(__('Produktgruppen suchen')); ?><br />
47
 
48
                    </form>
49
                </div>
50
            </div>
51
        </div>
52
 
53
    </nav>
7549 daniel 54
 
55
	<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
56
	<div class="wpsg_clear"></div>
57
 
6134 daniel 58
    <?php if ($this->view['pages'] > 1) { ?>
59
        <nav class="pagination_wrap">
60
            <ul class="pagination">
61
                <?php if ($this->view['arFilter']['page'] > 1) { ?>
62
                    <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>
63
                <?php } ?>
64
                <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
65
                    <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
66
                <?php } ?>
67
                <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
68
                    <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>
69
                <?php } ?>
70
            </ul>
71
        </nav>
72
	<?php } ?>
73
 
74
    <div class="wpsg_clear"></div>
75
 
76
	<div class="content">
77
 
78
        <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
79
 
80
            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
81
                <thead>
82
                    <tr>
83
                        <th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
84
                        <th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
85
                        <th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
86
                    </tr>
87
                </thead>
88
                <tbody>
89
                    <?php foreach ($this->view['arData'] as $pg) { ?>
90
                    <tr>
91
                        <td class="col_name">
92
                            <strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $pg->id; ?>" class="row-title"><?php echo $pg->name; ?></a></strong>
93
					        <div class="row-actions">
7561 daniel 94
                                <span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
95
 
96
									echo wpsg_admin_url('Productgroups', '', ['wpsg_mod_action' => 'edit', 'edit_id' => $pg->id]);
97
 
98
								?>"><?php echo __("Bearbeiten", "wpsg"); ?></a>
6134 daniel 99
                                |
7549 daniel 100
                                <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sich sicher?", "wpsg"); ?>')) return false;" title="<?php echo __("Diese Produktgruppe löschen", "wpsg"); ?>" href="<?php
101
 
7561 daniel 102
									echo wpsg_admin_url('Productgroups', '', ['wpsg_mod_action' => 'del', 'edit_id' => $pg->id], ['noheader' => '1']);
7549 daniel 103
 
104
								?>"><?php echo __("Löschen", "wpsg"); ?></a>
6134 daniel 105
                                <?php if ($pg->countProducts() > 0) { ?>
106
                                |
107
                                <span class="edit"><a title="<?php echo __("Zur Produktliste", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&search[pgruppe]=<?php echo $pg->id; ?>"><?php echo __("Zur Produktliste", "wpsg"); ?></a>
108
                                <?php } ?>
109
                            </div>
110
                        </td>
111
                        <td class="col_template">
112
                            <?php echo (($pg->template_file == "0")?'Individuelle Produkttemplates':$pg->template_file); ?>
113
                        </td>
114
                        <td class="col_products">
115
                            <?php echo $pg->countProducts(); ?>
116
                        </td>
117
                    </tr>
118
                    <?php } ?>
119
                </tbody>
120
            </table>
121
 
122
            <?php if ($this->view['pages'] > 1) { ?>
123
                <nav class="pagination_wrap pagination_wrap_bottom">
124
                    <ul class="pagination">
125
                        <?php if ($this->view['arFilter']['page'] > 1) { ?>
126
                            <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>
127
                        <?php } ?>
128
                        <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
129
                            <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
130
                        <?php } ?>
131
                        <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
132
                            <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>
133
                        <?php } ?>
134
                    </ul>
135
                </nav>
136
            <?php } ?>
137
 
138
        <?php } else { ?>
139
 
140
            <?php echo wpsg_drawForm_AdminboxStart(); ?>
141
    		<?php echo __('Keine Produktgruppen in der Datenbank.', 'wpsg'); ?>
142
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
143
 
144
        <?php } ?>
145
 
146
</div>
147
 
148
<script type="text/javascript">/* <![CDATA[ */
149
 
150
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
151
    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
152
    <?php } ?>
153
 
154
	function goPage(page)
155
	{
156
 
6152 thomas 157
		//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
6134 daniel 158
 
159
		jQuery('#wpsg_seite').val(page);
8040 karl 160
		jQuery('#filter_form').trigger('submit');
6134 daniel 161
 
162
		return false;
163
 
164
	} // function goPage(page)
165
 
166
/* ]]> */</script>