task['id']; $task_attachments = ( isset( $this -> task_attachments ) and is_array( $this -> task_attachments ) ) ? $this -> task_attachments : []; $attachments_count = count( $task_attachments ); $date_start = ''; if ( $this -> task['date_start'] ) $date_start = date( 'Y-m-d', strtotime( $this -> task['date_start'] ) ); elseif ( !$this -> task['id'] ) $date_start = date( 'Y-m-d' ); $date_end = ''; if ( $this -> task['date_end'] ) $date_end = date( 'Y-m-d', strtotime( $this -> task['date_end'] ) ); elseif ( !$this -> task['id'] ) $date_end = date( 'Y-m-d' ); $projects = [ 0 => '--- wybierz projekt ---' ]; if ( is_array( $this -> projects ) ) foreach ( $this -> projects as $project ) { $projects[ $project[ 'id' ] ] = $project[ 'name' ]; if ( (int)$project['client_id'] ) $projects[ $project['id'] ] .= ' (' . \factory\Crm::get_client_name( (int)$project[ 'client_id' ] ) . ')'; } $project_id = $this -> task['project_id'] ? $this -> task[ 'project_id' ] : 0; if ( !$this -> task['id'] and !$project_id ) $project_id = 72; $selected_client_id = isset( $this -> task['client_id'] ) ? (int)$this -> task['client_id'] : 0; $selected_parent_id = isset( $this -> task['parent_id'] ) ? (int)$this -> task['parent_id'] : 0; $clients = [ 0 => '--- wybierz klienta ---' ]; if ( is_array( $this -> clients ) ) foreach ( $this -> clients as $client ) $clients[ $client[ 'id' ] ] = $client[ 'firm' ]; $wiki_categories = ( isset( $this -> wiki_categories ) and is_array( $this -> wiki_categories ) ) ? $this -> wiki_categories : []; $current_user_id = isset( $this -> user['id'] ) ? (int)$this -> user['id'] : 0; if ( !count( $wiki_categories ) and $current_user_id > 0 ) $wiki_categories = \factory\Wiki::get_categories_for_user( $current_user_id ); if ( !count( $wiki_categories ) ) $wiki_categories = \factory\Wiki::get_all_categories(); $task_wiki_ids = isset( $this -> task['wiki_ids'] ) && is_array( $this -> task['wiki_ids'] ) ? array_map( 'intval', $this -> task['wiki_ids'] ) : []; $wiki_values = []; if ( is_array( $wiki_categories ) ) foreach ( $wiki_categories as $wiki_category ) { $wiki_id = isset( $wiki_category['id'] ) ? (int)$wiki_category['id'] : 0; if ( !$wiki_id ) continue; $wiki_values[ $wiki_id ] = isset( $wiki_category['name'] ) ? (string)$wiki_category['name'] : (string)$wiki_id; } $parent_tasks = [ 0 => '--- wybierz zadanie nadrzędne ---' ]; if ( is_array( $this -> parent_tasks ) ) foreach ( $this -> parent_tasks as $parent_task ) $parent_tasks[ $parent_task[ 'id' ] ] = $parent_task[ 'name' ] . ( $parent_task['client'] ? ' - ' . $parent_task['client'] : '' ); $parent_tasks_meta = []; if ( is_array( $this -> parent_tasks ) ) { foreach ( $this -> parent_tasks as $parent_task ) { $parent_task_id = isset( $parent_task['id'] ) ? (int)$parent_task['id'] : 0; if ( !$parent_task_id ) continue; $parent_tasks_meta[ $parent_task_id ] = [ 'project_id' => isset( $parent_task['project_id'] ) ? (int)$parent_task['project_id'] : 0, 'client_id' => isset( $parent_task['client_id'] ) && $parent_task['client_id'] !== null ? (int)$parent_task['client_id'] : 0 ]; } } ob_start(); ?> 'Nazwa', 'name' => 'name', 'id' => 'name', 'value' => $this -> task[ 'name' ], 'class' => 'require', 'inline' => true ] ); ?> 'Treść', 'name' => 'text', 'id' => 'text', 'value' => $this -> task[ 'text' ], 'rows' => 10, 'skip_encoding' => true ] ); ?> 'Data rozpoczęcia', 'name' => 'date_start', 'id' => 'date_start', 'value' => $date_start, 'class' => 'datetime', 'inline' => true, 'autocomplete' => 'off' ]);?> 'Data zakończenia', 'name' => 'date_end', 'id' => 'date_end', 'value' => $date_end, 'class' => 'datetime', 'inline' => true, 'autocomplete' => 'off' ]);?> 'Projekt', 'name' => 'project_id', 'id' => 'project_id', 'value' => $project_id, 'values' => $projects ]);?> 'Klient', 'name' => 'client_id', 'id' => 'client_id', 'value' => $selected_client_id, 'values' => $clients ] ); ?> 'Zadanie nadrzędne', 'name' => 'parent_id', 'id' => 'parent_id', 'value' => $selected_parent_id, 'values' => $parent_tasks ] ); ?>
Brak dostepnych wpisow Wiki.
'Status', 'name' => 'status', 'id' => 'status', 'value' => $this -> task[ 'id' ] ? $this -> task[ 'status' ] : 5, 'values' => \factory\Tasks::get_statuses() ] );?> 'Priorytet', 'name' => 'priority', 'id' => 'priority', 'value' => $this -> task['id'] ? $this -> task['priority'] : 1, 'values' => $this -> priorities ] ); ?> user['id'] == 1 ):?> 'Stawka', 'name' => 'pay_rate', 'id' => 'pay_rate', 'value' => $this -> task[ 'pay_rate' ], 'class' => 'price', 'inline' => true, 'autocomplete' => 'off' ]);?> 'Powiadom o zmianie statusu', 'name' => 'status_change_mail', 'id' => 'status_change_mail', 'checked' => ( $this -> task[ 'status_change_mail' ] or !$this -> task['id'] ) ? true : false, 'type' => 'checkbox' ] ); ?>
users ) ): foreach ( $this -> users as $user ):?>
'Przypomnij x dni przed', 'name' => 'reminders_interval', 'value' => $this -> task[ 'reminders_interval' ], 'inline' => true ] ); ?> 'Powtarzaj', 'name' => 'recursively', 'id' => 'recursively', 'checked' => $this -> task[ 'recursively' ] ? true : false, 'type' => 'checkbox' ] ); ?>
'Powiadom użytkowników mailem', 'name' => 'send_email_notification', 'id' => 'send_email_notification', 'checked' => false, 'type' => 'checkbox' ] ); ?> 'Pokaż w kalendarzu', 'name' => 'show_in_calendar', 'id' => 'show_in_calendar', 'checked' => ( $this -> task[ 'show_in_calendar' ] or !$this -> task['id'] ) ? true : false, 'type' => 'checkbox' ] ); ?> task['id'] ):?>
Usuń zadanie
style="display: none;">
Najpierw zapisz zadanie, aby dodać załączniki.
style="display: none;">
Podstawowe Szczegóły Uczestnicy i automatyzacja Załączniki ()
id = 'task-edit'; $grid -> gdb_opt = $gdb; $grid -> include_plugins = true; $grid -> title = 'Edycja zadania'; $grid -> fields = [ [ 'db' => 'id', 'type' => 'hidden', 'value' => $this -> task[ 'id' ] ] ]; $grid -> external_code = $out; $grid -> actions = [ 'save' => [ 'url' => '/tasks/task_save/', 'back_url' => '/tasks/main_view/' ], 'cancel' => [ 'url' => '/tasks/main_view/' ] ]; $grid -> persist_edit = true; $grid -> id_param = 'id'; echo $grid -> draw(); ?>