Skip to content
Create a gist now

Instantly share code, notes, and snippets.

atk4 page
class page_graafik extends Page {
function initMainPage(){
//Get the maja id from maja table based on mac
$maja = $this->setModel('maja');
$jobs = $this->add('Grid');
$model= $this->add('Model_too');
$filter = $jobs->setModel($model,array('tahtaeg','firma','kirjeldus','file_id','tehtud'))->setOrder('tahtaeg', false);
// Only show current if mac set
if($_GET['mac'] != "") {
$filter->addCondition('maja_id', $maja['id']);
// Add button to show file
// Mark job as complete
$model = $jobs->getModel()->loadData($_GET['valmis']);
$this->js(null,$this->js()->univ()->successMessage($model->get('firma').' valmis!'))->reload()->execute();
// Open the file somehow???
$pdf = $this->add('filestore/Model_File');
// Quicksearch and automatic refresh
$jobs->js(true)->univ()->setTimeout($jobs->js()->_enclose()->reload(), 15000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.