// echo '</tr></table>'; // echo '</form>'; // Work Order Notes if (!empty($this->WorkOrder['id'])) { $url = $this->link('/note/create?w=' . $this->WorkOrder['id']); $arg = array('list' => $this->WorkOrderNoteList, 'page' => $url); echo Radix::block('note-list', $arg); } // Work Order Files if (!empty($this->WorkOrder['id'])) { // $url = $this->link('/file/create?w=' . $this->WorkOrder['id']); // $arg = array( // 'list' => $this->WorkOrderFileList, // 'page' => $url, // ); echo Radix::block('file-list', $this->WorkOrderFileList); // $arg); } // Work Order Items if (!empty($this->WorkOrder['id'])) { $url = $this->link('/workorder/item?w=' . $this->WorkOrder['id']); echo '<h2 id="woi-list">Work Order Items '; echo '<a accesskey="n" class="ajax-edit" data-name="woi-edit" href="' . $url . '">'; echo img('/tango/24x24/actions/list-add.png', 'Add Item'); echo '</a>'; echo '</h2>'; echo '<div id="woi-edit"></div>'; } if (count($this->WorkOrderItemList) > 0) { $a_size = $e_size = $e_size_full = 0; $a_cost = $e_cost = $e_cost_full = 0;
// 'page' => $url, // ); echo Radix::block('file-list', $this->ContactFileList); // Work Orders echo '<h2><a href="' . Radix::link('/workorder/new?c=' . $this->Contact['id']) . '"><i class="fa fa-clock-o"></i> Work Orders</a></h2>'; if ($this->WorkOrderList) { echo Radix::block('workorder-list', array('list' => $this->WorkOrderList)); } // Invoices echo '<h2><a href="' . Radix::link('/invoice/new?c=' . $this->Contact['id']) . '"><i class="fa fa-list"></i> Invoices</a></h2>'; if ($this->InvoiceList) { echo Radix::block('invoice-list', array('list' => $this->InvoiceList)); } // History $x = array('ajax' => true, 'list' => $this->Contact->getHistory()); echo Radix::block('diff-list', $x); ?> <script type='text/javascript'> $('#account').autocomplete({ source: "<?php echo Radix::link('/account/ajax?a=account'); ?> ", change: function(event, ui) { if (ui.item) { $('#account').val(ui.item.label); $('#account_id').val(ui.item.id); } } });
use Edoceo\Radix; echo '<table>'; echo '<tr>'; echo '<th>Name</th>'; echo '<th>Phone</th>'; echo '<th>Email</th>'; echo '</tr>'; foreach ($data['list'] as $item) { echo '<tr class="rero ' . $item['kind'] . '">'; // Show Contact, if none show Name echo '<td>'; echo '<a href="' . Radix::link('/contact/view?c=' . $item['id']) . '">'; switch (strtolower($item['kind'])) { case 'company': echo '<i class="fa fa-building"></i> '; break; case 'vendor': echo '<i class="fa fa-truck"></i> '; break; case 'person': default: echo '<i class="fa fa-user"></i> '; } echo html($item['name']); echo '</a>'; echo '</td>'; echo '<td>' . Radix::block('stub-channel', array('kind' => ContactChannel::PHONE, 'data' => $item['phone'])) . '</td>'; echo '<td>' . Radix::block('stub-channel', array('kind' => ContactChannel::EMAIL, 'data' => $item['email'])) . '</td>'; echo '</tr>'; } echo '</table>';
<?php /** Account Index View Displays a General Ledger */ namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\DB\SQL; $_ENV['title'] = 'General Ledger'; $x_kind = null; echo '<form action="" class="np" method="get">'; echo Radix::block('account-period-input', array('m' => $this->Month, 'y' => $this->Year, 'p' => $this->Period)); echo '</form>'; // Search // echo '<form action="' . Radix::link('/account/search') . '">'; // echo '<div>'; // echo '<input type="text" name="q" value="">'; // echo '<button value="search">Search</button>'; // echo '</div>'; echo '<p><strong>Cash</strong> basis, reports for money collected when B&O</p>'; echo '<p>Accounts for Period: ' . $this->date_alpha . ' - ' . $this->date_omega . '</p>'; echo '<table>'; foreach ($this->AccountList as $item) { if ($x_kind != $item['kind']) { echo "<tr><th>Code</th><th>{$item['kind']}</th><th>Balance</th><th colspan='3'>Actions</th></tr>"; } echo '<tr class="rero">'; $indent = str_repeat(' ', substr_count($item['full_code'], '/')); echo '<td>' . $indent . '<a href="' . Radix::link('/account/ledger?id=' . $item['id']) . '">' . html($item['full_code']) . '</td>';
// echo '<link href="//gcdn.org/normalize/3.0.2/normalize.css" rel="stylesheet">'; echo '<link href="//gcdn.org/pure/0.6.0/pure.css" rel="stylesheet">'; echo '<link href="//gcdn.org/font-awesome/4.2.0/font-awesome.css" rel="stylesheet">'; // echo '<link href="//gcdn.org/jquery-ui/1.10.2/smoothness.css" rel="stylesheet">'; echo '<link href="//gcdn.org/radix/radix.css" rel="stylesheet">'; echo '<link href="' . Radix::link('/css/base.css') . '" rel="stylesheet">'; echo '<link href="' . Radix::link('/img/imperium-icon.ico') . '" rel="shortcut icon">'; echo '<link href="' . Radix::link('/img/imperium-icon.png') . '" rel="apple-touch-icon">'; echo '<script src="//gcdn.org/jquery/1.10.2/jquery.js"></script>'; echo '<script src="//gcdn.org/jquery-ui/1.10.2/jquery-ui.js"></script>'; echo '<script src="' . Radix::link('/js/imperium.js') . '"></script>'; echo '<script>Imperium.base = "' . Radix::base(true) . '";</script>'; echo "</head>\n<body>\n"; // Content Header echo '<header>'; $menu = Radix::block('menu.php'); if (!empty($menu)) { echo '<div id="menu">'; echo $menu; echo '</div>'; // echo ImperiumView::mruDraw(); } // if (!empty($this->title_one)) { // echo '<h2>' . $this->title_one . '</h2>'; // } // if (!empty($this->title_two)) { // echo $this->title_two; // } echo '</header>'; // Menu for Authenticated Users Only // $auth = Zend_Auth::getInstance();
A Form for creating or editing a Contact Channel */ namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\HTML\Form; echo '<form method="post">'; echo '<div>'; // echo Form::hidden('id', $this->ContactChannel['id']); echo Form::hidden('contact_id', $this->ContactChannel['contact_id']); echo '</div>'; echo '<table>'; echo "<tr><td class='b r'>Kind:</td><td>" . Form::select('kind', $this->ContactChannel['kind'], ContactChannel::$kind_list) . '</td></tr>'; echo "<tr><td class='b r'>Name:</td><td>" . Form::text('name', $this->ContactChannel['name']) . '</td></tr>'; echo "<tr><td class='b r'>Data:</td><td>" . Form::text('data', $this->ContactChannel['data']) . '</td></tr>'; // echo "<tr><td class='b r'>Primary:</td><td>". Form::formCheckbox('primary')."</td></tr>"; echo '</table>'; echo '<div class="bf">'; // echo '<button class="exec" name="a" value="apply">Apply</button>'; echo '<button class="exec" name="a" value="save">Save</button>'; if (empty($this->ContactChannel['id'])) { echo '<button class="warn" name="a" value="cancel">Cancel</button>'; } else { echo '<button class="fail" name="a" value="delete">Delete</button>'; } echo '</div>'; echo '</form>'; // History $args = array('list' => $this->ContactChannel->getHistory()); echo Radix::block('diff-list', $args);
<?php /** @file @brief Invoice Index View Shows Paginated Results of the Index View */ namespace Edoceo\Imperium; use Edoceo\Radix; echo Radix::block('page-link', array('cur' => $this->page_cur, 'max' => $this->page_max, 'size' => $_GET['size'])); echo Radix::block('invoice-list', array('list' => $this->list)); echo Radix::block('page-link', array('cur' => $this->page_cur, 'max' => $this->page_max, 'size' => $_GET['size']));
namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\DB\SQL; $list = array_keys($_ENV['data']); foreach ($list as $name) { if (!isset($_ENV['data'][$name])) { continue; } $info = $_ENV['data'][$name]; if (count($info['list']) > 0) { // echo "<div style='display: table-cell;'>"; echo '<div>'; // style='display: table-cell;'>"; echo sprintf('<h2>%d %s</h2>', count($info['list']), $name); echo Radix::block($info['view'], array('list' => $info['list'], 'opts' => array('head' => true))); echo '</div>'; // Radix::dump($info); } } // Show the Events $sql = 'SELECT contact_event.*, contact.name AS contact_name FROM contact_event'; $sql .= ' JOIN contact ON contact_event.contact_id = contact.id'; // $sql.= ' WHERE flag = 0'; $sql .= ' ORDER BY contact_event.xts DESC'; $sql .= ' LIMIT 20'; $res = SQL::fetch_all($sql); foreach ($res as $rec) { echo '<p>'; echo '<a href="' . Radix::link('/contact/view?c=' . $rec['contact_id']) . '">' . html($rec['contact_name']) . '</a>'; echo ' - ';
use Edoceo\Radix; use Edoceo\Radix\Session; use Edoceo\Radix\DB\SQL; $sql = 'SELECT id, name, cts FROM base_note'; // $this->_d->select(); $sql .= ' WHERE link IS NULL OR link = \'\''; $sql .= ' ORDER BY name'; // $sql->from('base_note',array('id','name','cts')); // $sql->where('link is null'); // $sql->order(array('name')); $res = SQL::fetch_all($sql); // $page = Zend_Paginator::factory($sql); // $page->setCurrentPageNumber($this->_request->getParam('page')); // $page->setItemCountPerPage(30); // $page->setPageRange(10); // if ($cpage->getTotalItemCount()) { if (0 != count($res)) { $a_id = $res[0]['id']; $z_id = $res[count($res)]['id']; $title = array(); $title[] = sprintf('Notes %d through %d', $a_id, $z_id); $title[] = sprintf('Page %d of %d', 1, 99); $_ENV['title'] = $title; } else { $_ENV['title'] = 'Notes'; Session::flash('info', 'There are no notes created'); } // $this->view->Page = $page; // echo $this->paginationControl($this->Page,'All','../elements/page-control.phtml'); echo Radix::block('note-list', array('list' => $res, 'page' => 1)); // echo $this->paginationControl($this->Page,'All','../elements/page-control.phtml');
// Output // $page_link = $this->paginationControl($this->Page,'All','../elements/page-control.phtml'); // echo $page_link; // First Character Index // @todo Would be cool to highlight //$a = empty($_GET['a']) ? null : $_GET['a']; $opts = array('page' => 1, 'sort' => $this->Sort); $list = array(); if (!empty($this->Char)) { $opts['char'] = null; $list[] = '<a href="?' . http_build_query($opts) . '">ALL</a>'; } if ($this->Char == '#') { $list[] = '<span class="hi"> # </span>'; } else { $opts['char'] = '#'; $list[] = '<a href="?' . http_build_query($opts) . '"> # </a>'; } // Alphabet Link for ($i = 65; $i <= 90; $i++) { $opts['char'] = chr($i); if ($opts['char'] == $this->Char) { $list[] = '<span class="hi"> ' . $opts['char'] . ' </span>'; } else { $list[] = '<a href="?' . http_build_query($opts) . '"> ' . chr($i) . ' </a>'; } //$this->link('/contact?' . http_build_query($opts),' ' . chr($i) . ' ') . ' '; } echo '<div class="jump_list">' . implode(' ', $list) . '</div>'; echo Radix::block('contact-list', array('list' => $this->ContactList)); echo $page_link;
@todo Let User Change Status/Colour When Posting Invoice! */ namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\HTML\Form; echo '<form action="" method="post">'; echo '<div>'; echo Form::hidden('id', $this->WorkOrder['id']); //echo $this->formHidden('contact_id',$this->WorkOrder->contact_id); echo '</div>'; echo '<table>'; // Contact & Phone echo '<tr>'; echo '<td class="b r">Contact:</td><td>' . Radix::link("/contact/view/{$this->Contact['id']}", "{$this->Contact['name']}") . '</td>'; echo '<td class="b r">Phone:</td><td>' . Radix::block('stub-channel', array('value' => $this->Contact['phone'])) . '</td>'; echo '</tr>'; // Kind and Date echo '<tr>'; echo '<td class="b r">Kind:</td><td>' . $this->WorkOrder['kind'] . '</td>'; echo '<td class="b r">Date:</td><td>' . $this->WorkOrder['date'] . '</td>'; echo '</tr>'; // Status echo '<tr>'; echo '<td class="b r">Status:</td><td><input name="status" type="text" value=""></td>'; echo '</tr>'; echo '</table>'; // Work Order Items echo '<h2>Choose Work Order Items</h2>'; $full_total = 0; $bill_total = 0;