示例#1
0
 /**
  * Gets the singleton instance
  * @return View_Helper
  */
 public static function &instance()
 {
     if (self::$_instance === null) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
示例#2
0
 /**
  * Change guest name.
  */
 public function action_ajax_update_guest_name()
 {
     $this->auto_render = FALSE;
     $this->_init();
     // Verify guest ID
     $guest_id = $this->request->param('id', '');
     $guest = $this->wedding->get_guest($guest_id);
     if (!$guest->loaded()) {
         throw new Kohana_Exception('Invalid guest ID:' . $guest_id);
     }
     $guest_name = trim(Arr::get($_POST, 'guest_name', ''));
     if ($guest_name == '') {
         $return = View_Helper::tagalizer($guest->name, URL::site('wedding/tag/:tag', TRUE));
     } else {
         $guest->name = $guest_name;
         $guest->save();
         $return = View_Helper::tagalizer($guest_name, URL::site('wedding/tag/:tag', TRUE));
     }
     return $this->response->body($return);
 }
示例#3
0
<?php

$topnav = array(array('href' => '/', 'value' => 'Dashboard', 'icon' => 'icon-home', 'aliases' => array('')), array('href' => 'customers', 'value' => 'Customers', 'icon' => 'icon-user', 'aliases' => array('customers/*')), array('href' => 'products', 'value' => 'Products', 'icon' => 'icon-barcode', 'aliases' => array('products/*')), array('href' => 'orders', 'value' => 'Orders', 'icon' => 'icon-list', 'aliases' => array('orders/*')), array('href' => 'statistics', 'value' => 'Statistics', 'icon' => 'icon-bar-chart', 'aliases' => array('statistics/*')), array('href' => 'settings', 'value' => 'Settings', 'icon' => 'icon-gear', 'aliases' => array('settings/*')));
echo View_Helper::nav($topnav);
示例#4
0
		<?php 
}
?>
	</ul>
	
	<h3>Arrived</h3>
	<ul class="guest-list">
		<?php 
foreach ($guests['arrived'] as $name => $guest_id) {
    ?>
			<li>
				<span id="guest_<?php 
    echo $guest_id;
    ?>
" class="guest_name"><?php 
    echo View_Helper::tagalizer($name, URL::site('wedding/tag/:tag', TRUE));
    ?>
</span>
				<?php 
    echo '[' . HTML::anchor('wedding/guest_checkout/' . $guest_id, 'Checkout') . ']';
    ?>
				<?php 
    echo '[' . HTML::anchor('wedding/delete_guest/' . $guest_id, 'Delete', array('class' => 'delete_guest')) . ']';
    ?>
			</li>
		<?php 
}
?>
	</ul>
</section>
<div class="clear"></div>
示例#5
0
    ?>
</td>
				<td><?php 
    echo $paymentmethod->type();
    ?>
</td>
				<td><?php 
    echo $paymentmethod->account();
    ?>
</td>
				<td><?php 
    echo View_Helper::date($paymentmethod->created_at);
    ?>
</td>
				<td><?php 
    echo $paymentmethod->updated_at != $paymentmethod->created_at ? View_Helper::date($paymentmethod->updated_at) : '';
    ?>
</td>
				<td>
					<?php 
    switch ($paymentmethod->status) {
        case 'active':
            $status_label = ' label-success';
            break;
        case 'deleted':
        default:
            $status_label = '';
    }
    ?>
					<span class="label<?php 
    echo $status_label;
示例#6
0
    ?>
</td>
				<td><?php 
    echo Inflector::titleize($callback->event, '.');
    ?>
</td>
				<td><?php 
    echo $callback->url;
    ?>
</td>
				<td><?php 
    echo View_Helper::date($callback->created_at);
    ?>
</td>
				<td><?php 
    echo $callback->updated_at != $callback->created_at ? View_Helper::date($callback->updated_at) : '';
    ?>
</td>
				<td>
					<?php 
    echo Html::anchor($callback->link('edit'), '<i class="icon icon-pencil"></i> Edit', array('class' => 'action-link'));
    echo Html::anchor($callback->link('delete'), '<i class="icon icon-remove"></i> Delete', array('class' => 'action-link confirm', 'data-msg' => "Are you sure you want to delete this event callback?"));
    ?>
				</td>
			</tr>
		<?php 
}
?>
	</tbody>
</table>
示例#7
0
    ?>
			<tr>
				<td><?php 
    echo $key->id;
    ?>
</td>
				<td><?php 
    echo $key->key;
    ?>
</td>
				<td><?php 
    echo View_Helper::date($key->created_at);
    ?>
