public function index()
 {
     try {
         $vendorList = Vendor::all();
         //venNum will be used for css coloring
         $vendorNumber = 0;
         foreach ($vendorList as $vendor) {
             $vendor->venNum = $vendorNumber;
             $vendorNumber++;
         }
         return $vendorList->toJson();
     } catch (Exception $e) {
         return '{"error":{"text":' . $e->getMessage() . '}}';
     }
 }
 public static function update($id)
 {
     self::check_logged_in();
     $params = $_POST;
     $attributes = array('id' => $id, 'vendor_id' => $params['vendor_id'], 'partnumber' => $params['partnumber'], 'datasheeturl' => $params['datasheeturl']);
     $vendoritem = new VendorItem($attributes);
     $errors = $vendoritem->errors();
     if (count($errors) > 0) {
         $vendoritem = VendorItem::find($id);
         $vendors = Vendor::all();
         View::make('vendoritem/edit.html', array('errors' => $errors, 'attributes' => $attributes, 'vendoritem' => $vendoritem, 'vendors' => $vendors));
     } else {
         $vendoritem->update();
         Redirect::to('/vendoritem/' . $vendoritem->id, array('message' => 'The vendor item has been modified successfully!'));
     }
 }
 public function run()
 {
     foreach (Vendor::all() as $vendor) {
         $vendor->sync_with_dsbs_and_sam();
     }
 }
Beispiel #4
0
<?php

include_once '../../../_includes/framework.php';
require_login();
if (!isset($form)) {
    $form = new AddAttendeeForm();
}
$badge_types = BadgeType::all();
$reg_levels = RegistrationLevel::all();
$tshirt_sizes = TShirtSize::all();
$payment_types = PaymentType::all();
$vendors = Vendor::all();
?>

<div class="row">
  <div class="form-group col-md-6 <?php 
echo $form->error_on("badge_name") ? "has-error" : "";
?>
">
    <?php 
echo label_tag("badge_name", "Badge Name");
?>
    <?php 
echo input_tag($form, "badge_name");
?>
    <?php 
echo error_display($form, "badge_name");
?>
  </div>

  <div class="form-group col-md-6 <?php 
Beispiel #5
0
 /**
  * Show the form for editing the specified product.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $product = Product::find($id);
     $vendors = Vendor::all();
     return View::make('products.edit', compact('product', 'vendors'));
 }
 public function allVendors()
 {
     $data = array('status' => 'ok', 'vendors' => Vendor::all());
     return $data;
 }
 public function index()
 {
     $vendors = Vendor::all();
     return View::make('admin.vendors.index', compact('vendors'));
 }
Beispiel #8
0
<?php

include_once '../_includes/framework.php';
require_login();
$page_title = "Admin";
include "_partials/admin-header.php";
$query = Vendor::all();
$count = count($query);
?>

<div class="container">
  <div class="col-md-12">
    <h1>
      Vendors (<?php 
echo $count;
?>
)
    </h1>
    <table class="table table-striped table-condensed">
      <thead>
        <tr>
          <th>Name</th>
          <th>Assigned Table(s)</th>
          <th class="hidden-print">Badges</th>
        </tr>
      </thead>
      <tbody>
        <?php 
foreach ($query as $vendor) {
    ?>
          <tr data-id="<?php 
Beispiel #9
0
    <?php 
echo error_display($form, "badge_type");
?>
  </div>

  <div class="form-group col-md-4 <?php 
echo $form->error_on("vendor_id") ? "has-error" : "";
?>
">
    <?php 
echo label_tag("vendor_id", "Vendor");
?>
    <select class="form-control" id="vendor_id" name="vendor_id">
      <option></option>
      <?php 
foreach (Vendor::all() as $vendor) {
    ?>
        <?php 
    echo option_tag($vendor->display_name(), @$form->params["vendor_id"], $vendor->id);
    ?>
      <?php 
}
?>
    </select>
    <?php 
echo error_display($form, "vendor_id");
?>
  </div>
</div>

<div class="row">
 public static function index()
 {
     $vendors = Vendor::all();
     View::make('vendor/index.html', array('vendors' => $vendors));
 }