atk4

Agile toolkit - access calculated fields (expressions) from dsql?

微笑、不失礼 提交于 2020-01-07 00:35:09
问题 I have a model with a calculated field: class Model_UsedItem extends Model_Table { public $table='usedItems'; function init() { parent::init(); $this->hasOne('Case', 'case_id', 'id'); $this->hasOne('Item', 'item_id', 'description'); $i = $this->join('Items', 'item_id'); $i->addField('unitCost')->hidden(true); $this->addField('quantity') $this->addExpression('subTotal')->set('unitCost * quantity')->type('money'); } (Table usedItems contains id, case_id, item_id, and quantity.The value for

Agile toolkit - access calculated fields (expressions) from dsql?

Deadly 提交于 2020-01-07 00:35:08
问题 I have a model with a calculated field: class Model_UsedItem extends Model_Table { public $table='usedItems'; function init() { parent::init(); $this->hasOne('Case', 'case_id', 'id'); $this->hasOne('Item', 'item_id', 'description'); $i = $this->join('Items', 'item_id'); $i->addField('unitCost')->hidden(true); $this->addField('quantity') $this->addExpression('subTotal')->set('unitCost * quantity')->type('money'); } (Table usedItems contains id, case_id, item_id, and quantity.The value for

No records found …Agiletoolkit and Oracle. Grid/CRUD elements

你。 提交于 2020-01-06 16:31:19
问题 I am trying to test around Agile Toolkit with oracle, after seting up a model and trying to show a grid it says "No records found"... Let me tell you what I did, since i've been guessing most of all configuration as I found no guides for oracle. My Oracle connection string in agiletoolkit config-default.php file looks like this: $config['dsn']= array( 'oci:dbname=localhost/MYDATABASE', 'MYUSER', 'MYPASSWORD' ); To fix the driver not found error, I enabled extension=php_pdo_oci8.dll in the php

adding filestore to CRUD with 4.2.4 (existing examples obsolete?)

Deadly 提交于 2020-01-06 12:47:28
问题 I am trying to add file upload (filestore) to an existing CRUD page. The examples I've found are all rather dated, and apparently filestore has changed enough where most of what you'll find is obsolete. I did locate this tutorial video, which shows step-by-step how to implement filestore in sufficient detail that a relative novice (me!) was successful. Filestore install begins at 0:34:30 [link]http://www.youtube.com/watch?v=h5dmAnvri1I&list=PL7CBF92AB03A1CA3B&index=9! Thank you, Mark 回答1: I

adding filestore to CRUD with 4.2.4 (existing examples obsolete?)

北慕城南 提交于 2020-01-06 12:47:02
问题 I am trying to add file upload (filestore) to an existing CRUD page. The examples I've found are all rather dated, and apparently filestore has changed enough where most of what you'll find is obsolete. I did locate this tutorial video, which shows step-by-step how to implement filestore in sufficient detail that a relative novice (me!) was successful. Filestore install begins at 0:34:30 [link]http://www.youtube.com/watch?v=h5dmAnvri1I&list=PL7CBF92AB03A1CA3B&index=9! Thank you, Mark 回答1: I

Is it possible to addTotals in agrid to only certain columns?

自作多情 提交于 2020-01-06 09:05:20
问题 When I use addTotals() in a Grid, it sums every column with number fields, How to show only the ones I want? 回答1: you can override formatTotalsRow() and clear up what's not needed from $this->current_row[] 来源: https://stackoverflow.com/questions/9170210/is-it-possible-to-addtotals-in-agrid-to-only-certain-columns

Is it possible to addTotals in agrid to only certain columns?

跟風遠走 提交于 2020-01-06 09:04:11
问题 When I use addTotals() in a Grid, it sums every column with number fields, How to show only the ones I want? 回答1: you can override formatTotalsRow() and clear up what's not needed from $this->current_row[] 来源: https://stackoverflow.com/questions/9170210/is-it-possible-to-addtotals-in-agrid-to-only-certain-columns

Agile Toolkit CRUD works perfectly on localhost throws error on server

≯℡__Kan透↙ 提交于 2020-01-06 04:02:45
问题 I need help in ATK4 CRUD. I have built a backend for a project using Agile Toolkit 4.1.3. I have the following Model: class Model_Product extends Model_Table { public $entity_code = 'product'; function init() { parent::init(); $this->addField('category_id')->refModel('Model_Category')->mandatory(true); $this->addField('name')->mandatory(true); $this->addField('picture_id')->refModel('Model_Picture')->mandatory(true); $this->addField('short_description')->mandatory(true); $this->addField(

in ATK4 Can I define a different template from frontend to back end?

我怕爱的太早我们不能终老 提交于 2020-01-05 07:02:57
问题 For Example, I would like to use the jUI template for the Admin area and CRUD, and for the FrontEnd and Pages I'd like to use the Elephant theme (or my super secret custom one). If so How do I go about defining this. I create a separate API for each area? this is in my index.php in the Root. And I'd like to mod the Shared template and keep the old one as well. I think I am supposed to create a new Dir in root/atk4/templates/MyNewTemplate with the new jUI theme + css + images And create a new

reference field on form

╄→гoц情女王★ 提交于 2020-01-02 13:19:00
问题 I think I'm not understanding the reference field. I have a simple form <?php class page_prueba extends Page { function init(){ parent::init(); $p=$this; $f=$p->add('Form'); $f->setSource('ticket'); $f->addField('line','texto')->validateNotNull(); $f->addField('text','detalle')->validateNotNull(); $c=$p->add('Model_Usuario'); $f->addField('reference','usuario')->setValueList($c)->validateNotNull(); } } And I have a User Model <?php class Model_Usuario extends Model_Table { public $entity_code