function GetPropertyCategoriesList($SelectedId) { App::import('Model', 'PropertyCategory'); $objPropertyCat = new PropertyCategory(); $this->PropertyCategory->recursive = -1; $arrData = $objPropertyCat->find("all", array('order' => array('PropertyCategory.name' => 'ASC'))); $selectOption = ""; foreach ($arrData as $data) { if ($SelectedId == $data['PropertyCategory']['slug']) { $select = "selected='selected'"; } else { $select = ""; } $selectOption .= '<option value="' . $data['PropertyCategory']['slug'] . '" ' . $select . '>' . $data['PropertyCategory']['name'] . '</option>'; } return $selectOption; }
public function actionIndex() { $videoCr = new CDbCriteria(); $videoCr->order = 'displayOrder ASC'; $videoCr->scopes = ['publicAvailableInstruction']; $videoCr->limit = 6; $this->render('index', array('latestProperties' => Deal::model()->getLatest(6), 'featuredVideo' => InstructionVideo::model()->with('instruction')->findByAttributes(['featuredVideo' => 1]), 'mostViewed' => Deal::model()->getMostViewed(1, date("Y-m-d H:i:s", strtotime("-15 days"))), 'instructionVideos' => InstructionVideo::model()->with('instruction')->findAllByAttributes(['displayOnSite' => 1], $videoCr), 'propertyCategories' => PropertyCategory::model()->active()->displayOnHome()->findAll())); }
public function run() { PropertyCategory::create(['catname' => 'Audio/Visual Equipment']); PropertyCategory::create(['catname' => 'IT Equipment']); PropertyCategory::create(['catname' => 'Furnitures and Fixtures']); PropertyCategory::create(['catname' => 'Vehicles']); PropertyCategory::create(['catname' => 'Other Equipment']); }
public function actionManagePhotos($id) { $this->layout = '//layouts/new/main'; if (!$id) { throw new CHttpException(404, 'The requested property category does not exist.'); } $model = PropertyCategory::model()->findByPk($id); if (isset($_POST['upload-photo']) && $_POST['upload-photo']) { $type = isset($_POST['category-photo-type']) ? $_POST['category-photo-type'] : ''; $recordType = PropertyCategory::CATEGORY_PHOTO_PREFIX . $type; $this->saveImages($model, 'category-photo', $recordType); $this->redirect(['ManagePhotos', 'id' => $id]); } $this->render('managePhotos', ['model' => $model]); }
<tr> <th class="info" >Property Number: </th> <td>{{ $prop->id }}</td> </tr> <tr> <th class="info" >Property Acct. Receipt: </th> @if(!empty($prop->par)) <td>{{ $prop->par }}</td> @else <td>None</td> @endif </tr> <tr> <th class="info">Category: </th> <?php $category = PropertyCategory::find($prop->prop_category); ?> <td>{{$category->catname}}</td> </tr> <tr> <th class="info">Serial Number: </th> <td>{{ $prop->serialno }}</td> </tr> <tr> <th class="info">Property Description </th> <td>{{ $prop->propdesc }}</td> </tr> <tr> <th class="info">Property Cost </th>
?> </label> <div class="controls"> <?php echo $form->radioButtonList($model, 'dea_chainfree', Util::enumItem($model, 'dea_chainfree'), ['separator' => ' ']); ?> </div> </div> <div class="control-group"> <label class="control-label">Category</label> <div class="controls"> <?php /** @var $categories PropertyCategory[] */ $categories = PropertyCategory::model()->active()->findAll(); foreach ($categories as $category) { echo '<label>'; echo CHtml::checkBox('Deal[category][' . $category->id . ']', $model->instructionBelongsToCategory($category->id)); echo CHtml::label($category->title, 'Deal_category_' . $category->id); echo '</label>'; } ?> </div> </div> <div class="control-group"> <label class="control-label">Tenure</label> <div class="controls text"> <?php echo $model->dea_tenure;
<th>Condition</th> <th>Assigned Employee</th> <th>From Department</th> <th>PAR</th> <th>Date Assigned</th> <th>Action</th> </thead> <tbody> @foreach ($query as $property) <tr> <td>{{ $property->properties->id }}</td> <td><a href="{{ route('view-property', $property->properties_id) }}">{{ $property->properties->propname }} </a></td> <td> <?php $cat = PropertyCategory::find($property->cat_id); ?> {{ $cat->catname }} </td> <td>{{ $property->properties->propcondition }}</td> <td>{{ $property->user->formatName(':fn :ln') }}</td> <td> <?php $dept = Department::find($property->dept_id); ?> {{ $dept->name }}
<?php /** * @var $this ClientController * @var $model Client * @var $form AdminFilterForm * @var $instructionModel Deal * @var $minPrices array * @var $maxPrices array */ $propertyCategories = PropertyCategory::model()->matchClients()->findAll(); $form = $this->beginWidget('AdminFilterForm', array('id' => 'client-filter-form', 'enableAjaxValidation' => false, 'model' => [$model, $model->telephones[0]], 'ajaxFilterGrid' => 'client-list', 'focus' => [$model, 'fullName'], 'storeInSession' => false)); ?> <div class="row-fluid"> <div class="span12"> <fieldset> <div class="content"> <?php echo $form->beginControlGroup($model, 'fullName'); ?> <label class="control-label">Search</label> <div class="controls"> <?php echo $form->textField($model, 'fullName'); ?> </div> <?php echo $form->endControlGroup(); ?> </div>
public function actionPropertyCategory($id) { if (!$id) { throw new CHttpException(404, 'Property Category not found'); } $propCatModel = PropertyCategory::model()->active()->findByPk($id); if (!$propCatModel) { throw new CHttpException(404, 'Property Category not found'); } $this->render('propertyCategory', array('instructions' => Deal::model()->getCategorized($id, 'sales', null), 'propCatModel' => $propCatModel)); }
public function getListPropReportsPdf() { $cat = Session::get('catid'); if ($cat == "*") { $props = Properties::all(); $catid = "*"; } else { $props = Properties::where('prop_category', $cat)->get(); $catid = PropertyCategory::where('id', $cat)->pluck('id'); } Fpdf::AddPage(); Fpdf::Image('img/dap.jpg', 10, 5, 150); Fpdf::SetFont('Arial', 'B', 12); Fpdf::Ln(20.6); Fpdf::Cell(40, 27, 'List of Properties', 0, 2, 'C', 0); Fpdf::SetFont('Arial', 'B', 9.5); Fpdf::Cell(27, 5, 'Property ID', 1, 0, 'C', 0); Fpdf::Cell(27, 5, 'Serial No', 1, 0, 'C', 0); Fpdf::Cell(27, 5, 'Property Name', 1, 0, 'C', 0); Fpdf::Cell(27, 5, 'Category', 1, 0, 'C', 0); Fpdf::Cell(27, 5, 'Status', 1, 0, 'C', 0); Fpdf::Cell(27, 5, 'Cost', 1, 0, 'C', 0); Fpdf::Cell(27, 5, 'Date Acquired', 1, 0, 'C', 0); Fpdf::Ln(); foreach ($props as $prop) { Fpdf::SetFont('Arial', 'B', 6); Fpdf::Cell(27, 4, $prop->propname, 1, 0, 'C', 0); Fpdf::Cell(27, 4, $prop->serialno, 1, 0, 'C', 0); Fpdf::Cell(27, 4, $prop->propname, 1, 0, 'C', 0); $category = PropertyCategory::find($prop->prop_category); Fpdf::Cell(27, 4, $category->catname, 1, 0, 'C', 0); Fpdf::Cell(27, 4, $prop->propstatus, 1, 0, 'C', 0); Fpdf::Cell(27, 4, $prop->propcost, 1, 0, 'C', 0); Fpdf::Cell(27, 4, $prop->formatDateAcquired(), 1, 0, 'C', 0); Fpdf::Ln(); } Fpdf::Output(); exit; }