From d1420f9c2b595f875c9192975667bf82e0cf598a Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 10 Mar 2010 13:48:48 +0000 Subject: [PATCH] added primitive issue management pages. still far more to be done --- codepot/etc/codepot.sql | 7 +- codepot/src/codepot/config/database.php | 3 +- codepot/src/codepot/controllers/issue.php | 100 +++++++++--------- .../codepot/language/english/common_lang.php | 5 + .../language/indonesian/common_lang.php | 5 + .../codepot/language/korean/common_lang.php | 5 + codepot/src/codepot/models/issuemodel.php | 27 +++-- codepot/src/codepot/views/Makefile.am | 2 + codepot/src/codepot/views/Makefile.in | 2 + codepot/src/codepot/views/error.php | 7 +- codepot/src/codepot/views/issue_delete.php | 72 +++++++++++++ codepot/src/codepot/views/issue_edit.php | 68 ++++++++++-- codepot/src/codepot/views/issue_home.php | 10 +- codepot/src/codepot/views/issue_show.php | 82 ++++++++++++++ codepot/src/codepot/views/log.php | 5 + codepot/src/codepot/views/project_home.php | 5 + codepot/src/codepot/views/site_home.php | 5 + codepot/src/codepot/views/taskbar.php | 2 + codepot/src/codepot/views/wiki_edit.php | 3 +- codepot/src/css/Makefile.am | 2 +- codepot/src/css/Makefile.in | 2 +- codepot/src/css/common.css | 6 +- codepot/src/css/images/Makefile.am | 4 +- codepot/src/css/images/Makefile.in | 4 +- codepot/src/css/images/favicon.ico | Bin 9622 -> 0 bytes codepot/src/css/images/xml.gif | Bin 560 -> 0 bytes codepot/src/js/Makefile.am | 4 +- codepot/src/js/Makefile.in | 2 +- 28 files changed, 349 insertions(+), 90 deletions(-) create mode 100644 codepot/src/codepot/views/issue_delete.php create mode 100644 codepot/src/codepot/views/issue_show.php delete mode 100755 codepot/src/css/images/favicon.ico delete mode 100755 codepot/src/css/images/xml.gif diff --git a/codepot/etc/codepot.sql b/codepot/etc/codepot.sql index e01ea4b6..e5c03548 100644 --- a/codepot/etc/codepot.sql +++ b/codepot/etc/codepot.sql @@ -52,12 +52,12 @@ CREATE TABLE wiki ( CREATE TABLE issue ( projectid VARCHAR(32) NOT NULL, -# id BIGINT NOT NULL AUTO_INCREMENT, id BIGINT NOT NULL, summary VARCHAR(255) NOT NULL, type VARCHAR(32) NOT NULL, status VARCHAR(32) NOT NULL, - assignedto VARCHAR(255) NOT NULL, + owner VARCHAR(255) NOT NULL, + priority VARCHAR(32) NOT NULL, description TEXT NOT NULL, createdon DATETIME, @@ -66,7 +66,8 @@ CREATE TABLE issue ( updatedby VARCHAR(32), PRIMARY KEY (projectid, id), - UNIQUE KEY issue_id (projectid, summary), + KEY issue_status_type_summary (projectid, status, type, summary), + KEY issue_summary (projectid, summary), CONSTRAINT issue_projectid FOREIGN KEY (projectid) REFERENCES project(id) ON DELETE RESTRICT ON UPDATE CASCADE diff --git a/codepot/src/codepot/config/database.php b/codepot/src/codepot/config/database.php index 9d612daa..cab8e01b 100644 --- a/codepot/src/codepot/config/database.php +++ b/codepot/src/codepot/config/database.php @@ -44,7 +44,8 @@ $db['default']['database'] = CODEPOT_DATABASE_NAME; $db['default']['dbdriver'] = CODEPOT_DATABASE_DRIVER; $db['default']['dbprefix'] = CODEPOT_DATABASE_PREFIX; $db['default']['pconnect'] = FALSE; -$db['default']['db_debug'] = FALSE; +//$db['default']['db_debug'] = FALSE; +$db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ""; $db['default']['char_set'] = "utf8"; diff --git a/codepot/src/codepot/controllers/issue.php b/codepot/src/codepot/controllers/issue.php index 2676cf6b..a37d74b7 100644 --- a/codepot/src/codepot/controllers/issue.php +++ b/codepot/src/codepot/controllers/issue.php @@ -62,7 +62,7 @@ class Issue extends Controller } } - function _show_issue ($projectid, $name, $create) + function show ($projectid = '', $id = '') { $this->load->model ('ProjectModel', 'projects'); $this->load->model ('IssueModel', 'issues'); @@ -72,14 +72,14 @@ class Issue extends Controller redirect ('main/signin'); $data['login'] = $login; - if ($name == '') + if ($id == '') { $data['message'] = 'INVALID PARAMETERS'; $this->load->view ($this->VIEW_ERROR, $data); return; } - $name = $this->converter->HexToAscii ($name); + $id = $this->converter->HexToAscii ($id); $project = $this->projects->get ($projectid); if ($project === FALSE) @@ -96,7 +96,7 @@ class Issue extends Controller } else { - $issue = $this->issues->get ($login['id'], $project, $name); + $issue = $this->issues->get ($login['id'], $project, $id); if ($issue === FALSE) { $data['message'] = 'DATABASE ERROR'; @@ -104,18 +104,10 @@ class Issue extends Controller } else if ($issue === NULL) { - if ($create) - { - redirect ("issue/create/{$projectid}/". - $this->converter->AsciiToHex($name)); - } - else - { - $data['message'] = - $this->lang->line('MSG_NO_SUCH_ISSUE') . - " - {$name}"; - $this->load->view ($this->VIEW_ERROR, $data); - } + $data['message'] = + $this->lang->line('MSG_NO_SUCH_ISSUE') . + " - {$id}"; + $this->load->view ($this->VIEW_ERROR, $data); } else { @@ -126,17 +118,7 @@ class Issue extends Controller } } - function show ($projectid = '' , $name = '') - { - $this->_show_issue ($projectid, $name, TRUE); - } - - function show_r ($projectid = '' , $name = '') - { - $this->_show_issue ($projectid, $name, FALSE); - } - - function _edit_issue ($projectid, $name, $mode) + function _edit_issue ($projectid, $id, $mode) { $this->load->helper ('form'); $this->load->library ('form_validation'); @@ -147,7 +129,7 @@ class Issue extends Controller if ($login['id'] == '') redirect ('main'); $data['login'] = $login; - $name = $this->converter->HexToAscii ($name); + $id = $this->converter->HexToAscii ($id); $project = $this->projects->get ($projectid); if ($project === FALSE) @@ -173,9 +155,17 @@ class Issue extends Controller $this->form_validation->set_rules ( 'issue_projectid', 'project ID', 'required|alpha_dash|max_length[32]'); $this->form_validation->set_rules ( - 'issue_name', 'name', 'required|max_length[255]'); + 'issue_summary', 'summary', 'required|max_length[255]'); $this->form_validation->set_rules ( - 'issue_text', 'text', 'required'); + 'issue_status', 'status', 'required'); + $this->form_validation->set_rules ( + 'issue_type', 'type', 'required'); + $this->form_validation->set_rules ( + 'issue_priority', 'priority', 'required'); + $this->form_validation->set_rules ( + 'issue_owner', 'owner', 'required'); + $this->form_validation->set_rules ( + 'issue_description', 'description', 'required'); $this->form_validation->set_error_delimiters ( '',''); @@ -186,15 +176,20 @@ class Issue extends Controller if ($this->input->post('issue')) { $issue->projectid = $this->input->post('issue_projectid'); - $issue->name = $this->input->post('issue_name'); - $issue->text = $this->input->post('issue_text'); + $issue->id = $this->input->post('issue_id'); + $issue->summary = $this->input->post('issue_summary'); + $issue->description = $this->input->post('issue_description'); + $issue->type = $this->input->post('issue_type'); + $issue->status = $this->input->post('issue_status'); + $issue->priority = $this->input->post('issue_priority'); + $issue->owner = $this->input->post('issue_owner'); if ($this->form_validation->run()) { - $result = ($mode == 'update')? + $id = ($mode == 'update')? $this->issues->update ($login['id'], $issue): $this->issues->create ($login['id'], $issue); - if ($result === FALSE) + if ($id === FALSE) { $data['message'] = 'DATABASE ERROR'; $data['issue'] = $issue; @@ -202,8 +197,8 @@ class Issue extends Controller } else { - redirect ('issue/show/' . $project->id . '/' . - $this->converter->AsciiToHex($issue->name)); + redirect ("issue/show/{$project->id}/" . + $this->converter->AsciiToHex((string)$id)); } } else @@ -217,7 +212,7 @@ class Issue extends Controller { if ($mode == 'update') { - $issue = $this->issues->get ($login['id'], $project, $name); + $issue = $this->issues->get ($login['id'], $project, $id); if ($issue === FALSE) { $data['message'] = 'DATABASE ERROR'; @@ -227,7 +222,7 @@ class Issue extends Controller { $data['message'] = $this->lang->line('MSG_NO_SUCH_ISSUE') . - " - {$name}"; + " - {$id}"; $this->load->view ($this->VIEW_ERROR, $data); } else @@ -239,8 +234,13 @@ class Issue extends Controller else { $issue->projectid = $projectid; - $issue->name = $name; - $issue->text = ''; + $issue->id = $id; + $issue->summary = ''; + $issue->type = ''; + $issue->status = ''; + $issue->owner = ''; + $issue->priority = ''; + $issue->description = ''; $data['issue'] = $issue; $this->load->view ($this->VIEW_EDIT, $data); @@ -250,17 +250,17 @@ class Issue extends Controller } } - function create ($projectid = '', $name = '') + function create ($projectid = '', $id = '') { - return $this->_edit_issue ($projectid, $name, 'create'); + return $this->_edit_issue ($projectid, $id, 'create'); } - function update ($projectid = '', $name = '') + function update ($projectid = '', $id = '') { - return $this->_edit_issue ($projectid, $name, 'update'); + return $this->_edit_issue ($projectid, $id, 'update'); } - function delete ($projectid = '', $name = '') + function delete ($projectid = '', $id = '') { $this->load->helper ('form'); $this->load->library ('form_validation'); @@ -271,7 +271,7 @@ class Issue extends Controller if ($login['id'] == '') redirect ('main'); $data['login'] = $login; - $name = $this->converter->HexToAscii ($name); + $id = $this->converter->HexToAscii ($id); $project = $this->projects->get ($projectid); if ($project === FALSE) @@ -303,7 +303,7 @@ class Issue extends Controller if($this->input->post('issue')) { $issue->projectid = $this->input->post('issue_projectid'); - $issue->name = $this->input->post('issue_name'); + $issue->id = $this->input->post('issue_id'); $data['issue_confirm'] = $this->input->post('issue_confirm'); if ($this->form_validation->run()) @@ -325,7 +325,7 @@ class Issue extends Controller else { redirect ("issue/show/{$project->id}/" . - $this->converter->AsciiToHex($issue->name)); + $this->converter->AsciiToHex($issue->id)); } } else @@ -337,7 +337,7 @@ class Issue extends Controller } else { - $issue = $this->issues->get ($login['id'], $project, $name); + $issue = $this->issues->get ($login['id'], $project, $id); if ($issue === FALSE) { $data['message'] = 'DATABASE ERROR'; @@ -347,7 +347,7 @@ class Issue extends Controller { $data['message'] = $this->lang->line('MSG_NO_SUCH_ISSUE') . - " - {$name}"; + " - {$id}"; $this->load->view ($this->VIEW_ERROR, $data); } else diff --git a/codepot/src/codepot/language/english/common_lang.php b/codepot/src/codepot/language/english/common_lang.php index ccfa1ec3..44753702 100644 --- a/codepot/src/codepot/language/english/common_lang.php +++ b/codepot/src/codepot/language/english/common_lang.php @@ -39,8 +39,10 @@ $lang['Last updated on'] = 'Last updated on'; $lang['Latest projects'] = 'Latest projects'; $lang['Other projects'] = 'Other projects'; $lang['Overview'] = 'Overview'; +$lang['Owner'] = 'Owner'; $lang['Password'] = 'Password'; $lang['Path'] = 'Path'; +$lang['Priority'] = 'Priority'; $lang['Project'] = 'Project'; $lang['Projects'] = 'Projects'; $lang['Repository'] = 'Repository'; @@ -49,11 +51,13 @@ $lang['Sign in'] = 'Sign in'; $lang['Sign out'] = 'Sign out'; $lang['Size'] = 'Size'; $lang['Source'] = 'Source'; +$lang['Status'] = 'Status'; $lang['Summary'] = 'Summary'; $lang['System'] = 'System'; $lang['Tag'] = 'Tag'; $lang['Text'] = 'Text'; $lang['Time'] = 'Time'; +$lang['Type'] = 'Type'; $lang['Update'] = 'Update'; $lang['Username'] = 'Username'; $lang['Wiki'] = 'Wiki'; @@ -69,6 +73,7 @@ $lang['MSG_NO_DIFF'] = 'No difference found'; $lang['MSG_NO_CODE_AVAIL'] = 'No source code available'; $lang['MSG_NO_FILES_AVAIL'] = 'No files available'; $lang['MSG_NO_ISSUES_AVAIL'] = 'No outstanding issues'; +$lang['MSG_NO_SUCH_ISSUE'] = 'No such issue'; $lang['MSG_NO_SUCH_PROJECT'] = 'No such project'; $lang['MSG_NO_SUCH_WIKI_PAGE'] = 'No such wiki page'; $lang['MSG_NO_WIKIS_AVAIL'] = 'No wiki pages available'; diff --git a/codepot/src/codepot/language/indonesian/common_lang.php b/codepot/src/codepot/language/indonesian/common_lang.php index 7cdb095c..65401686 100644 --- a/codepot/src/codepot/language/indonesian/common_lang.php +++ b/codepot/src/codepot/language/indonesian/common_lang.php @@ -39,8 +39,10 @@ $lang['Last updated on'] = 'Waktu memperbaharui terakhir'; $lang['Latest projects'] = 'Proyek terakhir'; $lang['Other projects'] = 'Proyek lain'; $lang['Overview'] = 'Ringkasan'; +$lang['Owner'] = 'Owner'; $lang['Password'] = 'Kata sandi'; $lang['Path'] = 'Path'; +$lang['Priority'] = 'Pirority'; $lang['Project'] = 'Proyek'; $lang['Projects'] = 'Proyek'; $lang['Repository'] = 'Repository'; @@ -49,11 +51,13 @@ $lang['Sign in'] = 'Masuk'; $lang['Sign out'] = 'Keluar'; $lang['Size'] = 'Ukuran'; $lang['Source'] = 'Sumber'; +$lang['Status'] = 'Status'; $lang['Summary'] = 'Rangkuman'; $lang['System'] = 'Sistem'; $lang['Tag'] = 'Label'; $lang['Text'] = 'Teks'; $lang['Time'] = 'Waktu'; +$lang['Type'] = 'Type'; $lang['Update'] = 'Memperbaharui'; $lang['Username'] = 'Nama pemakai'; $lang['Wiki'] = 'Wiki'; @@ -68,6 +72,7 @@ $lang['MSG_NO_DIFF'] = 'Tidak ada bedanya'; $lang['MSG_NO_CODE_AVAIL'] = 'Tidak ada kode sumber tersedia'; $lang['MSG_NO_FILES_AVAIL'] = 'Tidak ada file tersedia'; $lang['MSG_NO_ISSUES_AVAIL'] = 'Tidak ada issue'; +$lang['MSG_NO_SUCH_ISSUE'] = 'No such issue'; $lang['MSG_NO_SUCH_PROJECT'] = 'No such project'; $lang['MSG_NO_SUCH_WIKI_PAGE'] = 'No such wiki page'; $lang['MSG_NO_WIKIS_AVAIL'] = 'Tidak ada halaman wiki tersedia'; diff --git a/codepot/src/codepot/language/korean/common_lang.php b/codepot/src/codepot/language/korean/common_lang.php index 77b63f80..9cd187af 100644 --- a/codepot/src/codepot/language/korean/common_lang.php +++ b/codepot/src/codepot/language/korean/common_lang.php @@ -39,8 +39,10 @@ $lang['Last updated on'] = '최종수정시간'; $lang['Latest projects'] = '최근 프로젝트'; $lang['Other projects'] = '다른 프로젝트'; $lang['Overview'] = '개요'; +$lang['Owner'] = '소유자'; $lang['Password'] = '패스워드'; $lang['Path'] = '경로'; +$lang['Priority'] = '중요도'; $lang['Project'] = '프로젝트'; $lang['Projects'] = '프로젝트'; $lang['Repository'] = '저장소'; @@ -48,12 +50,14 @@ $lang['Revision'] = '리비전'; $lang['Sign in'] = '로그인'; $lang['Sign out'] = '로그아웃'; $lang['Size'] = '크기'; +$lang['Status'] = '상태'; $lang['Source'] = '소스'; $lang['Summary'] = '요약'; $lang['System'] = '시스템'; $lang['Tag'] = '태그'; $lang['Text'] = '본문'; $lang['Time'] = '시간'; +$lang['Type'] = '종류'; $lang['Update'] = '수정'; $lang['Username'] = '사용자명'; $lang['Wiki'] = '위키'; @@ -68,6 +72,7 @@ $lang['MSG_NO_DIFF'] = '차이점이 없습니다'; $lang['MSG_NO_CODE_AVAIL'] = '소스코드가 없습니다'; $lang['MSG_NO_FILES_AVAIL'] = '파일이 없습니다'; $lang['MSG_NO_ISSUES_AVAIL'] = '이슈항목이 없습니다'; +$lang['MSG_NO_SUCH_ISSUE'] = '이슈항목이 없습니다'; $lang['MSG_NO_SUCH_PROJECT'] = '프로젝트가 없습니다'; $lang['MSG_NO_SUCH_WIKI_PAGE'] = '위키페이지가 없습니다'; $lang['MSG_NO_WIKIS_AVAIL'] = '사용가능한 위키페이지가 없습니다'; diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index d75e7a83..052068c6 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -37,12 +37,23 @@ class IssueModel extends Model { // TODO: check if userid can do this.. $this->db->trans_start (); + + $this->db->where ('projectid', $issue->projectid); + $this->db->select ('MAX(id) as maxid'); + $query = $this->db->get ('issue'); + $result = $query->result(); + $maxid = (empty($result) || $result[0] == NULL)? 0: $result[0]->maxid; + + $newid = $maxid + 1; + $this->db->set ('projectid', $issue->projectid); + $this->db->set ('id', $newid); $this->db->set ('summary', $issue->summary); $this->db->set ('type', $issue->type); $this->db->set ('status', $issue->status); + $this->db->set ('owner', $issue->owner); + $this->db->set ('priority', $issue->priority); $this->db->set ('description', $issue->description); - $this->db->set ('assignedto', $issue->assignedto); $this->db->set ('createdon', date('Y-m-d H:i:s')); $this->db->set ('updatedon', date('Y-m-d H:i:s')); $this->db->set ('createdby', $userid); @@ -54,12 +65,13 @@ class IssueModel extends Model $this->db->set ('action', 'create'); $this->db->set ('projectid', $issue->projectid); $this->db->set ('userid', $userid); - //$this->db->set ('message', 'LAST_INSERT_ID()'); - $this->db->set ('message', 'CONVERT(LAST_INSERT_ID(),CHAR)'); + $this->db->set ('message', $newid); $this->db->insert ('log'); $this->db->trans_complete (); - return $this->db->trans_status(); + if ($this->db->trans_status() === FALSE) return FALSE; + + return $newid; } function update ($userid, $issue) @@ -72,7 +84,8 @@ class IssueModel extends Model $this->db->set ('type', $issue->type); $this->db->set ('status', $issue->status); $this->db->set ('description', $issue->description); - $this->db->set ('assignedto', $issue->assignedto); + $this->db->set ('owner', $issue->owner); + $this->db->set ('priority', $issue->priority); $this->db->set ('updatedon', date('Y-m-d H:i:s')); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); @@ -86,7 +99,9 @@ class IssueModel extends Model $this->db->insert ('log'); $this->db->trans_complete (); - return $this->db->trans_status(); + if ($this->db->trans_status() === FALSE) return FALSE; + + return $issue->id; } function delete ($userid, $issue) diff --git a/codepot/src/codepot/views/Makefile.am b/codepot/src/codepot/views/Makefile.am index 705696cc..a18b003f 100644 --- a/codepot/src/codepot/views/Makefile.am +++ b/codepot/src/codepot/views/Makefile.am @@ -13,8 +13,10 @@ www_DATA = \ file_show.php \ footer.php \ index.html \ + issue_delete.php \ issue_edit.php \ issue_home.php \ + issue_show.php \ log.php \ login.php \ project_delete.php \ diff --git a/codepot/src/codepot/views/Makefile.in b/codepot/src/codepot/views/Makefile.in index 4036304e..ed66e5da 100644 --- a/codepot/src/codepot/views/Makefile.in +++ b/codepot/src/codepot/views/Makefile.in @@ -176,8 +176,10 @@ www_DATA = \ file_show.php \ footer.php \ index.html \ + issue_delete.php \ issue_edit.php \ issue_home.php \ + issue_show.php \ log.php \ login.php \ project_delete.php \ diff --git a/codepot/src/codepot/views/error.php b/codepot/src/codepot/views/error.php index d8d5fc8d..944776e8 100644 --- a/codepot/src/codepot/views/error.php +++ b/codepot/src/codepot/views/error.php @@ -20,11 +20,14 @@ load->view ( 'projectbar', array ( - 'site' => NULL, - 'project' => NULL, + 'site' => $site, + 'project' => $project, 'pageid' => '', 'ctxmenuitems' => array () ) diff --git a/codepot/src/codepot/views/issue_delete.php b/codepot/src/codepot/views/issue_delete.php new file mode 100644 index 00000000..39143392 --- /dev/null +++ b/codepot/src/codepot/views/issue_delete.php @@ -0,0 +1,72 @@ + + + + + + +<title><?=htmlspecialchars($issue->id)?> + + + + +
+ + + +load->view ('taskbar'); ?> + + + +load->view ( + 'projectbar', + array ( + 'site' => NULL, + 'pageid' => 'issue', + 'ctxmenuitems' => array () + ) +); +?> + + + +
+ +'.htmlspecialchars($message).'
'; ?> + +id}/".$this->converter->AsciiToHex($issue->id))?> + +
+
+ + lang->line('MSG_SURE_TO_DELETE_THIS')?> - id)?> + +
+
+ +
+ projectid))?> + id))?> +
+ +
+ lang->line('Delete'))?> +
+ + + + +
+ + + + +load->view ('footer'); ?> + + + + + + + + diff --git a/codepot/src/codepot/views/issue_edit.php b/codepot/src/codepot/views/issue_edit.php index 3b679548..b1f19aad 100644 --- a/codepot/src/codepot/views/issue_edit.php +++ b/codepot/src/codepot/views/issue_edit.php @@ -4,7 +4,8 @@ -<?=htmlspecialchars($issue->name)?> + +<?=htmlspecialchars($issue->id)?> @@ -18,7 +19,6 @@ converter->AsciiToHex ($issue->name); $this->load->view ( 'projectbar', array ( @@ -35,29 +35,79 @@ $this->load->view ( '.htmlspecialchars($message).''; ?> -id.'/'.$this->converter->AsciiToHex($issue->name))?> +id}/".$this->converter->AsciiToHex($issue->id))?>
- lang->line('Name').': ', 'issue_name')?> - + lang->line('ID').': ', 'issue_id')?> +
- name), $extra)?> + id), $extra)?>
- lang->line('Text').': ', 'issue_text')?> - + lang->line('Summary').': ', 'issue_summary')?> +
- text))?> + summary))?> +
+
+ +
+
+ lang->line('Description').': ', 'issue_description')?> + +
+
+ description), 'id="issue_description"')?> +
+
+ +
+
+ lang->line('Type').': ', 'issue_type')?> + +
+
+ type), 'id="issue_type"')?> +
+
+ +
+
+ lang->line('Status').': ', 'issue_status')?> + +
+
+ status))?> +
+
+ +
+
+ lang->line('Priority').': ', 'issue_priority')?> + +
+
+ priority))?> +
+
+ +
+
+ lang->line('Owner').': ', 'issue_owner')?> + +
+
+ owner))?>
diff --git a/codepot/src/codepot/views/issue_home.php b/codepot/src/codepot/views/issue_home.php index a2350703..037182a5 100644 --- a/codepot/src/codepot/views/issue_home.php +++ b/codepot/src/codepot/views/issue_home.php @@ -4,7 +4,7 @@ -<?=htmlspecialchars($project->name)?> +<?=htmlspecialchars($project->id)?> @@ -46,8 +46,12 @@ else print ''; } diff --git a/codepot/src/codepot/views/issue_show.php b/codepot/src/codepot/views/issue_show.php new file mode 100644 index 00000000..d06ea682 --- /dev/null +++ b/codepot/src/codepot/views/issue_show.php @@ -0,0 +1,82 @@ + + + + + + + +<?=htmlspecialchars($issue->id)?> + + + + + + +
+ + + +load->view ('taskbar'); ?> + + + +converter->AsciiToHex ($issue->id); +$this->load->view ( + 'projectbar', + array ( + 'site' => NULL, + 'pageid' => 'issue', + 'ctxmenuitems' => array ( + array ("issue/create/{$project->id}", $this->lang->line('New')), + array ("issue/update/{$project->id}/{$hexname}", $this->lang->line('Edit')), + array ("issue/delete/{$project->id}/{$hexname}", $this->lang->line('Delete')) + ) + ) +); +?> + + + + +
+
+ lang->line('Issue')?> id)?>: + summary)?> +
+ +
+ Reported by createdby)?> on createdon?> | + lang->line('Status') ?>: status)?> | + lang->line('Type') ?>: type)?> +
+ +
+ +
+ +
+ + + +load->view ('footer'); ?> + + + +
+ + + + + diff --git a/codepot/src/codepot/views/log.php b/codepot/src/codepot/views/log.php index 297e3bd7..cec39733 100644 --- a/codepot/src/codepot/views/log.php +++ b/codepot/src/codepot/views/log.php @@ -133,6 +133,11 @@ $this->load->view ( $hex = $this->converter->AsciiToHex ($log['message']); $uri = "/file/show/{$log['projectid']}/{$hex}"; } + else if ($log['type'] == 'issue') + { + $hex = $this->converter->AsciiToHex ($log['message']); + $uri = "/issue/show/{$log['projectid']}/{$hex}"; + } $trimmed = preg_replace("/(.{10}).+/u", "$1…", $log['message']); if ($uri != '') diff --git a/codepot/src/codepot/views/project_home.php b/codepot/src/codepot/views/project_home.php index cd5fdf45..73bdc5d6 100644 --- a/codepot/src/codepot/views/project_home.php +++ b/codepot/src/codepot/views/project_home.php @@ -147,6 +147,11 @@ $this->load->view ( $hex = $this->converter->AsciiToHex ($log['message']); $uri = "/file/show/{$log['projectid']}/{$hex}"; } + else if ($log['type'] == 'issue') + { + $hex = $this->converter->AsciiToHex ($log['message']); + $uri = "/issue/show/{$log['projectid']}/{$hex}"; + } $trimmed = preg_replace("/(.{20}).+/u", "$1…", $log['message']); if ($uri != '') diff --git a/codepot/src/codepot/views/site_home.php b/codepot/src/codepot/views/site_home.php index 3794965f..e5777fed 100644 --- a/codepot/src/codepot/views/site_home.php +++ b/codepot/src/codepot/views/site_home.php @@ -160,6 +160,11 @@ foreach ($latest_projects as $project) $hex = $this->converter->AsciiToHex ($log['message']); $uri = "/file/show/{$log['projectid']}/{$hex}"; } + else if ($log['type'] == 'issue') + { + $hex = $this->converter->AsciiToHex ($log['message']); + $uri = "/issue/show/{$log['projectid']}/{$hex}"; + } $trimmed = preg_replace("/(.{15}).+/u", "$1…", $log['message']); if ($uri != '') diff --git a/codepot/src/codepot/views/taskbar.php b/codepot/src/codepot/views/taskbar.php index a90952e9..a26091ee 100644 --- a/codepot/src/codepot/views/taskbar.php +++ b/codepot/src/codepot/views/taskbar.php @@ -39,8 +39,10 @@ function show_taskbar ($con, $loginid, $issysadmin) print '
'; print anchor ('site/home', $con->lang->line('Home')); print anchor ('site/projectlist', $con->lang->line('Projects')); + /* if ($issysadmin) print anchor ('site/admin', $con->lang->line('System')); + */ print '
'; print ''; diff --git a/codepot/src/codepot/views/wiki_edit.php b/codepot/src/codepot/views/wiki_edit.php index d23b93d4..d96d8e13 100644 --- a/codepot/src/codepot/views/wiki_edit.php +++ b/codepot/src/codepot/views/wiki_edit.php @@ -18,7 +18,6 @@ converter->AsciiToHex ($wiki->name); $this->load->view ( 'projectbar', array ( @@ -35,7 +34,7 @@ $this->load->view ( '.htmlspecialchars($message).''; ?> -id.'/'.$this->converter->AsciiToHex($wiki->name))?> +id}/".$this->converter->AsciiToHex($wiki->name))?>
diff --git a/codepot/src/css/Makefile.am b/codepot/src/css/Makefile.am index 4f77d85f..1e35de34 100644 --- a/codepot/src/css/Makefile.am +++ b/codepot/src/css/Makefile.am @@ -4,7 +4,7 @@ wwwdir=$(WWWDIR)/css www_DATA = \ common.css \ project.css \ - websvn.css + websvn.css EXTRA_DIST = $(www_DATA) diff --git a/codepot/src/css/Makefile.in b/codepot/src/css/Makefile.in index 1d8c53da..b38bb121 100644 --- a/codepot/src/css/Makefile.in +++ b/codepot/src/css/Makefile.in @@ -206,7 +206,7 @@ SUBDIRS = images www_DATA = \ common.css \ project.css \ - websvn.css + websvn.css EXTRA_DIST = $(www_DATA) all: all-recursive diff --git a/codepot/src/css/common.css b/codepot/src/css/common.css index c170639a..0793bb4f 100644 --- a/codepot/src/css/common.css +++ b/codepot/src/css/common.css @@ -80,12 +80,12 @@ body { .content .projectbar .ctxmenu { float: right; - padding-top: 0.1em 0em 0.1em 0em; + padding: 0.1em 0em 0.1em 0em; } .content .projectbar .fixedmenu { float: none; - padding-top: 0.1em 0em 0.1em 0em; + padding: 0.1em 0em 0.1em 0em; } .content .projectbar a { @@ -236,7 +236,7 @@ body { } .content .mainarea table tr td.code { - white-space: nowarp; + white-space: nowrap; } .content .mainarea table tr td.code pre { diff --git a/codepot/src/css/images/Makefile.am b/codepot/src/css/images/Makefile.am index 1302a03b..edf2531d 100644 --- a/codepot/src/css/images/Makefile.am +++ b/codepot/src/css/images/Makefile.am @@ -14,7 +14,6 @@ www_DATA = \ diff.png \ e-node.png \ exclamation.png \ - favicon.ico \ file.png \ filec.png \ filedb.png \ @@ -39,8 +38,7 @@ www_DATA = \ textbg.png \ toggledown.png \ toggleup.png \ - up.png \ - xml.gif + up.png EXTRA_DIST = $(www_DATA) diff --git a/codepot/src/css/images/Makefile.in b/codepot/src/css/images/Makefile.in index e9aac521..b562eee3 100644 --- a/codepot/src/css/images/Makefile.in +++ b/codepot/src/css/images/Makefile.in @@ -177,7 +177,6 @@ www_DATA = \ diff.png \ e-node.png \ exclamation.png \ - favicon.ico \ file.png \ filec.png \ filedb.png \ @@ -202,8 +201,7 @@ www_DATA = \ textbg.png \ toggledown.png \ toggleup.png \ - up.png \ - xml.gif + up.png EXTRA_DIST = $(www_DATA) all: all-am diff --git a/codepot/src/css/images/favicon.ico b/codepot/src/css/images/favicon.ico deleted file mode 100755 index aed45c922eedefc553c1b7db9f562d21fc2b527b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9622 zcmeHL3s_WT8vfkvX?uoh^?3{xx0Tfmt$iMsT#9O4*TiTmbJiE~aK>nYDH?aw{&5q9P~)qM=+AydXFr$n5+5=Q8IEGdOOt?$h$kyyySV zcl-bUJLi1=g{T)@PrZBhCZ=J%h^C>GZz=kxM9aYQ^_AqcKOwqs9pAGy(S{p{j{Jx=p$2U;4>*v>W79ok*?)qA_&UgFO1qODmKL9J}ZW|*`#oojBWt=|7_@yA(tne$Wy zRJ8h9e$j`o*Br=eYq8Rb7;eC%Esu)h+|5T1l0?n^P-xeuQu#Ziqv7 zzpqL#ujCsO8A3MX@5~n%4Ji4@jNGPBcjY6+zo(^=zoZ;wwW9kj17c5Oos(F(cv#QQQ3}nfz5=ZM@Yw1{`CjI7OG(EWPAvGL`VJwe6tn!n2;~2 z^1DyyXzr)LKj~;5V>=zo|BR5&2{R(_B~@8>P}T0Q2s0{SLLtm>R9*BPkV{DVR8yQ! z$kkL^vWqZ@5fUjO`_sw8g}`1qRkjbwYcp7_Isn5viYuL>*BYQJPZ!hWGGCmO+melA#uiFRqmF;xJjUj7U!?F}u zyLfKw)bMfl4fnZGqccg!^_Q$=^JYayhK+w<%-C?Yyowa%=QHrv{`Wl`HhIR&iRli< z95JRSP1g(tZ@;^OCOq-3?NCu6F1u zRcy*pf^H!yt@CxORaq{@tg{45XF)F9iTwZ;$ht+eyi7K+kxtUyE<|D-?zE_uY}`vk z7i@AfvLCq}ZpJ3nbysN%;i6~mTQLb=>Lx^Wr`e6zjM^ay12&RK5o+`mQMZ*mbp4)3 zYDyirDl`d!K2*Fhl8&fcJrHRedJ8Ei!j~(7+o+43l=D_mICK9zWQjTy^?~4gjR&K= z5Dq?{ys^=Ko?1_8!!#(?9%{TEQs(QK~{t*qiTZWSG+@wGHb+KP}-Ujh5$&wa7Ie3_M z^XjbSxEK23lK%1&qXs$zZfZmSFmc+PRjSpJ=RDAGl}ut;)&FO@VxN+Yw*UQ8ljOlHefH14@u;0& zKKzW5yV72HGH8e=MuYzJ^dco{X{M+Ca`)xavB78blXK;)f-bH$yB>j_+vm>5rYqT4 nFX`g0Uts9;1(}v^ndJVDo$5AC9^6Qw>e-(<$H9Zpxm5W#?`yxc diff --git a/codepot/src/css/images/xml.gif b/codepot/src/css/images/xml.gif deleted file mode 100755 index e97740a8ece99be8e567b2a2f74d7101905539bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 560 zcmZ?wbhEHbN&(HmsVexCW<@f0pzvo*0UhMXJUEI&rvA@^H|J<1M zYkS$R9c90FmH#=={Cj`%zfaHp|NQ*#$EVNzX5Xfmf1PUmb(-Cm$+q8T+JBqv@^D7T zgXtmPR%d+QRQh9Q>&u=QznSXde8 zsfmk;N;Ns!TI(nai!d>>O1n4(2b(EKPGx0Lx6(G%QVbSgU#Mbepra`x!Xqfip`xp= zr#xGLms3#5$lOv*SdyP1m|Hg3-q}@Lgo}?&KuOoZ!_!NQNibMmF4)dJ*vC(TnNdi? mIM~fQIM7#Wjjp+~r%ynTO^CGDk&20nJA~Bz|FJSLSOWm5-pNJ) diff --git a/codepot/src/js/Makefile.am b/codepot/src/js/Makefile.am index 9467203f..58e39de1 100644 --- a/codepot/src/js/Makefile.am +++ b/codepot/src/js/Makefile.am @@ -1,8 +1,8 @@ SUBDIRS = prettify wwwdir=$(WWWDIR)/js -www_DATA = \ - creole.js +www_DATA = \ + creole.js EXTRA_DIST = $(www_DATA) diff --git a/codepot/src/js/Makefile.in b/codepot/src/js/Makefile.in index 296cb84a..2c9187b0 100644 --- a/codepot/src/js/Makefile.in +++ b/codepot/src/js/Makefile.in @@ -204,7 +204,7 @@ top_srcdir = @top_srcdir@ wwwdir = $(WWWDIR)/js SUBDIRS = prettify www_DATA = \ - creole.js + creole.js EXTRA_DIST = $(www_DATA) all: all-recursive