Version 0.9 - minor appearence fixes

This commit is contained in:
Rene V. Vergara A. 2022-12-30 20:42:49 -05:00
parent 8634eea191
commit eedf7dcd81
2 changed files with 29 additions and 45 deletions

View file

@ -1,18 +1,13 @@
<?php <?php
/** /**
* Creates the submenu page for the plugin. * ZGo Payment Gateway for WooCommerce Plugin
*
* This class creates the statistics page for the plugin.
* *
* Provides the functionality necessary for rendering the page corresponding
* to the submenu with which this page is associated.
**/ **/
class Submenu_Page { class Submenu_Page {
/**
* This function renders the contents of the page associated with the Submenu
* that invokes the render method. In the context of this plugin, this is the
* Submenu class.
**/
public $_limit; public $_limit;
public $_offset; public $_offset;
public $_npages; public $_npages;
@ -25,6 +20,7 @@ class Submenu_Page {
global $wpdb; global $wpdb;
$this->_path = $path; $this->_path = $path;
$this->_nrows = $this->getPmtsCount(); $this->_nrows = $this->getPmtsCount();
// //
// Create zgo_pmtlst if does not exist // Create zgo_pmtlst if does not exist
@ -40,9 +36,9 @@ class Submenu_Page {
$wpdb->query($sql); $wpdb->query($sql);
if ( ! $this->pmtLstRdy() ) { if ( ! $this->pmtLstRdy() ) {
// //
// Calculate first time pagination paramters // Calculate first time pagination paramters
// //
$this->_limit = 10; $this->_limit = 10;
$this->_page = 1; $this->_page = 1;
$this->_offset = 0; $this->_offset = 0;
@ -593,7 +589,7 @@ class Submenu_Page {
$result = $wpdb->get_row($sql,OBJECT); $result = $wpdb->get_row($sql,OBJECT);
if ( $result ) { if ( $result ) {
if ($result->gTotalPmts > 0) { if ($result->gTotalPmts > 0) {
?> ?>
<div style="padding-right: 20px; <div style="padding-right: 20px;
font-family: 'Noto Sans'; font-family: 'Noto Sans';
font-size: 15px; font-size: 15px;
@ -602,21 +598,21 @@ class Submenu_Page {
color: navy;"> color: navy;">
Global Totals Global Totals
</div> </div>
<table width="100%" <table width="100%"
style="padding-right: 20px;"> style="padding-right: 20px;">
<tr> <tr>
<td width="10%"></td> <td width="10%"></td>
<td width="80%"> <td width="80%">
<table width="100%" > <table width="100%" >
<tr style="font-family: Noto Sans; <tr style="font-family: Noto Sans;
font-weight: 600; font-weight: 600;
font-size: 15px; font-size: 15px;
margin: auto; margin: auto;
text-align: center; text-align: center;
vertical-align: center; vertical-align: center;
height: 20px; height: 20px;
background-color: #ff5722; background-color: #ff5722;
color: white;"> color: white !important;">
<td width="12%">Payments:</td> <td width="12%">Payments:</td>
<td width="23%"><?php echo $result->gTotalPmts ?></td> <td width="23%"><?php echo $result->gTotalPmts ?></td>
<td width="12%">Total Amount:</td> <td width="12%">Total Amount:</td>
@ -625,10 +621,11 @@ class Submenu_Page {
<td width="23%"><?php echo number_format($result->gTotalZec,8) ?></td> <td width="23%"><?php echo number_format($result->gTotalZec,8) ?></td>
</tr> </tr>
</table> </table>
<td width="10%"></td> </td>
<td width="10%"></td>
</tr> </tr>
</table> </table>
<?php <?php
} }
} }
} }

View file

@ -1,35 +1,22 @@
<?php <?php
/** /**
* Creates the submenu item for the plugin. * ZGo Payment Gateway for WooCommerce Plugin
*
* This class creates the main statistics page for the plugin.
* *
* Registers a new menu item under 'Admin' group and uses the dependency passed into
* the constructor in order to display the page corresponding to this menu item.
**/ **/
class Submenu { class Submenu {
/**
* A reference the class responsible for rendering the submenu page.
**/
private $submenu_page; private $submenu_page;
/**
* Initializes all of the partial classes.
**/
public function __construct( $submenu_page ) { public function __construct( $submenu_page ) {
$this->submenu_page = $submenu_page; $this->submenu_page = $submenu_page;
} }
/**
* Adds a submenu for this plugin to the 'Tools' menu.
**/
public function init() { public function init() {
add_action( 'admin_menu', array( $this, 'add_options_page' ) ); add_action( 'admin_menu', array( $this, 'add_options_page' ) );
} }
/**
* Creates the submenu item and calls on the Submenu Page object to render
* the actual contents of the page.
**/
public function add_options_page() { public function add_options_page() {
add_management_page( add_management_page(