Improved service display

This commit is contained in:
Deon George
2011-07-14 19:09:03 +10:00
parent 46c3b9a075
commit 27cdab1fe4
37 changed files with 1319 additions and 1042 deletions

View File

@@ -0,0 +1,36 @@
<!-- @todo NEEDS TO BE TRANSLATED -->
<table width="100%">
<tr>
<td class="head">Plugin Details</td>
</tr>
<tr>
<td style="width: 50%; vertical-align: top;">
<table>
<tr>
<td style="width: 40%;">Service Number</td>
<td style="width: 60%;" class="data"><?php echo Form::input('plugin[service_number]',$so->service_number); ?></td>
</tr>
<tr>
<td>Service Address</td>
<td class="data"><?php echo Form::input('plugin[service_address]',$so->service_address); ?></td>
</tr>
<tr>
<td>Service Connect Date</td>
<td class="data"><?php echo Form::input('plugin[service_connect_date]',$so->service_connect_date); ?></td>
</tr>
<tr>
<td>Service Username</td>
<td class="data"><?php echo Form::input('plugin[service_username]',$so->service_username); ?></td>
</tr>
<tr>
<td>Service Password</td>
<td class="data"><?php echo Form::input('plugin[service_password]',$so->service_password); ?></td>
</tr>
<tr>
<td>Service IP Address</td>
<td class="data"><?php echo Form::input('plugin[ipaddress]',$so->ipaddress); ?></td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -0,0 +1,62 @@
<!-- @todo NEEDS TO BE TRANSLATED -->
<?php echo Form::open(); ?>
<table width="100%">
<tr>
<td style="width: 50%; vertical-align: top;">
<table>
<tr>
<td style="width: 40%;">Service Active</td>
<td style="width: 60%;" class="data"><?php echo StaticList_YesNo::form('active',$so->active); ?></td>
</tr>
<tr>
<td>Queue</td>
<td class="data"><?php echo $so->display('queue'); ?></td>
</tr>
<tr>
<td>Billing Period</td>
<td class="data"><?php echo StaticList_RecurSchedule::form('recure_schedule',$so->product,$so->recur_schedule);?></td>
</tr>
<tr>
<td>Date Last Invoice</td>
<td class="data"><?php echo $so->display('date_last_invoice'); ?></td>
</tr>
<tr>
<td>Date Next Invoice</td>
<td class="data"><?php echo $so->display('date_next_invoice'); ?></td>
</tr>
<tr>
<td>Taxable</td>
<td class="data"><?php echo StaticList_YesNo::form('taxable',$so->taxable); ?></td>
</tr>
<tr>
<td>Type</td>
<td class="data"><?php echo StaticList_RecurType::display($so->recur_type); ?></td>
</tr>
<tr>
<td>Recur on Weekday</td>
<td class="data"><?php echo Form::input('recur_weekday',$so->recur_weekday,array('size'=>4)); ?></td>
</tr>
<tr>
<td>User Can Change Schedule</td>
<td class="data"><?php echo StaticList_YesNo::form('recur_schedule_change',$so->recur_schedule_change); ?></td>
</tr>
<tr>
<td>User Can Cancel</td>
<td class="data"><?php echo StaticList_YesNo::form('recur_cancel',$so->recur_cancel); ?></td>
</tr>
<tr>
<td>User Can Modify</td>
<td class="data"><?php echo StaticList_YesNo::form('recur_modify',$so->recur_modify); ?></td>
</tr>
<tr>
<td>Suspend Billing</td>
<td class="data"><?php echo StaticList_YesNo::form('suspend_billing',$so->suspend_billing); ?></td>
</tr>
</table>
<?php if ($plugin_form) { echo '<br/>'.$plugin_form; } ?>
<!-- END Service Information -->
</td>
</tr>
</table>
<?php echo Form::submit('submit',_('Update')); ?>
<?php echo Form::close(); ?>

View File

