Subversion Repositories wpShopGermany4

Rev

Rev 6152 | Rev 7549 | 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>
48
 
49
    <?php if ($this->view['pages'] > 1) { ?>
50
        <nav class="pagination_wrap">
51
            <ul class="pagination">
52
                <?php if ($this->view['arFilter']['page'] > 1) { ?>
53
                    <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>
54
                <?php } ?>
55
                <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
56
                    <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
57
                <?php } ?>
58
                <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
59
                    <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>
60
                <?php } ?>
61
            </ul>
62
        </nav>
63
	<?php } ?>
64
 
65
    <div class="wpsg_clear"></div>
66
 
67
	<div class="content">
68
 
69
        <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
70
 
71
            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
72
                <thead>
73
                    <tr>
74
                        <th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
75
                        <th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
76
                        <th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
77
                    </tr>
78
                </thead>
79
                <tbody>
80
                    <?php foreach ($this->view['arData'] as $pg) { ?>
81
                    <tr>
82
                        <td class="col_name">
83
                            <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>
84
					        <div class="row-actions">
85
                                <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>
86
                                |
87
                                <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 echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=del&noheader=1&edit_id=<?php echo $pg->id; ?>"><?php echo __("Löschen", "wpsg"); ?></a>
88
                                <?php if ($pg->countProducts() > 0) { ?>
89
                                |
90
                                <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>
91
                                <?php } ?>
92
                            </div>
93
                        </td>
94
                        <td class="col_template">
95
                            <?php echo (($pg->template_file == "0")?'Individuelle Produkttemplates':$pg->template_file); ?>
96
                        </td>
97
                        <td class="col_products">
98
                            <?php echo $pg->countProducts(); ?>
99
                        </td>
100
                    </tr>
101
                    <?php } ?>
102
                </tbody>
103
            </table>
104
 
105
            <?php if ($this->view['pages'] > 1) { ?>
106
                <nav class="pagination_wrap pagination_wrap_bottom">
107
                    <ul class="pagination">
108
                        <?php if ($this->view['arFilter']['page'] > 1) { ?>
109
                            <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>
110
                        <?php } ?>
111
                        <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
112
                            <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
113
                        <?php } ?>
114
                        <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
115
                            <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>
116
                        <?php } ?>
117
                    </ul>
118
                </nav>
119
            <?php } ?>
120
 
121
        <?php } else { ?>
122
 
123
            <?php echo wpsg_drawForm_AdminboxStart(); ?>
124
    		<?php echo __('Keine Produktgruppen in der Datenbank.', 'wpsg'); ?>
125
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
126
 
127
        <?php } ?>
128
 
129
</div>
130
 
131
<script type="text/javascript">/* <![CDATA[ */
132
 
133
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
134
    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
135
    <?php } ?>
136
 
137
	function goPage(page)
138
	{
139
 
6152 thomas 140
		//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
6134 daniel 141
 
142
		jQuery('#wpsg_seite').val(page);
143
		jQuery('#filter_form').submit();
144
 
145
		return false;
146
 
147
	} // function goPage(page)
148
 
149
/* ]]> */</script>