本文整理汇总了PHP中getRenderer函数的典型用法代码示例。如果您正苦于以下问题:PHP getRenderer函数的具体用法?PHP getRenderer怎么用?PHP getRenderer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getRenderer函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: hourIndex
function hourIndex($d)
{
$r =& getRenderer();
$new_hour_forms = $r->view('jsHideable', array('Log Project Hour' => $r->view('projectHourLoggerForm', $d->new_hour), 'Log Support Hour' => $r->view('supporthourNewForm', $d->new_support_hour)));
$hour_table_html = $r->view('hourSearch', $d->hours, array('ajax_target_id' => 'hour-search-1'));
return array('title' => 'Listing All Hours', 'controls' => '', 'body' => $new_hour_forms . $hour_table_html);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:hour_index.php
示例2: chargeSearch
function chargeSearch($charges, $o)
{
$r = getRenderer();
$type = isset($o['type']) ? $o['type'] : '';
$company_id = isset($o['company_id']) ? $o['company_id'] : '';
$start_date = isset($o['date_range']['start_date']) ? $o['date_range']['start_date'] : '';
$end_date = isset($o['date_range']['end_date']) ? $o['date_range']['end_date'] : '';
$form = new Form(array('controller' => 'Charge', 'action' => 'search', 'method' => 'get', 'auto_submit' => array('company_id', 'type', 'start_date', 'end_date'), 'ajax_target_id' => 'charges-table'));
$charge = new Charge();
$charge->set(array('type' => $type));
$fs = $form->getFieldSetFor($charge);
$form->content .= $fs->field('type', array('title' => 'Type', 'name' => 'type'));
$form->content .= $r->classSelect('Company', array('title' => 'Client', 'name' => 'company_id', 'id' => 'company_id', 'selected_value' => $company_id));
$form->content .= '<div class="search-input">
<label for="charge_search_start">Start Date</label>
' . $r->input('date', array('name' => 'date_range[start_date]', 'value' => $start_date, 'id' => 'charge_search_start')) . '
</div>
<div class="search-input">
<label for="charge_search_end">End Date</label>
' . $r->input('date', array('name' => 'date_range[end_date]', 'value' => $end_date, 'id' => 'charge_search_end')) . '
</div>
';
$o['search'] = $form->html;
return $r->view('chargeTable', $charges, $o);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:25,代码来源:charge_search.php
示例3: invoiceBatchIndex
function invoiceBatchIndex($d, $o = array())
{
$r = getRenderer();
$hidden_forms = $r->view('jsMultipleButtons', array('Create Single Invoice' => $r->view('invoiceNewForm', $d->new_invoice), 'Create Quarterly Invoices' => $r->view('invoicebatchNewForm', $d->new_batch), 'Create Stand-Alone Invoice' => $r->view('invoiceStandNewForm', $d->new_stand_invoice)));
$invoice_table = $r->view('invoiceTable', $d->invoices, array('search_invoice' => $d->search_invoice));
return array('title' => 'Show Invoices', 'body' => $hidden_forms . $invoice_table);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:invoicebatch_index.php
示例4: clientuserIndex
function clientuserIndex($d)
{
$r = getRenderer();
$clientuser_new = $r->view('jsHideable', array('Create New Client User' => $r->view('clientuserNewForm', $d->new_clientuser)));
$clientuser_table = $r->view('clientuserTable', $d->clientusers);
return array('title' => 'Client Users', 'body' => $clientuser_new . $clientuser_table);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:clientuser_index.php
示例5: projectIndex
function projectIndex($d)
{
$r = getRenderer();
$new_project_form = $r->view('jsHideable', array('Create New Project' => $r->view('projectNewForm', $d->new_project)));
$project_table = $r->view('projectTable', $d->projects, array('id' => 'project', 'search_project' => $d->search_project));
return array('title' => 'All Projects', 'controls' => '', 'body' => $new_project_form . $project_table);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:project_index.php
示例6: hourListItem
/**
hour list item
renders list display for a singe Hour objects
*/
function hourListItem($hour, $o)
{
$r = getRenderer();
$data = array('Hours' => $hour->getHours(), 'Discount' => $hour->getDiscount(), 'Name' => $hour->getName(), 'Staff' => $hour->getStaffName());
$options = array('class' => 'hour-list-item');
return $r->view('basicListItem', $data, $options);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:11,代码来源:hour_list_item.php
示例7: 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);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:34,代码来源:invoice_show.php
示例8: hourSearch
function hourSearch($hours, $o = array())
{
$r = getRenderer();
$start_date = isset($o['hour_search']['start_date']) ? $o['hour_search']['start_date'] : '';
$end_date = isset($o['hour_search']['end_date']) ? $o['hour_search']['end_date'] : '';
$company_id = isset($o['company']) ? $o['company'] : '';
$staff_name = isset($o['staff']) ? $o['staff'] : '';
unset($o['hour_search']);
$search_form = new Form(array_merge(array('method' => 'get', 'controller' => 'Hour', 'action' => 'search', 'ajax_target_id' => 'hour_table', 'auto_submit' => array('company', 'staff')), $o));
$search_form->content = '
<div class="search-input">
' . $r->classSelect('Company', array('name' => 'company', 'id' => 'hour_search_company_id', 'title' => 'Client', 'selected_value' => $company_id)) . '
</div>
<div class="search-input">
<label for="hour_search_start">Start Date</label>
' . $r->input('date', array('name' => 'hour_search[start_date]', 'value' => $start_date, 'id' => 'hour_search_start')) . '
</div>
<div class="search-input">
<label for="hour_search_end">End Date</label>
' . $r->input('date', array('name' => 'hour_search[end_date]', 'value' => $end_date, 'id' => 'hour_search_end')) . '
</div>
' . $r->classSelect('Staff', array('name' => 'staff_id', 'id' => 'hour_search_staff_id', 'title' => 'Staff', 'selected_value' => $staff_name));
$hours_table = $r->view('hourTable', $hours, array('search' => $search_form->html));
return '<div id="' . $o['ajax_target_id'] . '" class="hour-search clear-left">
' . $hours_table . '
</div>';
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:28,代码来源:hour_search.php
示例9: jumpSelect
function jumpSelect($sample_object, $criteria = array())
{
$r = getRenderer();
$form = new Form(array('method' => 'get', 'action' => 'show', 'controller' => get_class($sample_object)));
$form->content = $r->objectSelect($sample_object, array('name' => 'id'), $criteria);
return $form->html;
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:jump_select.php
示例10: companyTable
function companyTable($companies, $o = array())
{
$r = getRenderer();
$search_form = '';
if (!empty($o['search_company']) && is_a($o['search_company'], 'Company')) {
$form = new Form(array('controller' => 'Company', 'action' => 'index', 'method' => 'get', 'auto_submit' => array('org_type', 'country', 'status')));
$f = $form->getFieldSetFor($o['search_company']);
$form_content = $f->field('org_type', array('title' => 'Organization Type'));
$form_content .= $f->field('country', array('title' => 'Country'));
$form_content .= $f->field('status', array('title' => 'Status'));
$form->content = $form_content;
$search_form = $form->html;
}
$table = array();
$table['headers'] = array('Client', 'Primary Contact', 'Status', 'Last Payment', 'Billing Status', 'Balance');
$table['rows'] = array();
foreach ($companies as $c) {
$link = $r->link('Company', array('action' => 'show', 'id' => $c->id), $c->getName());
if ($c->getPrimaryContact()) {
$contact_link = $r->link('Contact', array('action' => 'show', 'id' => $c->getPrimaryContact()->id), $c->getPrimaryContactName());
} else {
$contact_link = '';
}
$table['rows'][] = array($link, $contact_link, $c->get('status'), $c->getLastPaymentDate(), $c->get('billing_status'), $c->calculateBalance(array('end_date' => Util::date_format_from_time())));
}
return $r->view('basicTable', $table, array('title' => 'Search Clients', 'search' => $search_form, 'pager' => true));
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:27,代码来源:company_table.php
示例11: supportcontractIndex
function supportcontractIndex($d)
{
$r = getRenderer();
$hidden_forms = $r->view('jsHideable', array('Create New Support Contract' => $r->view('supportcontractNewForm', $d->new_contract), 'Log Support Hour' => $r->view('supporthourNewForm', $d->new_hour)));
$contract_table = $r->view('supportcontractTable', $d->contracts);
return array('title' => 'Support Contracts', 'body' => $hidden_forms . $contract_table);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:supportcontract_index.php
示例12: chargeIndex
function chargeIndex($d)
{
$r = getRenderer();
$hidden_forms = $r->view('jsHideable', array('Create New Charge' => $r->view('chargeNewForm', $d->new_charge)), array('open_by_default' => array('Create New Charge')));
$charge_table = $r->view('chargeSearch', $d->charges);
return array('title' => 'Charge', 'body' => $hidden_forms . $charge_table);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:charge_index.php
示例13: invoiceEmailPlain
function invoiceEmailPlain($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();
$client = $d->company->getName();
$summary = "\n\nRadical Designs Invoice\n Invoice Date " . $invoice_date . "\n Invoice Number #" . $d->invoice->getData("id") . "\n Your New Radical Designs Invoice: " . $client . "\n\n ";
if ($d->invoice->getData('type') == 'dated') {
$summary .= "Invoice for Period " . $invoice_period . "\n\n Starting Balance on " . $d->invoice->getStartDate() . ":\n \$ " . number_format($d->invoice->getPreviousBalance(), 2) . " New Charges in Period:\n \$ " . number_format($d->invoice->getNewCosts(), 2) . "\n\n Less Payments in Period:\n \$ " . number_format($d->invoice->getNewPaymentsTotal(), 2) . "\n";
}
if ($d->invoice->getData('details')) {
$summary .= "Details: " . $d->invoice->getData("details") . "\n";
}
$summary .= " Current Total Due: \$ " . number_format($d->invoice->getAmountDue(), 2) . "\n\nNet 30 Terms\n\nPayment Information:\n\n";
if ($d->invoice->getAmountDue() < 1000) {
$summary .= "Radical Designs accepts online payments at https://payments.rdsecure.org/payments for amounts less than \$1000.\n\n";
}
$summary .= "Send checks to:\n Radical Designs\n 1201 Martin Luther King Jr. Way, Suite 200 \n Oakland, CA\n 94612\n \n Make your check payable to Radical Designs. \n For questions about your contract or bill please email [email protected]\n For questions about support please email [email protected]\n Or you can call us at 415-738-0456";
$summary .= $r->view('companyLineItemsPlain', array('company' => $d->company, 'months' => Util::month_range($d->invoice->getStartDate(), $d->invoice->getEndDate())));
return array('template' => 'invoice', 'title' => 'Show Invoice', 'body' => $summary);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:25,代码来源:invoice_email_plain.php
示例14: companyIndex
function companyIndex($d)
{
$r = getRenderer();
$company_new_html = $r->view('jsHideable', array('Create New Client' => $r->view('companyNewForm', $d->new_company)));
$company_table_html = $r->view('companyTable', $d->companies, array('id' => 'company', 'search_company' => $d->search_company));
return array('title' => 'Listing All Clients', 'controls' => '', 'body' => $company_new_html . $company_table_html);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:company_index.php
示例15: estimateInfo
function estimateInfo($estimate, $o = array())
{
$r = getRenderer();
$project = new Project($estimate->get('project_id'));
$project_link = $r->link('Project', array('action' => 'show', 'id' => $project->id), $project->get('name'));
$list_items = array('Estimate' => $estimate->getName(), 'Project' => $project_link, 'Due Date' => $estimate->getData('due_date'), 'High Estimate' => $estimate->getHighEstimate(), 'Low Estimate' => $estimate->getLowEstimate(), 'Total Hours' => $estimate->getTotalHours(), 'Billable Hours' => $estimate->getBillableHours(), 'Completed' => $estimate->getData('completed') ? 'yes' : 'no', 'Notes' => $estimate->getData('notes'), 'Category' => $estimate->get('category'));
return $r->view('basicList', $list_items);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:8,代码来源:estimate_info.php
示例16: supportcontractCancel
function supportcontractCancel($d)
{
$r = getRenderer();
$contract_cancel_instructions = '<p>This form cancels this support contract. Do this if the client is <b>permanently</b> terminating this contract, and we are no longer going to host or support them. Be sure to set the correct end date for this contract.</p>';
$d->set_end_date_to_todays_date ? $end_date_message = '<p>This contract had no specified end date, so the end date has been set to today\'s date. Please make sure this is correct by editing the form below.</p>' : ($end_date_message = '<p>This contract had a pre-set end date of ' . $d->contract->get('end_date') . '. Please make sure this is correct by editing the form below.</p>');
$contract_cancel_form = $r->view('supportcontractCancelForm', $d->contract);
return array('title' => 'Cancel Contract: ' . $d->contract->getName(), 'body' => $contract_cancel_instructions . $end_date_message . $contract_cancel_form);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:8,代码来源:supportcontract_cancel.php
示例17: _getSchema
private static function _getSchema($class = '')
{
if (!isset($class::$schema)) {
$r =& getRenderer();
$class::$schema = $r->jsonDecode($class::$schema_json);
}
return $class::$schema;
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:8,代码来源:ActiveRecord.php
示例18: projectInfo
function projectInfo($p, $o = array())
{
$r = getRenderer();
$p->get('launch_date') ? $launch_date = date('m/d/Y', strtotime($p->get('launch_date'))) : ($launch_date = 'NOT SET');
if ($launch_date == '11/30/-0001') {
$launch_date = 'N/A';
}
$html = '
<div>
Project: ' . $r->link('Project', array('action' => 'show', 'id' => $p->id), $p->get('name')) . '
</div>
<div>
Company: ' . $r->link('Company', array('action' => 'show', 'id' => $p->get('company_id')), $p->getCompanyName()) . '
</div>
<div>
<span class="launch-date">Launch Date: ' . $launch_date . '</span>
</div>
<div>
<span class="status-label">
Status:
</span>
<span class="status">' . $p->get('status') . '</span>
</div>
<div>
<span class="project-manager-label">Project Manager: </span>
<span class="project-manager">' . $r->link('Staff', array('action' => 'show', 'id' => $p->get('staff_id')), $p->getStaffName()) . '</span>
</div>';
if ($p->get('designer')) {
$html .= '
<div>
Designer: ' . $p->get('designer') . '
</div>';
}
$percent = intval($p->getBillableHours() / $p->getHighEstimate() * 100);
$pclass = $percent > 80 ? 'overbudget' : '';
$html .= '
<div class="detail-project-hours">
<span class="float-left">Low Estimate: ' . $p->getLowEstimate() . '</span>
<span class="float-left">Hour Cap: ' . $p->get('hour_cap') . '</span>
<span class="float-left">High Estimate: ' . $p->getHighEstimate() . '</span>
<span class="float-left">Hourly Rate: ' . $p->get('hourly_rate') . '</span>
<span class="float-left">Total Hours Worked: ' . $p->getTotalHours() . '</span>
<span class="float-left">Total Billable Hours : ' . $p->getBillableHours() . '</span>
<span class="float-left">Server: ' . $p->get('server') . '</span>
<div class="clear-left"></div>
<div class="bar">
<div class="filling ' . $pclass . '" style="width:5%">
' . $percent . '%
</div>
</div>
<script type="text/javascript">
$(function() {
$(".filling").animate({"width":"' . $percent . '%"}, 1000);
});
</script>
</div>';
return $html;
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:58,代码来源:project_info.php
示例19: staffEditForm
function staffEditForm($user)
{
$r = getRenderer();
$form = new Form(array('controller' => 'Staff', 'action' => 'update'));
$fs = $form->getFieldSetFor($user);
$fields = array('Username' => $fs->username, 'First Name' => $fs->first_name, 'Last Name' => $fs->last_name, 'Email' => $fs->email, 'Team' => $fs->team, 'New Password' => '<input type="password" name="new_password"/>', 'Repeat Password' => '<input type="password" name="new_password_repeat"/>', 'Avatar' => $fs->avatar, 'Active' => $fs->active);
$form->content = $r->view('basicFormContents', $fields, array('title' => 'Edit Staff'));
return $form->html;
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:9,代码来源:staff_edit_form.php
示例20: companyEditForm
function companyEditForm($c, $o = array())
{
$r = getRenderer();
$form = new Form(array('controller' => 'Company', 'action' => 'update'));
$fs = $form->getFieldSetFor($c);
$list_items = array('Name' => $fs->name, 'Alias' => $fs->alias, 'Status' => $fs->status, 'Type' => $fs->org_type, 'Bay Area' => $fs->bay_area, 'Street' => $fs->street, 'Street 2' => $fs->street_2, 'City' => $fs->city, 'State' => $fs->state, 'Zip' => $fs->zip, 'Country' => $fs->country, 'Start Date' => $fs->date_started, 'Close Date' => $fs->date_ended, 'Billing Status' => $fs->billing_status, 'Notes' => $fs->notes);
$form->content = $r->view('basicFormContents', $list_items, array('title' => 'Edit Client'));
return $form->html;
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:9,代码来源:company_edit_form.php
注:本文中的getRenderer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论