mirror of
https://github.com/Karaka-Management/oms-WarehouseManagement.git
synced 2026-02-14 13:18:40 +00:00
fix templates
This commit is contained in:
parent
2a8fac2938
commit
a0a4518ebe
|
|
@ -147,6 +147,28 @@ final class BackendController extends Controller
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Routing end-point for application behavior.
|
||||||
|
*
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param array $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface Returns a renderable object
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function viewStockCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
|
$view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-view');
|
||||||
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behavior.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
|
|
@ -180,6 +202,28 @@ final class BackendController extends Controller
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Routing end-point for application behavior.
|
||||||
|
*
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param array $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface Returns a renderable object
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function viewStockTypeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
|
$view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-type-view');
|
||||||
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behavior.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
|
|
@ -245,4 +289,31 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Routing end-point for application behavior.
|
||||||
|
*
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param array $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface Returns a renderable object
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function viewStockLocationCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
|
$view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-location-view');
|
||||||
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response);
|
||||||
|
|
||||||
|
$view->data['types'] = StockTypeMapper::getAll()
|
||||||
|
->with('l11n')
|
||||||
|
->where('l11n/language', $request->header->l11n->language)
|
||||||
|
->executeGetArray();
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ echo $this->data['nav']->render();
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iLocationStock"><?= $this->getHtml('Stock'); ?></label>
|
<label for="iLocationStock"><?= $this->getHtml('Stock'); ?></label>
|
||||||
<input type="text" id="iLocationStock" name="stock" value="<?= $location->stock->id; ?>"<?= $isNew ? ' required' : ' disabled'; ?>>
|
<input type="text" id="iLocationStock" name="stock" value="<?= $location->stock; ?>"<?= $isNew ? ' required' : ' disabled'; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -46,7 +46,7 @@ echo $this->data['nav']->render();
|
||||||
<label for="iLocationType"><?= $this->getHtml('Type'); ?></label>
|
<label for="iLocationType"><?= $this->getHtml('Type'); ?></label>
|
||||||
<select id="iLocationType" name="type">
|
<select id="iLocationType" name="type">
|
||||||
<?php foreach ($this->data['types'] as $type) : ?>
|
<?php foreach ($this->data['types'] as $type) : ?>
|
||||||
<option value="<?= $type->id; ?>"<?= $type->id === $location->type->id ? ' selected' : ''; ?>><?= $this->printHtml($type->getL11n()); ?>
|
<option value="<?= $type->id; ?>"<?= $type->id === $location->type?->id ? ' selected' : ''; ?>><?= $this->printHtml($type->getL11n()); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,14 @@ echo $this->data['nav']->render();
|
||||||
<input id="name" type="text" name="name" value="<?= $this->printHtml($type->name); ?>"<?= $isNew ? ' required' : ' disabled'; ?>>
|
<input id="name" type="text" name="name" value="<?= $this->printHtml($type->name); ?>"<?= $isNew ? ' required' : ' disabled'; ?>>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="portlet-foot">
|
||||||
|
<?php if ($isNew) : ?>
|
||||||
|
<input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-location">
|
||||||
|
<?php else : ?>
|
||||||
|
<input type="submit" value="<?= $this->getHtml('Save', '0', '0'); ?>" name="save-location">
|
||||||
|
<input class="cancel end-xs" type="submit" value="<?= $this->getHtml('Delete', '0', '0'); ?>" name="delete-location">
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user