PluginProbe
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce / 1.2.6
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce v1.2.6
1.17.9 1.17.8 1.17.7 1.17.6 1.17.5 1.17.4 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.3.0 1.3.1 1.3.11 1.3.12 1.3.13 1.3.14 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 143 releases
erp / includes / admin / views / module.php

module.php in ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce 1.2.6, at includes/admin/views/module.php

88 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 $tab = isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ? $_GET['tab'] : false;
4 $modules = wperp()->modules->get_query_modules( $tab );
5 $all_active_modules = wperp()->modules->get_active_modules();
6 $count_all = count( wperp()->modules->get_modules() );
7 $count_active = count( $all_active_modules );
8 $count_inactive = count( wperp()->modules->get_inactive_modules() );
9
10 $all_url = admin_url( 'admin.php/?page=erp-modules' );
11 $active_url = admin_url( 'admin.php/?page=erp-modules&tab=active' );
12 $inactive_url = admin_url( 'admin.php/?page=erp-modules&tab=inactive' );
13
14 $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : ''
15 ?>
16 <div class="wrap erp-settings">
17 <h2><?php _e( 'Modules', 'erp' ); ?></h2>
18 <ul class="erp-subsubsub">
19 <li><a class="erp-nav-tab<?php echo $current_tab == '' ? ' erp-nav-tab-active' : ''; ?>" href="<?php echo $all_url; ?>"><?php printf( __( 'All (%s) |', 'erp' ), $count_all ); ?></a></li>
20 <li><a class="erp-nav-tab<?php echo $current_tab == 'active' ? ' erp-nav-tab-active' : ''; ?>" href="<?php echo $active_url; ?>"><?php printf( __( 'Active (%s) |', 'erp' ), $count_active ); ?></a></li>
21 <li><a class="erp-nav-tab<?php echo $current_tab == 'inactive' ? ' erp-nav-tab-active' : ''; ?>" href="<?php echo $inactive_url; ?>"><?php printf( __( 'Inactive (%s)', 'erp' ), $count_inactive ); ?></a></li>
22 </ul>
23
24
25 <form method="post">
26 <table class="widefat fixed plugins" cellspacing="0">
27 <thead>
28 <tr>
29 <td scope="col" id="cb" class="manage-column column-cb check-column">&nbsp;</td>
30 <th scope="col" id="name" class="manage-column column-name" style="width: 190px;"><?php _e( 'Title', 'erp' ); ?></th>
31 <th scope="col" id="description" class="manage-column column-description"><?php _e( 'Description', 'erp' ); ?></th>
32 </tr>
33 </thead>
34
35 <tfoot>
36 <tr>
37 <td scope="col" class="manage-column column-cb check-column">&nbsp;</td>
38 <th scope="col" class="manage-column column-name" style="width: 190px;"><?php _e( 'Title', 'erp' ); ?></th>
39 <th scope="col" class="manage-column column-description"><?php _e( 'Description', 'erp' ); ?></th>
40 </tr>
41 </tfoot>
42
43 <tbody id="the-list">
44
45 <?php
46
47 foreach ( $modules as $slug => $module ) {
48 $checked = array_key_exists( $slug, $all_active_modules ) ? $slug : '';
49 ?>
50 <tr class="active">
51 <th scope="row">
52 <input type="checkbox" name="modules[]" id="erp_module_<?php echo $slug; ?>" value="<?php echo $slug; ?>" <?php checked( $slug, $checked ); ?>>
53 </th>
54 <td class="plugin-title" style="width: 190px;">
55 <label for="erp_module_<?php echo $slug; ?>">
56 <strong><?php echo isset( $module['title'] ) ? $module['title'] : ''; ?></strong>
57 </label>
58 </td>
59 <td class="column-description desc">
60 <div class="plugin-description">
61 <p><?php echo isset( $module['description'] ) ? $module['description'] : ''; ?></p>
62 </div>
63 </td>
64 </tr>
65 <?php
66 }
67
68 if ( ! $modules ) {
69 ?>
70 <tr class="active">
71 <td colspan="3" class="column-description desc">
72 <?php _e( 'No modules found!', 'erp' ); ?>
73 </td>
74 </tr>
75 <?php
76 }
77 ?>
78
79 </tbody>
80 </table>
81 <p class="submit clear">
82 <?php wp_nonce_field( 'erp_nonce', 'erp_settings' ); ?>
83 <input class="button-primary" type="submit" name="erp_module_status" value="Save Settings">
84 </p>
85 </form>
86
87 </div>
88