@@ -0,0 +1,72 @@
<!-- //@todo To translate -->
<table class="box-full">
<tr>
<td class="head" colspan="2">Service Details</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td style="width: 50%">
<table>
<tr>
<td style="width: 40%;">Service Number</td>
<td style="width: 60%;" class="data"><?php echo $so->display('service_number'); ?></td>
</tr>
<tr>
<td>Service Address</td>
<td class="data"><?php echo $so->display('service_address'); ?></td>
</tr>
<tr>
<td>Contract Term</td>
<td class="data"><?php echo $so->display('contract_term'); ?></td>
</tr>
<tr>
<td>Connect Date</td>
<td class="data"><?php echo $so->display('service_connect_date'); ?></td>
</tr>
<tr>
<td>Contract End Date</td>
<td class="data"><?php echo $so->contract_date_end(); ?></td>
</tr>
<tr>
<td>Service Username</td>
<td class="data"><?php echo $so->display('service_username'); ?></td>
</tr>
<tr>
<td>Service Password</td>
<td class="data"><?php echo $so->display('service_password'); ?></td>
</tr>
<tr>
<td>Service IP</td>
<td class="data"><?php echo $so->ipaddress(); ?></td>
</tr>
</table>
</td>
<td style="width: 50%; vertical-align: top;">
<table width="100%">
<tr>
<td style="width: 40%;">Traffic Used This Month</td>
<td style="width: 60%;" class="data"><?php echo $so->traffic_month(null); ?></td>
</tr>
<tr>
<td style="width: 40%;">Traffic Used Last Month</td>
<td style="width: 60%;" class="data"><?php echo $so->traffic_lastmonth(); ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>View Daily Traffic for Month</td>
<td><?php echo Form::open(); echo Form::select('month',array_merge(array(''),$so->get_traffic_months()),(isset($_POST['month']) ? $_POST['month'] : '')); echo Form::submit('submit',_('Show')); echo Form::close(); ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><?php echo $so->graph_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?><td>
</tr>
</table>

View File

@@ -3,37 +3,62 @@
<tr>
<td>
<!-- Service Information -->
<table>
<table class="box-full">
<tr>
<td>Service Name</td>
<td class="head"><?php echo $service->product->product_translate->find()->name; ?></td>
</tr>
<tr>
<td>Service Active</td>
<td class="head"><?php echo $service->display('active'); ?></td>
<td style="width: 40%;">Service Active</td>
<td style="width: 60%;" class="data"><?php echo $so->display('active'); ?></td>
</tr>
<tr>
<td>Billing Period</td>
<td class="head"><?php echo $service->display('recur_schedule');?></td>
<td class="data"><?php echo $so->display('recur_schedule');?></td>
</tr>
<tr>
<td>Cost</td>
<td class="head"><?php echo $service->display('price'); ?></td>
<td class="data"><?php echo $so->display('price'); ?></td>
</tr>
<tr>
<td>Date Next Invoice</td>
<td class="head"><?php echo Config::date($service->date_next_invoice); ?></td>
<td class="data"><?php echo $so->display('date_next_invoice'); ?></td>
</tr>
<tr>
<td>Current Invoices Due</td>
<td class="head"><?php echo Currency::display($service->account->invoices_due_total()); ?></td>
<td class="data"><?php echo Currency::display($so->account->invoices_due_total()); ?></td>
</tr>
</table>
<!-- END Service Information -->
</td>
<td style="vertical-align: top;">
<!-- Product Info -->
<?php echo $product_info; ?>
<!-- Product Summary Info -->
<?php echo $so->product_feature_summary(); ?>
<!-- END Product Summary Info -->
</td>
</tr>
</table>
<?php echo $product_detail; ?>
<br/>
<?php echo $so->service_view(); ?>
<br/>
<table class="box-left" width="50%">
<tr>
<td class="head" colspan="2">Invoices for this service</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2">Number</td>
<td>Invoice Date</td>
<td>Due Date</td>
<td>Total</td>
<td>Balance</td>
</tr>
<?php $i=0; foreach ($so->invoice->distinct('id')->order_by('id DESC')->find_all() as $io) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="icon" width="20px"><?php echo HTML::anchor('/user/invoice/download/'.$io->id,HTML::image('media/img/gnome-pdf.png',array('alt'=>_('Download'),'width'=>20))); ?></td>
<td class="data"><?php echo HTML::anchor('/user/invoice/view/'.$io->id,$io->id()); ?></td>
<td class="data"><?php echo $io->display('date_orig'); ?></td>
<td class="data"><?php echo $io->display('due_date'); ?></td>
<td class="data"><?php echo $io->total(TRUE); ?></td>
<td class="data"><?php echo $io->due(TRUE); ?></td>
</tr>
<?php } ?>
</table>

View File

@@ -1,32 +0,0 @@
<!-- @todo NEEDS TO BE TRANSLATED -->
<table>
<tr>
<td>View Daily Traffic for Month</td>
<td><?echo Form::open(); echo Form::select('month',$service->service_adsl->get_traffic_months(),(isset($_POST['month']) ? $_POST['month'] : '')); echo Form::submit('submit',_('Show')); echo Form::close(); ?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td style="vertical-align: top" rowspan="2"><?php echo $graph; ?></td>
<td style="vertical-align: top" width="30%">
<table class="box-left">
<tr>
<td>ADSL Service</td>
<td class="head"><?php echo $service->service_adsl->service_number; ?></td>
</tr>
<tr>
<td>Contract Term</td>
<td class="head"><?php echo $service->service_adsl->contract_term; ?></td>
</tr>
<tr>
<td>Contract End</td>
<td class="head"><?php echo $service->service_adsl->contract_date_end(); ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><?php echo $graph_data; ?></td>
</tr>
</table>