diff --git a/codepot/etc/codepot.ini.in b/codepot/etc/codepot.ini.in index 11681a30..633b4ee0 100644 --- a/codepot/etc/codepot.ini.in +++ b/codepot/etc/codepot.ini.in @@ -91,6 +91,11 @@ max_upload_size = "10000" ;------------------------------------------------------------------------------ max_latest_projects = "10" +;------------------------------------------------------------------------------ +; Maximum number of issues to show +;------------------------------------------------------------------------------ +max_issues_per_page = "50" + ;------------------------------------------------------------------------------ ; Maximum number of log entries to show per details page ;------------------------------------------------------------------------------ diff --git a/codepot/src/codepot/controllers/issue.php b/codepot/src/codepot/controllers/issue.php index 8347ff5e..d481dd99 100644 --- a/codepot/src/codepot/controllers/issue.php +++ b/codepot/src/codepot/controllers/issue.php @@ -8,6 +8,24 @@ class Issue extends Controller var $VIEW_EDIT = 'issue_edit'; var $VIEW_DELETE = 'issue_delete'; + var $TYPE_DEFECT = 'defect'; + var $TYPE_REQUEST = 'request'; + var $TYPE_OTHER = 'other'; + + var $STATUS_NEW = 'new'; + var $STATUS_ACCEPTED = 'accepted'; + var $STATUS_REJECTED = 'rejected'; + var $STATUS_FIXED = 'fixed'; + var $STATUS_WONTFIX = 'wontfix'; + var $STATUS_DUPLICATE = 'duplicate'; + var $STATUS_OTHER = 'other'; + + var $PRIORITY_CRITICAL = 'critical'; + var $PRIORITY_HIGH = 'high'; + var $PRIORITY_MEDIUM = 'medium'; + var $PRIORITY_LOW = 'low'; + var $PRIORITY_OTHER = 'other'; + function Issue () { parent::Controller (); @@ -19,10 +37,10 @@ class Issue extends Controller $this->load->library ('Language', 'lang'); $this->lang->load ('common', CODEPOT_LANG); - + $this->lang->load ('issue', CODEPOT_LANG); } - function home ($projectid = '') + function home ($projectid = '', $offset = 0) { $this->load->model ('ProjectModel', 'projects'); $this->load->model ('IssueModel', 'issues'); @@ -49,25 +67,51 @@ class Issue extends Controller { if ($this->input->post('filter')) { - $filter->status = $this->input->post('filter_status'); + $filter->summary = $this->input->post('filter_summary'); $filter->owner = $this->input->post('filter_owner'); $data['filter'] = $filter; } else { - $filter->status = ''; + $filter->summary = ''; $filter->owner = ''; $data['filter'] = $filter; } - $issues = $this->issues->getAll ($login['id'], $project); + + $this->load->library ('pagination'); + + $num_entries = $this->issues->getNumEntries ($login['id'], $project); + if ($num_entries === FALSE) + { + $data['project'] = $project; + $data['message'] = 'DATABASE ERROR'; + $this->load->view ($this->VIEW_ERROR, $data); + return; + } + + $pagecfg['base_url'] = site_url() . "/issue/home/{$projectid}/"; + $pagecfg['total_rows'] = $num_entries; + $pagecfg['per_page'] = CODEPOT_MAX_ISSUES_PER_PAGE; + $pagecfg['uri_segment'] = 4; + $pagecfg['first_link'] = $this->lang->line('First'); + $pagecfg['last_link'] = $this->lang->line('Last'); + + //$issues = $this->issues->getAll ($login['id'], $project); + $issues = $this->issues->getEntries ($login['id'], $offset, $pagecfg['per_page'], $project); if ($issues === FALSE) { + $data['project'] = $project; $data['message'] = 'DATABASE ERROR'; $this->load->view ($this->VIEW_ERROR, $data); } else { + $this->pagination->initialize ($pagecfg); + $data['page_links'] = $this->pagination->create_links (); + $data['issue_type_array'] = $this->_get_type_array(); + $data['issue_status_array'] = $this->_get_status_array(); + $data['issue_priority_array'] = $this->_get_priority_array(); $data['project'] = $project; $data['issues'] = $issues; $this->load->view ($this->VIEW_HOME, $data); @@ -109,7 +153,8 @@ class Issue extends Controller } else { - if ($this->input->post('issue_change')) + $change_post = $this->input->post('issue_change'); + if ($change_post == 'change') { $change->type = $this->input->post('issue_change_type'); $change->status = $this->input->post('issue_change_status'); @@ -117,7 +162,35 @@ class Issue extends Controller $change->priority = $this->input->post('issue_change_priority'); $change->comment = $this->input->post('issue_change_comment'); - if ($this->issues->change ($login['id'], $project, $id, $change) === FALSE) + if (!$login['sysadmin?'] && + $this->projects->projectHasMember($project->id, $login['id']) === FALSE) + { + $data['project'] = $project; + $data['message'] = "NO PERMISSION - $projectid"; + $this->load->view ($this->VIEW_ERROR, $data); + } + else if ($this->issues->change ($login['id'], $project, $id, $change) === FALSE) + { + $data['project'] = $project; + $data['message'] = 'DATABASE ERROR'; + $this->load->view ($this->VIEW_ERROR, $data); + } + else + { + redirect ("/issue/show/{$projectid}/{$hexid}"); + } + return; + } + else if ($change_post == 'undo') + { + if (!$login['sysadmin?'] && + $this->projects->projectHasMember($project->id, $login['id']) === FALSE) + { + $data['project'] = $project; + $data['message'] = "NO PERMISSION - $projectid"; + $this->load->view ($this->VIEW_ERROR, $data); + } + else if ($this->issues->undo_last_change ($login['id'], $project, $id) === FALSE) { $data['project'] = $project; $data['message'] = 'DATABASE ERROR'; @@ -141,12 +214,15 @@ class Issue extends Controller { $data['project'] = $project; $data['message'] = - $this->lang->line('MSG_NO_SUCH_ISSUE') . + $this->lang->line('MSG_NO_SUCH_ISSUE'). " - {$id}"; $this->load->view ($this->VIEW_ERROR, $data); } else { + $data['issue_type_array'] = $this->_get_type_array(); + $data['issue_status_array'] = $this->_get_status_array(); + $data['issue_priority_array'] = $this->_get_priority_array(); $data['project'] = $project; $data['issue'] = $issue; $this->load->view ($this->VIEW_SHOW, $data); @@ -194,21 +270,22 @@ class Issue extends Controller $this->form_validation->set_rules ( 'issue_summary', 'summary', 'required|max_length[255]'); $this->form_validation->set_rules ( - 'issue_status', 'status', 'required'); + 'issue_description', 'description', 'required'); $this->form_validation->set_rules ( 'issue_type', 'type', 'required'); $this->form_validation->set_rules ( - 'issue_priority', 'priority', 'required'); + 'issue_type', 'status', 'required'); $this->form_validation->set_rules ( - 'issue_owner', 'owner', 'required'); - $this->form_validation->set_rules ( - 'issue_description', 'description', 'required'); + 'issue_type', 'priority', 'required'); $this->form_validation->set_error_delimiters ( '',''); $data['mode'] = $mode; $data['message'] = ''; $data['project'] = $project; + $data['issue_type_array'] = $this->_get_type_array(); + $data['issue_status_array'] = $this->_get_status_array(); + $data['issue_priority_array'] = $this->_get_priority_array(); if ($this->input->post('issue')) { @@ -224,7 +301,7 @@ class Issue extends Controller if ($this->form_validation->run()) { $id = ($mode == 'update')? - $this->issues->update ($login['id'], $issue): + $this->issues->update_partial ($login['id'], $issue): $this->issues->create ($login['id'], $issue); if ($id === FALSE) { @@ -234,7 +311,8 @@ class Issue extends Controller } else { - redirect ("issue/show/{$project->id}/{$hexid}"); + redirect ("issue/show/{$project->id}/" . + $this->converter->AsciiToHex((string)$id)); } } else @@ -272,11 +350,11 @@ class Issue extends Controller $issue->projectid = $projectid; $issue->id = $id; $issue->summary = ''; - $issue->type = ''; - $issue->status = ''; - $issue->owner = ''; - $issue->priority = ''; $issue->description = ''; + $issue->type = $this->TYPE_DEFECT; + $issue->status = $this->STATUS_NEW; + $issue->priority = $this->PRIORITY_OTHER; + $issue->owner = ''; $data['issue'] = $issue; $this->load->view ($this->VIEW_EDIT, $data); @@ -286,9 +364,9 @@ class Issue extends Controller } } - function create ($projectid = '', $hexid = '') + function create ($projectid = '') { - return $this->_edit_issue ($projectid, $hexid, 'create'); + return $this->_edit_issue ($projectid, '', 'create'); } function update ($projectid = '', $hexid = '') @@ -396,4 +474,53 @@ class Issue extends Controller } } + + function _get_type_array () + { + return array ( + $this->TYPE_DEFECT => + $this->lang->line('ISSUE_TYPE_DEFECT'), + $this->TYPE_REQUEST => + $this->lang->line('ISSUE_TYPE_REQUEST'), + $this->TYPE_OTHER => + $this->lang->line('ISSUE_TYPE_OTHER') + ); + } + + function _get_status_array () + { + return array ( + $this->STATUS_NEW => + $this->lang->line('ISSUE_STATUS_NEW'), + $this->STATUS_ACCEPTED => + $this->lang->line('ISSUE_STATUS_ACCEPTED'), + $this->STATUS_REJECTED => + $this->lang->line('ISSUE_STATUS_REJECTED'), + $this->STATUS_FIXED => + $this->lang->line('ISSUE_STATUS_FIXED'), + $this->STATUS_WONTFIX => + $this->lang->line('ISSUE_STATUS_WONTFIX'), + $this->STATUS_DUPLICATE => + $this->lang->line('ISSUE_STATUS_DUPLICATE'), + $this->STATUS_OTHER => + $this->lang->line('ISSUE_STATUS_OTHER') + ); + } + + function _get_priority_array () + { + return array ( + $this->PRIORITY_CRITICAL => + $this->lang->line('ISSUE_PRIORITY_CRITICAL'), + $this->PRIORITY_HIGH => + $this->lang->line('ISSUE_PRIORITY_HIGH'), + $this->PRIORITY_MEDIUM => + $this->lang->line('ISSUE_PRIORITY_MEDIUM'), + $this->PRIORITY_LOW => + $this->lang->line('ISSUE_PRIORITY_LOW'), + $this->PRIORITY_OTHER => + $this->lang->line('ISSUE_PRIORITY_OTHER') + ); + + } } diff --git a/codepot/src/codepot/language/english/Makefile.am b/codepot/src/codepot/language/english/Makefile.am index f0ccbfe1..29e89e1f 100644 --- a/codepot/src/codepot/language/english/Makefile.am +++ b/codepot/src/codepot/language/english/Makefile.am @@ -1,6 +1,7 @@ wwwdir=$(WWWDIR)/codepot/language/english www_DATA = \ common_lang.php \ + issue_lang.php \ index.html EXTRA_DIST = $(www_DATA) diff --git a/codepot/src/codepot/language/english/Makefile.in b/codepot/src/codepot/language/english/Makefile.in index c13d97f3..2104536e 100644 --- a/codepot/src/codepot/language/english/Makefile.in +++ b/codepot/src/codepot/language/english/Makefile.in @@ -164,6 +164,7 @@ top_srcdir = @top_srcdir@ wwwdir = $(WWWDIR)/codepot/language/english www_DATA = \ common_lang.php \ + issue_lang.php \ index.html EXTRA_DIST = $(www_DATA) diff --git a/codepot/src/codepot/language/english/common_lang.php b/codepot/src/codepot/language/english/common_lang.php index 44753702..ff609d3a 100644 --- a/codepot/src/codepot/language/english/common_lang.php +++ b/codepot/src/codepot/language/english/common_lang.php @@ -1,9 +1,12 @@ %s from %s to %s"; +$lang['ISSUE_MSG_CONFIRM_UNDO'] = 'Are you sure to undo the last change?'; +?> diff --git a/codepot/src/codepot/language/indonesian/common_lang.php b/codepot/src/codepot/language/indonesian/common_lang.php index 65401686..0bd34c95 100644 --- a/codepot/src/codepot/language/indonesian/common_lang.php +++ b/codepot/src/codepot/language/indonesian/common_lang.php @@ -1,9 +1,12 @@ %s을/를 %s에서 %s(으)로 변경"; +$lang['ISSUE_MSG_CONFIRM_UNDO'] = '마지막 변경내용을 취소할까요?'; + +?> diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index ee8b21b6..4a0a004f 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -29,7 +29,7 @@ class IssueModel extends Model $this->db->where ('projectid', $project->id); $this->db->where ('id', $id); - $this->db->order_by ('sno', 'desc'); + $this->db->order_by ('sno', 'asc'); $query = $this->db->get ('issue_change'); $this->db->trans_complete (); @@ -41,10 +41,41 @@ class IssueModel extends Model return $result[0]; } + function getNumEntries ($userid, $project) + { + $this->db->trans_start (); + + $this->db->where ('projectid', $project->id); + $this->db->select ('count(id) as count'); + $query = $this->db->get ('issue'); + $result = $query->result(); + + $num = empty($result)? 0: $result[0]->count; + + $this->db->trans_complete (); + if ($this->db->trans_status() === FALSE) return FALSE; + + return $num; + } + + function getEntries ($userid, $offset, $limit, $project) + { + $this->db->trans_start (); + + $this->db->where ('projectid', $project->id); + $this->db->order_by ('id', 'desc'); + $query = $this->db->get ('issue', $limit, $offset); + $this->db->trans_complete (); + + if ($this->db->trans_status() === FALSE) return FALSE; + return $query->result (); + } + function getAll ($userid, $project) { $this->db->trans_start (); $this->db->where ('projectid', $project->id); + $this->db->order_by ('id', 'desc'); $query = $this->db->get ('issue'); $this->db->trans_complete (); @@ -111,6 +142,31 @@ class IssueModel extends Model return $newid; } + function update_partial ($userid, $issue) + { + $this->db->trans_start (); + $this->db->where ('projectid', $issue->projectid); + $this->db->where ('id', $issue->id); + $this->db->set ('summary', $issue->summary); + $this->db->set ('description', $issue->description); + $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedby', $userid); + $this->db->update ('issue'); + + $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('type', 'issue'); + $this->db->set ('action', 'update'); + $this->db->set ('projectid', $issue->projectid); + $this->db->set ('userid', $userid); + $this->db->set ('message', $issue->id); + $this->db->insert ('log'); + + $this->db->trans_complete (); + if ($this->db->trans_status() === FALSE) return FALSE; + + return $issue->id; + } + function update ($userid, $issue) { // TODO: check if userid can do this.. @@ -127,9 +183,9 @@ class IssueModel extends Model $this->db->set ('updatedby', $userid); $this->db->update ('issue'); - $this->db->set ('projectid', $issue->projectid); - $this->db->set ('id', $issue->id); - $this->db->set ('sno', 1); + $this->db->where ('projectid', $issue->projectid); + $this->db->where ('id', $issue->id); + $this->db->where ('sno', 1); $this->db->set ('type', $issue->type); $this->db->set ('status', $issue->status); $this->db->set ('owner', $issue->owner); @@ -206,26 +262,95 @@ class IssueModel extends Model return $id; } + function undo_last_change ($userid, $project, $id) + { + $this->db->trans_start (); + + $this->db->where ('projectid', $project->id); + $this->db->where ('id', $id); + $this->db->select ('MAX(sno) as maxsno'); + $query = $this->db->get ('issue_change'); + if ($this->db->trans_status() === FALSE) + { + $this->db->trans_complete (); + return FALSE; + } + $result = $query->result(); + if (!empty($result)) + { + $maxsno = $result[0]->maxsno; + if ($maxsno > 1) + { + $this->db->where ('projectid', $project->id); + $this->db->where ('id', $id); + $this->db->where ('sno', $maxsno); + $this->db->delete ('issue_change'); + + $this->db->where ('projectid', $project->id); + $this->db->where ('id', $id); + $this->db->select ('MAX(sno) as maxsno'); + $query = $this->db->get ('issue_change'); + if ($this->db->trans_status() === FALSE) + { + $this->db->trans_complete (); + return FALSE; + } + $result = $query->result(); + if (!empty($result)) + { + $maxsno = $result[0]->maxsno; + $this->db->where ('projectid', $project->id); + $this->db->where ('id', $id); + $this->db->where ('sno', $maxsno); + $query = $this->db->get ('issue_change'); + if ($this->db->trans_status() === FALSE) + { + $this->db->trans_complete (); + return FALSE; + } + $result = $query->result(); + if (!empty($result)) + { + $change = $result[0]; + $this->db->where ('projectid', $project->id); + $this->db->where ('id', $id); + $this->db->set ('type', $change->type); + $this->db->set ('status', $change->status); + $this->db->set ('owner', $change->owner); + $this->db->set ('priority', $change->priority); + $this->db->set ('updatedon', $change->updatedon); + $this->db->set ('updatedby', $change->updatedby); + $this->db->update ('issue'); + } + } + } + } + + $this->db->trans_complete (); + return $this->db->trans_status(); + } + function delete ($userid, $issue) { // TODO: check if userid can do this.. $this->db->trans_start (); - $this->db->where ('projectid', $issue->projectid); - $this->db->where ('id', $issue->id); - $this->db->delete ('issue'); $this->db->where ('projectid', $issue->projectid); $this->db->where ('id', $issue->id); $this->db->delete ('issue_change'); + $this->db->where ('projectid', $issue->projectid); + $this->db->where ('id', $issue->id); + $this->db->delete ('issue'); + $this->db->set ('createdon', date('Y-m-d H:i:s')); $this->db->set ('type', 'issue'); $this->db->set ('action', 'delete'); $this->db->set ('projectid', $issue->projectid); $this->db->set ('userid', $userid); $this->db->set ('message', $issue->id); - $this->db->insert ('log'); + $this->db->trans_complete (); return $this->db->trans_status(); } diff --git a/codepot/src/codepot/models/logmodel.php b/codepot/src/codepot/models/logmodel.php index 19be0972..26934273 100644 --- a/codepot/src/codepot/models/logmodel.php +++ b/codepot/src/codepot/models/logmodel.php @@ -40,10 +40,11 @@ class LogModel extends Model $this->db->order_by ('createdon', 'desc'); $query = $this->db->get ('log', $limit, $offset); - $result = $query->result (); $this->db->trans_complete (); if ($this->db->trans_status() === FALSE) return FALSE; + $result = $query->result (); + $count = 0; $commits = array (); foreach ($result as $row) diff --git a/codepot/src/codepot/views/file_show.php b/codepot/src/codepot/views/file_show.php index de8a48a5..1c97013c 100644 --- a/codepot/src/codepot/views/file_show.php +++ b/codepot/src/codepot/views/file_show.php @@ -12,7 +12,7 @@ function render_wiki() creole_render_wiki ( "project_file_show_textpre", "project_file_show_textarea", - "/wiki/show/id?>/" + "/wiki/show/id?>/" ); } diff --git a/codepot/src/codepot/views/issue_edit.php b/codepot/src/codepot/views/issue_edit.php index 818ebba0..bef28609 100644 --- a/codepot/src/codepot/views/issue_edit.php +++ b/codepot/src/codepot/views/issue_edit.php @@ -3,7 +3,7 @@ - + <?=htmlspecialchars($issue->id)?> @@ -31,92 +31,79 @@ $this->load->view ( -
+
-'.htmlspecialchars($message).'
'; ?> +'; + print htmlspecialchars($message); + print '
'; + } +?> id}/".$this->converter->AsciiToHex($issue->id))?>
- - id))?> - -
- lang->line('ID').': ', 'issue_id')?> - -
-
- id), 'readonly="readonly"')?> -
- + id))?> + projectid))?> + status))?> + priority))?> + owner))?>
-
+
+ type)); + } + else + { + print form_label($this->lang->line('Type').': ', 'issue_type'); + print form_dropdown ( + 'issue_type', + $issue_type_array, + set_value('issue_type', $issue->type), + 'id="project_issue_type"'); + print form_error('issue_type'); + } + ?> +
+ +
lang->line('Summary').': ', 'issue_summary')?>
- summary), 'size="80"')?> + summary), + 'size="80" id="project_issue_summary"') + ?>
-
+
lang->line('Description').': ', 'issue_description')?>
- description), 'id="issue_description"')?> + 'issue_description', + 'value' => set_value ('issue_description', $issue->description), + 'id' => 'project_issue_description', + 'rows' => 20, + 'cols' => 80 + ); + print form_textarea ($xdata); + ?>
-
-
- lang->line('Type').': ', 'issue_type')?> - -
-
- type), 'id="issue_type"')?> -
-
- -
-
- lang->line('Priority').': ', 'issue_priority')?> - -
-
- priority))?> -
-
- - -
-
- lang->line('Status').': ', 'issue_status')?> - -
-
- status))?> -
-
- -
-
- lang->line('Owner').': ', 'issue_owner')?> - -
-
- owner))?> -
-
- -
- projectid))?> -
- -
+
lang->line('Update'): $this->lang->line('Create'); ?>
@@ -124,7 +111,7 @@ $this->load->view ( -
+
diff --git a/codepot/src/codepot/views/issue_home.php b/codepot/src/codepot/views/issue_home.php index acc89ecb..af438e52 100644 --- a/codepot/src/codepot/views/issue_home.php +++ b/codepot/src/codepot/views/issue_home.php @@ -3,7 +3,7 @@ - + @@ -20,7 +20,7 @@ $( buttons: { 'Ok': function () { $('#filter_owner').val ($('#jq_owner').val()); - $('#filter_status').val ($('#jq_status').val()); + $('#filter_summary').val ($('#jq_status').val()); $(this).dialog('close'); } }, @@ -32,7 +32,7 @@ $( $("#project_issue_home_mainarea_filter_open").button().click ( function () { $('#jq_owner').val ($('#filter_owner').val()); - $('#jq_status').val ($('#filter_status').val()); + $('#jq_status').val ($('#filter_summary').val()); $('#project_issue_home_mainarea_options').dialog('open'); } ); @@ -40,7 +40,7 @@ $( ); -<?=htmlspecialchars($project->id)?> +<?=htmlspecialchars($project->name)?> @@ -76,8 +76,8 @@ $this->load->view ( - lang->line('Status'), 'form_status')?> - status), 'id="filter_status"')?> + lang->line('Summary'), 'form_summary')?> + summary), 'id="filter_summary"')?> @@ -104,21 +104,62 @@ if (empty($issues)) } else { - print '
diff --git a/codepot/src/codepot/views/issue_show.php b/codepot/src/codepot/views/issue_show.php index 2806de51..046e43d8 100644 --- a/codepot/src/codepot/views/issue_show.php +++ b/codepot/src/codepot/views/issue_show.php @@ -3,57 +3,147 @@ - + - <?=htmlspecialchars($issue->id)?> - -
@@ -90,10 +180,39 @@ $this->load->view (
- Reported by createdby)?> on createdon?> | - lang->line('Status') ?>: status)?> | - lang->line('Type') ?>: type)?> - Change + lang->line('Type'); + print ': '; + print htmlspecialchars( + array_key_exists($issue->type, $issue_type_array)? + $issue_type_array[$issue->type]: $issue->type + ); + print ' | '; + + print $this->lang->line('Status'); + print ': '; + print htmlspecialchars( + array_key_exists($issue->status, $issue_status_array)? + $issue_status_array[$issue->status]: $issue->status + ); + print ' | '; + + print $this->lang->line('Priority'); + print ': '; + print htmlspecialchars( + array_key_exists($issue->priority, $issue_priority_array)? + $issue_priority_array[$issue->priority]: $issue->priority + ); + print ' | '; + if ($issue->owner != '') + { + print $this->lang->line('Owner'); + print ': '; + print htmlspecialchars($issue->owner); + print ' | '; + } + ?> + lang->line('Change')?>
@@ -104,66 +223,176 @@ $this->load->view (
"; -foreach ($issue->changes as $change) -{ + $commentno = 0; + + $msgfmt_changed = $this->lang->line ('ISSUE_MSG_CHANGED_X_FROM_Y_TO_Z'); + $count = count($issue->changes); + if ($count > 1) + { + print '
'; + print ''; + print $this->lang->line('Change log'); + print ''; + print ''; + print $this->lang->line('Undo'); + print ''; + print '
'; + } + + print ''; + while ($count > 1) + { + $new = $issue->changes[--$count]; + $old = $issue->changes[$count-1]; + + print ""; - print '
  • '; - print date ('Y-m-d', strtotime($change->updatedon)) . ' ' . htmlspecialchars($change->status); - print ' '; - print htmlspecialchars($change->comment); - print '
  • '; -} -print ""; + print ''; + + print ''; + + print ''; + print ''; + } + print '
    '; + print ''; + print date ('Y-m-d', strtotime($new->updatedon)); + print ''; + print ''; + print htmlspecialchars($new->updatedby); + print ''; + if ($new->comment != "") + { + print "
    "; + print "
    ";
    +			print htmlspecialchars($new->comment);
    +			print '
    '; + print '
    '; + $commentno++; + } + + print '
    '; + print '
      '; + if ($new->type != $old->type) + { + printf ("
    • {$msgfmt_changed}
    • ", + strtolower($this->lang->line('Type')), + htmlspecialchars( + array_key_exists($old->type, $issue_type_array)? + $issue_type_array[$old->type]: $old->type), + htmlspecialchars( + array_key_exists($new->type, $issue_type_array)? + $issue_type_array[$new->type]: $new->type)); + } + + if ($new->status != $old->status) + { + printf ("
    • {$msgfmt_changed}
    • ", + strtolower($this->lang->line('Status')), + htmlspecialchars( + array_key_exists($old->status, $issue_status_array)? + $issue_status_array[$old->status]: $old->status), + htmlspecialchars( + array_key_exists($new->status, $issue_status_array)? + $issue_status_array[$new->status]: $new->status)); + } + + if ($new->priority != $old->priority) + { + printf ("
    • {$msgfmt_changed}
    • ", + strtolower($this->lang->line('Priority')), + htmlspecialchars( + array_key_exists($old->priority, $issue_priority_array)? + $issue_priority_array[$old->priority]: $old->priority), + htmlspecialchars( + array_key_exists($new->priority, $issue_priority_array)? + $issue_priority_array[$new->priority]: $new->priority)); + } + + if ($new->owner != $old->owner) + { + printf ("
    • {$msgfmt_changed}
    • ", + strtolower($this->lang->line('Owner')), + htmlspecialchars($old->owner), htmlspecialchars($new->owner)); + } + print '
    '; + print '
    '; + + print '
    '; ?> +
    - id}/{$hexid}/", 'id="issue"')?> + id}/{$hexid}/", 'id="project_issue_change_form"')?> - +
    - lang->line('Type'), 'issue_change_type')?> - type), 'id="issue_change_type" class="text ui-widget-content ui-corner-all"')?> + lang->line('Type'), + 'issue_change_type') + ?> + type), + 'id="issue_change_type"') + ?> + + lang->line('Status'), + 'issue_change_status') + ?> + status), + 'id="issue_change_status"') + ?> + + lang->line('Priority'), + 'issue_change_priority') + ?> + + priority), + 'id="issue_change_priority"') + ?>
    - lang->line('Status'), 'issue_change_status')?> - status), 'id="issue_change_status" class="text ui-widget-content ui-corner-all"')?> + lang->line('Owner'), + 'issue_change_owner') + ?> + owner), + 'id="issue_change_owner"') + ?>
    - lang->line('Owner'), 'issue_change_owner')?> - owner), 'id="issue_change_owner" class="text ui-widget-content ui-corner-all"')?> -
    - -
    - lang->line('Priority'), 'issue_change_priority')?> - priority), 'id="issue_change_priority" class="text ui-widget-content ui-corner-all"')?> -
    - -
    - + lang->line('Comment'), 'issue_change_comment')?> 'issue_change_comment', 'value' => set_value ('issue_change_comment', ''), 'id' => 'issue_change_comment', - 'rows' => 3, - 'cols' => 80, - 'class' => 'text ui-widget-content ui-corner-all' + 'rows' => 10, + 'cols' => 80 ); print form_textarea ($xdata); ?>
    - -
    +
    + lang->line ('ISSUE_MSG_CONFIRM_UNDO')?> +
    +
    @@ -174,6 +403,32 @@ print ""; + + diff --git a/codepot/src/codepot/views/log.php b/codepot/src/codepot/views/log.php index 40b006f3..a1671e3b 100644 --- a/codepot/src/codepot/views/log.php +++ b/codepot/src/codepot/views/log.php @@ -167,6 +167,7 @@ $this->load->view ( ?> + diff --git a/codepot/src/config.php.in b/codepot/src/config.php.in index 61417066..937fbd0e 100644 --- a/codepot/src/config.php.in +++ b/codepot/src/config.php.in @@ -29,6 +29,7 @@ function load_ini ($file) array ('sysadmin_userids', 'string', ''), array ('max_upload_size', 'string', '10000'), // kbytes array ('max_latest_projects', 'integer', 10), + array ('max_issues_per_page', 'integer', 50), array ('max_logs_per_page', 'integer', 50), array ('max_logs_in_site_home', 'integer', 10), array ('max_logs_in_project_home', 'integer', 5), diff --git a/codepot/src/css/Makefile.am b/codepot/src/css/Makefile.am index d50c1ffb..195d381e 100644 --- a/codepot/src/css/Makefile.am +++ b/codepot/src/css/Makefile.am @@ -3,6 +3,7 @@ SUBDIRS = images wwwdir=$(WWWDIR)/css www_DATA = \ common.css \ + issue.css \ jquery-ui.css \ project.css \ websvn.css diff --git a/codepot/src/css/Makefile.in b/codepot/src/css/Makefile.in index 740df0f6..af205dcd 100644 --- a/codepot/src/css/Makefile.in +++ b/codepot/src/css/Makefile.in @@ -205,6 +205,7 @@ wwwdir = $(WWWDIR)/css SUBDIRS = images www_DATA = \ common.css \ + issue.css \ jquery-ui.css \ project.css \ websvn.css diff --git a/codepot/src/css/common.css b/codepot/src/css/common.css index 0793bb4f..45d64357 100644 --- a/codepot/src/css/common.css +++ b/codepot/src/css/common.css @@ -396,3 +396,7 @@ pre.prettyprint .nocode a:hover { color: red; } +.content span.quoted { + color: #bb2322; + font-style: italic; +} diff --git a/codepot/src/css/issue.css b/codepot/src/css/issue.css new file mode 100644 index 00000000..b77ac495 --- /dev/null +++ b/codepot/src/css/issue.css @@ -0,0 +1,163 @@ + +/*--------------------------------------------- + * issue home + *---------------------------------------------*/ +#project_issue_home_mainarea_result { + overflow: auto; +} + +#project_issue_home_mainarea_result_table { + border-collapse: collapse; + width: 100%; + font-size: inherit; +} + +#project_issue_home_mainarea_result_table td.pages { + padding-top: 1em; + text-align: center; + font-weight: bold; +} + +.project_issue_home_mainarea_result_table_id { + white-space: nowrap; + width: 1px; +} + +.project_issue_home_mainarea_result_table_type { + white-space: nowrap; + width: 1px; +} + +.project_issue_home_mainarea_result_table_status { + white-space: nowrap; + width: 1px; +} + +.project_issue_home_mainarea_result_table_priority { + white-space: nowrap; + width: 1px; +} + +.project_issue_home_mainarea_result_table_owner { + white-space: nowrap; + width: 1px; +} + +.project_issue_home_mainarea_result_table_summary { + white-space: nowrap; +} + + +/*--------------------------------------------- + * issue show + *---------------------------------------------*/ +#project_issue_show_mainarea_change_form { + font-size: .9em; +} + +#project_issue_show_mainarea_change_form div { + padding: 0.3em; +} + +#project_issue_show_mainarea_change_form input { + padding: 1px; +} + +#project_issue_show_mainarea_change_form select { + padding: 1px; +} + +#project_issue_show_mainarea_change_form textarea { + display: block; + padding: 1px; + font-size: inherit; + font-family: inherit; + width: 100%; +} + +#project_issue_show_mainarea_changes { + margin-top: 1em; + padding-top: 0.5em; + padding-bottom: 0.5em; + overflow: auto; +} + +#project_issue_show_mainarea_changes .infostrip { + margin-bottom: 0.5em; +} + +#project_issue_show_mainarea_changes .infostrip .title { + float: left; +} + +#project_issue_show_mainarea_changes_table { + border-collapse: collapse; + width: 100%; + font-size: inherit; +} + +#project_issue_show_mainarea_changes_table td.project_issue_show_mainarea_changes_table_date { + width: 1px; + white-space: nowrap; + vertical-align: top; + padding-top: 0.2em; + padding-bottom: 0.2em; + border-bottom: 1px solid lightgray; +} + +#project_issue_show_mainarea_changes_table td.project_issue_show_mainarea_changes_table_updater { + width: 1px; + white-space: nowrap; + vertical-align: top; + padding-top: 0.2em; + padding-bottom: 0.2em; + border-bottom: 1px solid lightgray; +} + +#project_issue_show_mainarea_changes_table td.project_issue_show_mainarea_changes_table_details { + white-space: nowrap; + vertical-align: top; + padding-top: 0.2em; + padding-bottom: 0.2em; + border-bottom: 1px solid lightgray; +} + +.project_issue_show_mainarea_changes_list { + background-color: #F1F1FF; +} + +.project_issue_show_mainarea_changes_list ul { + list-style: square; +} + +.project_issue_show_mainarea_changes_list ul li { + padding-bottom: 0.3em; +} + +.project_issue_show_mainarea_changes_comment p { + margin-top: 0; +} + + +/*--------------------------------------------- + * issue edit + *---------------------------------------------*/ +#project_issue_edit_mainarea_type { + padding-bottom: 0.3em; +} + +#project_issue_edit_mainarea form textarea { + display: block; + padding: 1px; + font-size: inherit; + font-family: inherit; + width: 100%; +} + +#project_issue_summary { + width: 100%; +} + +#project_issue_edit_mainarea_buttons { + padding-top: 0.5em; +} diff --git a/codepot/src/css/jquery-ui.css b/codepot/src/css/jquery-ui.css index 3a0245b4..289fa223 100644 --- a/codepot/src/css/jquery-ui.css +++ b/codepot/src/css/jquery-ui.css @@ -332,7 +332,7 @@ text-decoration:none; display:block; padding:.2em .4em; - line-height:1.5; + /*line-height:1.5;*/ } .ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active {