本文整理汇总了PHP中UI::button方法的典型用法代码示例。如果您正苦于以下问题:PHP UI::button方法的具体用法?PHP UI::button怎么用?PHP UI::button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI::button方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: invoiceShow
function invoiceShow($d, $o = array())
{
$r = getRenderer();
if ($d->invoice->getData('type') == 'dated') {
$invoice_date = $d->invoice->getEndDate();
} else {
$invoice_date = $d->invoice->getDate();
}
$invoice_period = $d->invoice->getStartDate() . " through " . $d->invoice->getEndDate();
$banner = array('Invoice Date' => $invoice_date, 'Invoice Number' => "#" . $d->invoice->getData('id'));
$client = $d->company->getDisplayName();
$billing_contact_emails = $d->company->getBillingEmailAddress();
$additional_recipients = $d->invoice->getAdditionalRecipients();
$send_button = UI::button(array('controller' => 'Invoice', 'action' => 'email', 'id' => $d->invoice->getData('id')));
if ($d->invoice->getData('type') == 'dated') {
$items = array('Items for Period' => $invoice_period, 'Previous Balance' => "\$ " . number_format($d->invoice->getPreviousBalance(), 2), 'New Payments in Period' => "\$ " . number_format($d->invoice->getNewPaymentsTotal(), 2), 'New Charges in Period' => "\$ " . number_format($d->invoice->getNewCosts(), 2), 'Total Due' => "\$ " . number_format($d->invoice->getAmountDue(), 2), 'Net 30 Terms' => ' ');
} else {
$items = array('Total Due' => "\$ " . number_format($d->invoice->getAmountDue(), 2), 'Net 30 Terms' => ' ');
}
$summary = '
<div id="banner">' . $r->view('basicList', $banner) . '</div>
<h2 id="invoice-client">' . $client . '</h2>
<div id="billing-contact">Billing Contact Email: ' . $billing_contact_emails . $additional_recipients . '<br>
</div>
<div id="billing-send-invoice">' . $send_button . '</div>
<div id="invoice-summary">';
if ($d->invoice->getData('details')) {
$summary .= '<div id="details"><strong>Details</strong>: ' . nl2br($d->invoice->getData('details')) . '</div>';
}
$summary .= $r->view('basicList', $items) . '
</div>';
$history = $r->view('companyLineItems', array('company' => $d->company, 'months' => Util::month_range($d->invoice->getStartDate(), $d->invoice->getEndDate())));
return array('template' => 'invoice', 'title' => 'Show Invoice', 'body' => $summary, 'history' => $history);
}
示例2: hourTable
function hourTable($hours, $o = array())
{
$r = getRenderer();
$table['headers'] = array('Date', 'Client', 'Description', 'Staff', 'Hours', 'Billable', 'Type', 'Edit', 'Delete');
$table['rows'] = array();
$total_hours = 0;
$billable_hours = 0;
$hours_to_skip = array();
foreach ($hours as $h) {
if (!empty($hours_to_skip[$h->id])) {
continue;
}
$total_hours += $h->getHours();
$billable_hours += $h->getBillableHours();
if ($h->is_project_hour()) {
$description = UI::link(array('controller' => 'Hour', 'action' => 'show', 'id' => $h->id, 'text' => $h->getName()));
$edit_button = UI::button(array('controller' => 'Hour', 'action' => 'show', 'id' => $h->id));
} else {
$description = UI::link(array('controller' => 'SupportHour', 'action' => 'show', 'id' => $h->id, 'text' => $h->getName()));
$edit_button = UI::button(array('controller' => 'SupportHour', 'action' => 'show', 'id' => $h->id));
}
$company_link = UI::link(array('text' => $h->getCompanyName(), 'controller' => 'Company', 'action' => 'show', 'id' => $h->getCompany()->id));
$name = $h->getStaffName();
if ($h->getPairName()) {
$name . ' and ' . $h->getPairName();
}
$logged = $h->getHours();
$billable = $h->getBillableHours();
$type = $h->getType();
if ($h->is_pair()) {
$name = $h->getPairName();
$logged = $logged * 2;
$billable = $billable * 2;
$hours_to_skip[$h->get('pair_hour_id')] = true;
}
$table['rows'][] = array($h->getData('date'), $company_link, $description, $name, $logged, $billable, $type, $edit_button, UI::button(array('controller' => 'Hour', 'action' => 'destroy', 'id' => $h->id)));
}
$o['title'] = 'Hours';
$o['id'] = 'hour-table';
$o['pager'] = true;
$hours_table = $r->view('basicTable', $table, $o);
$totals = '
<div class="bs-docs-example" id="Hours">
<div class="hours-month">
Total Project Hours: <span class="unbillable">' . $total_hours . '</span>
</div>
<div class="hours-week">
Billable Project Hours: <span class="billable">' . $billable_hours . '</span>
</div>
<div class="clear-both"></div></div>
';
return $totals . $hours_table;
}
示例3: staffTable
function staffTable($staffers, $o = array())
{
$r = getRenderer();
$staff_table = array('current' => array('headers' => array('Name', 'Team', 'Email', 'Edit'), 'rows' => array()), 'former' => array('headers' => array('Name', 'Team', 'Email', 'Edit'), 'rows' => array()));
foreach ($staffers as $s) {
$rows_var = 'current';
if ($s->getData('active') == 0) {
$rows_var = 'former';
}
$staff_table[$rows_var]['rows'][] = array($r->link('Staff', array('action' => 'show', 'id' => $s->id), $s->getName()), $s->getData('team'), '<a href="mailto:' . $s->getData('email') . '">' . $s->getData('email') . '</a>', UI::button(array('controller' => 'Staff', 'action' => 'edit', 'id' => $s->getData('id'))));
}
$html = $r->view('basicTable', $staff_table['current'], array('title' => 'Staff', 'pager' => true), $o);
$html .= $r->view('basicTable', $staff_table['former'], array('title' => 'Former Staff', 'pager' => true), $o);
return $html;
}
示例4: paymentTable
function paymentTable($payments, $o = array())
{
$r = getRenderer();
$table = array();
$table['headers'] = array('Date', 'Invoice ID', 'Client', 'Amount', 'Type', 'Edit', 'Delete');
$table['rows'] = array();
$total_payments = 0;
$r = getRenderer();
foreach ($payments as $p) {
$total_payments += $p->getAmount();
$table['rows'][] = array(UI::link(array('controller' => 'Payment', 'action' => 'show', 'id' => $p->id, 'text' => $p->getData('date'))), UI::link(array('text' => $p->getInvoiceId(), 'controller' => 'Invoice', 'action' => 'show', 'id' => $p->getInvoiceId())), UI::link(array('controller' => 'Company', 'action' => 'show', 'id' => $p->getCompany()->id, 'text' => $p->getCompanyName())), '$ ' . number_format($p->getAmount(), 2), $p->getType(), $p->getPurpose(), UI::button(array('controller' => 'Payment', 'action' => 'show', 'id' => $p->id)), UI::button(array('controller' => 'Payment', 'action' => 'destroy', 'id' => $p->id)));
}
$payment_table = $r->view('basicTable', $table, array_merge(array('title' => 'Payments', 'pager' => true), $o));
$total_payments = $r->view('basicMessage', 'Total payments: $ ' . number_format($total_payments, 2));
return '<div id="payments-table">' . $total_payments . $payment_table . '</div>';
}
示例5: chargeTable
function chargeTable($charges, $o = array())
{
$r = getRenderer();
$table = array();
$table['headers'] = array('Date', 'Name', 'Type', 'Company', 'Amount', 'Edit', 'Delete');
$table['rows'] = array();
$total_charges = 0;
foreach ($charges as $m) {
$total_charges += $m->getData('amount');
$company = $m->getCompany();
$edit_button = UI::button(array('controller' => 'Charge', 'action' => 'edit', 'id' => $m->id));
$delete_button = UI::button(array('controller' => 'Charge', 'action' => 'destroy', 'id' => $m->id));
$table['rows'][] = array($m->get('date'), $m->getName(), $m->getType(), $r->link('Company', array('action' => 'show', 'id' => $company->id), $company->getName()), '$ ' . number_format($m->get('amount'), 2), $edit_button, $delete_button);
}
$charges_table = $r->view('basicTable', $table, array_merge(array('title' => 'Charges', 'id' => 'charges-table', 'pager' => true), $o));
$total = $r->view('basicMessage', 'Total charges: $ ' . number_format($total_charges, 2));
return $total . $charges_table;
}
示例6: contactTable
/**
contactTable
View that displays a list of all Contacts
$get options array:
-<b>contact_id</b> id of the contact that we want to see details for
@return html
@package controller
*/
function contactTable($contacts, $o = array())
{
if (!$contacts) {
return '';
}
$r = getRenderer();
$table = array();
$table['headers'] = array('Name', 'Client', 'Email', 'Type', 'Edit', 'Delete');
$table['rows'] = array();
foreach ($contacts as $contact) {
$company = $contact->getCompany();
$edit_button = UI::button(array('controller' => 'Contact', 'action' => 'show', 'id' => $contact->id));
$delete_button = UI::button(array('controller' => 'Contact', 'action' => 'destroy', 'id' => $contact->id));
$table['rows'][] = array($r->link('Contact', array('action' => 'show', 'id' => $contact->id), $contact->getName()), $r->link('Company', array('action' => 'show', 'id' => $company->id), $company->getName()), '<a href="' . $contact->getData('email') . '"/>' . $contact->getData('email') . '</a>', $contact->getContactType(), $edit_button, $delete_button);
}
$html = $r->view('basicTable', $table, array('title' => 'Contacts', 'pager' => true));
return $html;
}
示例7: noteTable
/**
noteTable
View that displays a list of all Notes
@return html
@package controller
*/
function noteTable($notes, $o = array())
{
if (!$notes) {
return '';
}
$r = getRenderer();
$table = array();
$table['headers'] = array('Date', 'Name', 'Details', 'Company', 'Staff', 'Edit', 'Delete');
$table['rows'] = array();
foreach ($notes as $note) {
$company = $note->getCompany();
$edit_button = UI::button(array('controller' => 'Note', 'action' => 'show', 'id' => $note->id));
$delete_button = UI::button(array('controller' => 'Note', 'action' => 'destroy', 'id' => $note->id));
$table['rows'][] = array($note->getData('date'), $r->link('Note', array('action' => 'show', 'id' => $note->id), $note->getName()), $r->link('Note', array('action' => 'show', 'id' => $note->id), $note->getDescription()), $r->link('Company', array('action' => 'show', 'id' => $company->id), $company->getName()), $note->getStaff()->getName(), $edit_button, $delete_button);
}
$html = $r->view('basicTable', $table, array('title' => 'Notes <a class="btn ui-state-default ui-corner-all"><span class="ui-icon ui-icon-triangle-1-s"></span></a>', 'id' => 'note-table', 'pager' => true));
return $html;
}
示例8: invoiceTable
function invoiceTable($invoices, $o = array())
{
$r = getRenderer();
// CREATE SEARCH FORM
$search_form = '';
$table = array();
$table['headers'] = array('ID', 'Add', 'Client', 'Start Date', 'End Date', 'Batch', 'Send', 'Sent Date', 'Amount', 'Status', 'Edit', 'Delete');
$table['rows'] = array();
$total_invoices = 0;
foreach ($invoices as $i) {
$total_invoices += $i->getAmountDue();
$url = $i->getData('url');
$c = $i->getCompany();
if ($batch = $i->getBatch()) {
$batch_link = $r->link('InvoiceBatch', array('action' => 'show', 'id' => $batch->id), $batch->getName());
} else {
$batch_link = '';
}
if ($i->getData('type') == 'dated') {
$invoice_date = $i->getData('start_date');
} else {
$invoice_date = $i->getData('date');
}
if ($batch = $i->getStatus()) {
$status = $i->getStatus();
} else {
$status = $i->getData('payment_status');
}
$edit_button = UI::button(array('controller' => 'Invoice', 'action' => 'edit', 'id' => $i->id));
$delete_button = UI::button(array('controller' => 'Invoice', 'action' => 'destroy', 'id' => $i->id));
$email_button = UI::button(array('controller' => 'Invoice', 'action' => 'email', 'id' => $i->id));
$table['rows'][] = array($i->id, "<input class=\"check-row\" type=\"checkbox\" id=\"row-" . $i->id . "\" name=\"table-rows[" . $i->id . "]\" value=\"" . $i->id . "\">", $r->link('Invoice', array('action' => 'show', 'id' => $i->id), $c->getName()), $r->link('Invoice', array('action' => 'show', 'id' => $i->id), $invoice_date), $i->getData('end_date'), $batch_link, $email_button, "<a href='{$url}' target='_blank'>" . $i->getData('sent_date') . "</a>", "<span>\$</span>" . $i->getAmountDue(), $status, $edit_button, $delete_button);
}
$total_invoices = $r->view('basicMessage', '<br>Total Invoices: $ ' . number_format($total_invoices, 2));
$bulk_email_btn = '<input type="submit" value="Send Bulk Email" class="btn" style="display:inline; margin-left: 10px;" /> ';
$select_all_box = '<input class="check-all" name="check-all" type="checkbox"/> Select All ' . $bulk_email_btn . '<br />';
$table = $r->view('basicTable', $table, array('title' => 'Invoices', 'search' => $select_all_box . $search_form, 'pager' => true));
$form = new Form(array('controller' => 'Invoice', 'action' => 'batch_email', 'disable_submit_btn' => true));
$form->content = $table;
return $total_invoices . $form->html;
}
示例9:
<td>
<?php
echo $data_array[$sno][2] . " " . $data_array[$sno][3] . " " . $data_array[$sno][4] . " (" . $data_array[$sno][1] . " )";
?>
</td>
<td>
<?php
echo $data_array[$sno][5];
?>
</td>
<td>
<center>
<?php
$ui->button()->icon($ui->icon("plus"))->value('ADD')->id('submit' . $sno)->uiType('primary')->name('submit_track')->show();
?>
</center>
</td>
</tr>
<?php
$sno++;
}
$table->close();
}
$box->close();
$innercol2->close();
$column2->close();
$outer_row->close();
示例10: foreach
<td rowspan=2 style="vertical-align:middle" ><b>Edit/Delete</b></td>
</tr>
<tr align="center">
<td style="vertical-align:middle" ><b>From</b></td>
<td style="vertical-align:middle" ><b>To</b></td>
</tr></thead><tbody>';
$i = 1;
foreach ($details as $row) {
echo '<tr name=row[] align="center">
<td>' . $i . '</td>
<td>' . date('d M Y', strtotime($row->from)) . '</td>
<td>' . date('d M Y', strtotime($row->to)) . '</td>
<td>' . $row->res_addr . '</td>
<td>' . ucwords($row->dist_hq_name) . '</td>
<td>';
$ui->button()->flat()->id('edit' . $i)->name("edit[]")->uiType("primary")->value("Edit")->icon($ui->icon("pencil"))->extras('onClick="onclick_edit(' . $i . ')"')->show();
$ui->button()->flat()->id('delete5' . $i)->name("delete5[]")->uiType("danger")->value("Delete")->icon($ui->icon("trash-o"))->extras('onClick="onclick_delete(' . $i . ');"')->show();
echo '</td></tr>';
$i++;
}
echo '</tbody>';
$table->close();
} else {
$ui->callout()->title('Empty')->desc('No Stay Details Found.')->uiType('danger')->show();
}
$box->close();
if (count($pending_emp_last5yrstay_details)) {
$box = $ui->box()->id('original_details')->title('Last 5 Year Stay Details')->uiType('success')->open();
if (count($emp_last5yrstay_details)) {
$table = $ui->table()->id('tbl')->responsive()->bordered()->striped()->open();
echo '<thead><tr align="center">
示例11: ucwords
echo ucwords($user_other_details->hobbies);
$col2->close();
$col3 = $ui->col()->width(3)->open();
echo "<label>Favourite Pass Time</label>";
$col3->close();
$col4 = $ui->col()->width(3)->open();
echo ucwords($user_other_details->fav_past_time);
$col4->close();
$stuRowHobbies->close();
$stuRowExtraActivity = $ui->row()->open();
$col1 = $ui->col()->width(3)->open();
echo "<label>Extra-Curricular Activities</label>";
$col1->close();
$col2 = $ui->col()->width(3)->open();
echo ucwords($stu_other_details->extra_curricular_activity);
$col2->close();
$col3 = $ui->col()->width(3)->open();
echo "<label>Any Other Relevant Information</label>";
$col3->close();
$col4 = $ui->col()->width(3)->open();
echo ucwords($stu_other_details->other_relevant_info);
$col4->close();
$stuRowExtraActivity->close();
$boxotherdetail->close();
echo '<center>';
$ui->button()->uiType('primary')->id('print_btn')->value('PRINT')->show();
echo '</center>';
} else {
echo '<center><h2>Student Basic Details</h2>';
$this->notification->drawNotification("Not Found", "Your details have not been updated. Please check after some time.", "error");
}
示例12: array
<div class="actions col-xs-1 text-right">
<div class="btn-group">
<?php
if (Acl::check('page.add')) {
?>
<?php
echo UI::button(NULL, array('href' => Route::get('backend')->uri(array('controller' => 'page', 'action' => 'add', 'id' => $child->id)), 'icon' => UI::icon('plus'), 'class' => 'btn-default btn-xs'));
?>
<?php
}
?>
<?php
if (Acl::check('page.delete')) {
?>
<?php
echo UI::button(NULL, array('href' => Route::get('backend')->uri(array('controller' => 'page', 'action' => 'delete', 'id' => $child->id)), 'icon' => UI::icon('times fa-inverse'), 'class' => 'btn-xs btn-confirm btn-danger'));
?>
<?php
}
?>
</div>
</div>
<div class="clearfix"></div>
</div>
<?php
if ($child->is_expanded) {
echo $child->children_rows;
}
?>
示例13: myFunction2
<td><?php
echo $row->total_current_fy;
?>
</td>
</tr>
<?php
$i++;
}
$table->close();
$E_box->close();
$form = $ui->form()->action('consultant/consultant_disbursement_sheet/disbursement_cancel/' . $disbursement->sr_no)->open();
?>
<center>
<?php
$ui->button()->value('Cancel')->uiType('danger')->submit()->name('mysubmit')->show();
?>
</center><?php
$form->close();
$box->close();
$column2->close();
$column3 = $ui->col()->width(1)->open();
$column3->close();
$inputRow1->close();
?>
<script>
function myFunction2(sr_no,auth_id) {
$.ajax({
url : site_url("consultant/consultant_ajax/view_modal/" + sr_no+ "/" +auth_id),
success : function(result){
示例14:
<?php
}
$table->close();
$col1->close();
$row1->close();
/****************************************************************/
$E_box->close();
$t5->close();
$tabBox1->close();
$tabRow1->close();
$row11 = $ui->row()->open();
$col1 = $ui->col()->width(6)->open();
?>
<center>
<?php
$ui->button()->value('Re Apply')->uiType('primary')->submit()->name('mysubmit')->show();
?>
</center>
<?php
$form->close();
$col1->close();
$col2 = $ui->col()->width(6)->open();
$form1 = $ui->form()->action('consultant/consultant_disbursement_sheet/disbursement_cancel/' . $sr_no)->open();
?>
<center>
<?php
$ui->button()->value('Cancel')->uiType('danger')->submit()->name('mysubmit')->show();
?>
</center><?php
$form1->close();
$col2->close();
示例15: date
echo ' (' . date('d M Y g:i a', strtotime($action_recent->timestamp) + 19800) . ') </span>';
$col1->close();
$innerrow1 = $ui->col()->noPrint()->width(6)->open();
$button_msg = '';
if ($auth_id == 'hod') {
$button_msg = 'Forward to PCE';
} else {
if ($auth_id == 'pce') {
$button_msg = 'Forward to Director';
}
}
$col1 = $ui->col()->width(12)->open();
?>
<br/><center>
<?php
$ui->button()->icon($ui->icon('check'))->name('action_taken')->id('action_taken')->value('Approve')->uiType('success')->show();
?>
</center>
<center>
<?php
$ui->button()->icon($ui->icon('check'))->name('action_taken')->id('action_taken6')->value($button_msg)->uiType('success')->show();
?>
</center><br/><?php
$col1->close();
$col1 = $ui->col()->id('approve_col')->width(12)->open();
?>
<center>
<?php
$ui->textarea()->label('Remark')->id('remark_text1')->name('remark_text1')->placeholder('Not more than 200 character')->value('')->show();
$ui->button()->icon($ui->icon('check'))->type('submit')->name('action_taken')->id('action_taken3')->value('Are You Sure To Approve')->uiType('success')->show();
?>