</td>
				<td><?php 
    echo $key->updated_at != $key->created_at ? View_Helper::date($key->updated_at) : '';
    ?>
</td>
				<td>
					<?php 
    switch ($key->status) {
        case 'active':
            $status_label = ' label-success';
            break;
        case 'deleted':
            $status_label = ' label-important';
            break;
        default:
            $status_label = '';
    }
    ?>
示例#8
0
 public function fail()
 {
     View_Helper::make('login.fail', array(), 'login');
 }
示例#9
0
				<td><?php 
    echo $gateway->id;
    ?>
</td>
				<td><?php 
    echo Inflector::titleize($gateway->type);
    ?>
</td>
				<td><?php 
    echo Inflector::titleize($gateway->processor);
    ?>
</td>
				<td><?php 
    echo View_Helper::date($gateway->created_at);
    ?>
</td>
				<td><?php 
    echo $gateway->updated_at != $gateway->created_at ? View_Helper::date($gateway->updated_at) : '';
    ?>
</td>
				<td><?php 
    echo Html::anchor($gateway->link('edit'), '<i class="icon icon-pencil"></i> Edit', array('class' => 'action-link'));
    ?>
</td>
			</tr>
		<?php 
}
?>
	</tbody>
</table>
示例#10
0
    foreach ($option->metas as $meta) {
        ?>
						<span class="label"><?php 
        echo $meta->meta->name . ': ' . $meta->value;
        ?>
</span>
					<?php 
    }
    ?>
				</td>
				<td><?php 
    echo View_Helper::date($option->created_at);
    ?>
</td>
				<td><?php 
    echo $option->updated_at != $option->created_at ? View_Helper::date($option->updated_at) : '';
    ?>
</td>
				<td>
					<?php 
    switch ($option->status) {
        case 'active':
            $status_label = ' label-success';
            break;
        case 'deleted':
            $status_label = ' label-important';
            break;
        default:
            $status_label = '';
    }
    ?>
示例#11
0
							/ <?php 
            echo $fee->interval . ' ' . Inflector::pluralize($fee->interval_unit);
            ?>
						<?php 
        }
        ?>
					<?php 
    }
    ?>
				</td>
				<td><?php 
    echo View_Helper::date($fee->created_at);
    ?>
</td>
				<td><?php 
    echo $fee->updated_at != $fee->created_at ? View_Helper::date($fee->updated_at) : '';
    ?>
</td>
				<td>
					<?php 
    switch ($fee->status) {
        case 'active':
            $status_label = ' label-success';
            break;
        case 'deleted':
            $status_label = ' label-important';
            break;
        default:
            $status_label = '';
    }
    ?>
示例#12
0
 public function edit()
 {
     $usuario = $this->model->get(array('id' => Request_Helper::post('id')));
     View_Helper::make('usuarios.edit', array('ID' => $usuario->id, 'LOGIN' => $usuario->login), false);
 }
示例#13
0
		<?php 
foreach ($metas as $meta) {
    ?>
			<tr>
				<td><?php 
    echo $meta->id;
    ?>
</td>
				<td><?php 
    echo $meta->name;
    ?>
</td>
				<td><?php 
    echo View_Helper::date($meta->created_at);
    ?>
</td>
				<td><?php 
    echo $meta->updated_at != $meta->created_at ? View_Helper::date($meta->updated_at) : '';
    ?>
</td>
				<td><?php 
    echo Html::anchor($meta->link('edit'), '<i class="icon icon-pencil"></i> Edit', array('class' => 'action-link'));
    ?>
</td>
			</tr>
		<?php 
}
?>
	</tbody>
</table>
示例#14
0
    ?>
			<tr>
				<td><?php 
    echo $transaction->id;
    ?>
</td>
				<td>$<?php 
    echo $transaction->amount;
    ?>
</td>
				<td><?php 
    echo $transaction->paymentmethod();
    ?>
</td>
				<td><?php 
    echo View_Helper::date($transaction->created_at);
    ?>
</td>
				<td>
					<?php 
    switch ($transaction->status) {
        case 'paid':
            $status_label = 'label-success';
            break;
        case 'declined':
            $status_label = 'label-important';
            break;
        case 'refunded':
            $status_label = 'label-info';
            break;
        default:
示例#15
0
    ?>
</td>
				<td><?php 
    echo Html::anchor($order->customer->link('contacts'), $order->customer->name());
    ?>
</td>
				<td><?php 
    echo Html::anchor($order->customer->link('transactions'), $order->transaction_id);
    ?>
</td>
				<td>$<?php 
    echo $order->transaction->amount;
    ?>
</td>
				<td><?php 
    echo View_Helper::date($order->created_at);
    ?>
</td>
				<td><?php 
    echo $order->updated_at != $order->created_at ? View_Helper::date($order->updated_at) : '';
    ?>
</td>
			</tr>
		<?php 
}
?>
	</tbody>
