"; $ret .= __("역할은 '프로젝트 멤버' 탭에서 생성할 수 있습니다.","ajtodo"); $ret .= ""; return $ret; } public function todotypeListView(){ $ret = ""; $ret .= "
"; return $ret; } private function getTodoCountByTodoType($key){ global $wpdb; return $wpdb->get_var("select count(id) from ".AJTODO_DB_TODO."_".$this->project->id." where todotype = '".$key."'"); } public function delTodoType($key){ global $wpdb; $delindex = -1; for($i = 0; $i < count($this->project->todotype) ; $i++){ if($this->project->todotype[$i]["key"] == $key){ $delindex = $i; } } if($delindex != -1){ array_splice($this->project->todotype, $delindex, 1); } $ret = $this->project->updateCols( array( "todotype" => json_encode($this->project->todotype, JSON_UNESCAPED_UNICODE)) ); if($ret) do_action('ajtodo_del_todotype', $this->project->id); return $ret; } public function createFormPart($title){ $ret = ""; $ret .= "| "; $ret .= " | ".__("할일 타입 이름","ajtodo")." | "; $ret .= "".__("할일 개수","ajtodo")." | "; $ret .= "".__("기본 사용","ajtodo")." | "; if(!$this->project->donedate){ $ret .= "".__("관리","ajtodo")." | "; } $ret .= "
|---|---|---|---|---|
| "; $ret .= " | ".$todotype["name"]." | "; $ret .= "".$this->getTodoCountByTodoType($todotype["key"])." | "; $ret .= "".($todotype["default"] == "Y" ? __("기본","ajtodo") : __("","ajtodo"))." | "; if(!$this->project->donedate){ $ret .= ""; $ret .= " ".__('수정', 'ajtodo' ).""; if($todotype["default"] != "Y"){ $ret .= " ".__('삭제', 'ajtodo' ).""; } } $ret .= " | "; $ret .= "