Subversion Repositories wpShopGermany4

Rev

Rev 6503 | Rev 7561 | Go to most recent revision | 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>
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-Productgroups&wpsg_mod_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
				</ul>
25
			</div>
26
		</div>
27
 
28
        <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'); ?>;">
29
            <div class="row">
30
                <div class="col-lg-4">
31
                    <form method="post" id="filter_form">
32
 
33
                        <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
34
 
35
                        <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
36
                        <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
37
 
38
                        <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
39
 
40
                        <?php echo wpsg_drawForm_SubmitButton(__('Produktgruppen suchen')); ?><br />
41
 
42
                    </form>
43
                </div>
44
            </div>
45
        </div>
46
 
47
    </nav>
7549 daniel 48
 
49
	<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
50
	<div class="wpsg_clear"></div>
51
 
6134 daniel 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
 
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 col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
78
                        <th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
79
                        <th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
80
                    </tr>
81
                </thead>
82
                <tbody>
83
                    <?php foreach ($this->view['arData'] as $pg) { ?>
84
                    <tr>
85
                        <td class="col_name">
86
                            <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>
87
					        <div class="row-actions">
88
                                <span class="edit"><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; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a>
89
                                |
7549 daniel 90
                                <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
91
 
92
										echo \wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=del&noheader=1&edit_id='.$pg->id, 'wpsg-productgroup-del-'.$pg->id);
93
 
94
								?>"><?php echo __("Löschen", "wpsg"); ?></a>
6134 daniel 95
                                <?php if ($pg->countProducts() > 0) { ?>
96
                                |
97
                                <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>
98
                                <?php } ?>
99
                            </div>
100
                        </td>
101
                        <td class="col_template">
102
                            <?php echo (($pg->template_file == "0")?'Individuelle Produkttemplates':$pg->template_file); ?>
103
                        </td>
104
                        <td class="col_products">
105
                            <?php echo $pg->countProducts(); ?>
106
                        </td>
107
                    </tr>
108
                    <?php } ?>
109
                </tbody>
110
            </table>
111
 
112
            <?php if ($this->view['pages'] > 1) { ?>
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 { ?>
129
 
130
            <?php echo wpsg_drawForm_AdminboxStart(); ?>
131
    		<?php echo __('Keine Produktgruppen in der Datenbank.', 'wpsg'); ?>
132
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
133
 
134
        <?php } ?>
135
 
136
</div>
137
 
138
<script type="text/javascript">/* <![CDATA[ */
139
 
140
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
141
    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
142
    <?php } ?>
143
 
144
	function goPage(page)
145
	{
146
 
6152 thomas 147
		//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
6134 daniel 148
 
149
		jQuery('#wpsg_seite').val(page);
150
		jQuery('#filter_form').submit();
151
 
152
		return false;
153
 
154
	} // function goPage(page)
155
 
156
/* ]]> */</script>