</table>

<?php 
echo $pagination->render();
示例#16
0
 public function noTemplateView()
 {
     $data = $this->getData();
     View_Helper::make('dashboard.view', array('NOTICIAS_BLOCK' => $data['noticias'], 'COMENTARIOS_BLOCK' => $data['comentarios']), false);
 }
示例#17
0
<br />
						<?php 
        echo $contact->city . ', ' . $contact->state . ' ' . $contact->zip;
        ?>
<br />
						<?php 
        echo $contact->country();
        ?>
					<?php 
    }
    ?>
				</td>
				<td><?php 
    echo View_Helper::date($contact->created_at);
    ?>
</td>
				<td><?php 
    echo $contact->updated_at != $contact->created_at ? View_Helper::date($contact->updated_at) : '';
    ?>
</td>
				<td><?php 
    echo Html::anchor($contact->link('settings', 'edit'), '<i class="icon icon-pencil"></i> Edit', array('class' => 'action-link'));
    ?>
</td>
			</tr>
		<?php 
}
?>
	</tbody>
</table>
示例#18
0
        ?>
:
								<span class="sub-title"><?php 
        echo $subtitle;
        ?>
</span>
							<?php 
    }
    ?>
						</h1>
					<?php 
}
?>
					
					<?php 
echo View_Helper::alerts();
?>
					
					<?php 
echo $content;
?>
				</div>
			</div>
		</div>
		
		<footer></footer>
	</div>
	
	<?php 
echo Casset::render_js('base');
echo Casset::render_js('page');
示例#19
0
<?php

if (empty($option)) {
    return;
}
$nav = array(array('href' => $option->product->link('options'), 'value' => 'Configure Options', 'class' => 'return-link'), array('href' => $option->link('edit'), 'value' => 'General'), array('href' => $option->link('fees'), 'value' => 'Fees'));
echo View_Helper::nav($nav);
示例#20
0
    ?>
</td>
				<td><?php 
    echo $customer->email();
    ?>
</td>
				<td><?php 
    echo $customer->balance();
    ?>
</td>
				<td><?php 
    echo View_Helper::date($customer->created_at);
    ?>
</td>
				<td><?php 
    echo $customer->updated_at != $customer->created_at ? View_Helper::date($customer->updated_at) : '';
    ?>
</td>
				<td>
					<?php 
    switch ($customer->status) {
        case 'active':
            $status_label = ' label-success';
            break;
        case 'deleted':
            $status_label = ' label-important';
            break;
        default:
            $status_label = '';
    }
    ?>
示例#21
0
 public function edit()
 {
     $comentarios = $this->model->get(array('id' => Request_Helper::post('id')));
     View_Helper::make('comentarios.edit', array('ID' => $comentarios->id, 'USER_ID' => $comentarios->user_id, 'CLIENT' => $comentarios->client, 'MESSAGE' => $comentarios->message), false);
 }
示例#22
0
    ?>
</td>
				<td><?php 
    echo Html::anchor($product->option->link('fees'), $product->option->name);
    ?>
</td>
				<td><?php 
    echo $product->order_id;
    ?>
</td>
				<td><?php 
    echo View_Helper::date($product->created_at);
    ?>
</td>
				<td><?php 
    echo $product->updated_at != $product->created_at ? View_Helper::date($product->updated_at) : '';
    ?>
</td>
				<td>
					<?php 
    switch ($product->status) {
        case 'active':
            $status_label = ' label-success';
            break;
        case 'canceled':
        default:
            $status_label = '';
    }
    ?>
					<span class="label <?php 
    echo $status_label;
示例#23
0
<?php

if (empty($customer)) {
    return;
}
$nav = array(array('href' => $customer->link('paymentmethods/create'), 'value' => 'Add Payment Method', 'attributes' => array('class' => 'btn'), 'icon' => 'icon-plus'));
echo View_Helper::nav($nav, array('class' => 'nav-pills pull-right'));
示例#24
0
 public function edit()
 {
     $noticia = $this->model->get(array('id' => Request_Helper::post('id')));
     View_Helper::make('noticias.edit', array('ID' => $noticia->id, 'USER_ID' => $noticia->user_id, 'TITLE' => $noticia->title, 'MESSAGE' => $noticia->message), false);
 }