enhanced the wiki controller

renamed 'source' to 'code'
created the incomplete issue controller.
This commit is contained in:
hyung-hwan 2010-03-08 13:51:36 +00:00
parent c9e6b622c4
commit d9121598aa
30 changed files with 1016 additions and 247 deletions

View File

@ -50,6 +50,27 @@ CREATE TABLE wiki (
ON DELETE RESTRICT ON UPDATE CASCADE
) charset=utf8 engine=InnoDB;
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,
description TEXT NOT NULL,
createdon DATETIME,
updatedon DATETIME,
createdby VARCHAR(32),
updatedby VARCHAR(32),
PRIMARY KEY (projectid, id),
UNIQUE KEY issue_id (projectid, summary),
CONSTRAINT issue_projectid FOREIGN KEY (projectid) REFERENCES project(id)
ON DELETE RESTRICT ON UPDATE CASCADE
) charset=utf8 engine=InnoDB;
CREATE TABLE file (
projectid VARCHAR(32) NOT NULL,

View File

@ -1,12 +1,13 @@
wwwdir=$(WWWDIR)/codepot/controllers
www_DATA = \
api.php \
code.php \
file.php \
index.html \
issue.php \
main.php \
project.php \
site.php \
source.php \
wiki.php
EXTRA_DIST = $(www_DATA)

View File

@ -164,12 +164,13 @@ top_srcdir = @top_srcdir@
wwwdir = $(WWWDIR)/codepot/controllers
www_DATA = \
api.php \
code.php \
file.php \
index.html \
issue.php \
main.php \
project.php \
site.php \
source.php \
wiki.php
EXTRA_DIST = $(www_DATA)

View File

@ -7,8 +7,17 @@ class API extends Controller
parent::Controller();
}
function check_access ()
{
$server_name = $_SERVER['SERVER_NAME'];
if ($server_name != 'localhost' &&
$server_name != '127.0.0.1') die;
}
function projectHasMember ($projectid, $userid)
{
$this->check_access ();
if (!isset($projectid) || !isset($userid)) return 'NO';
// TODO: access control - may allow localhost only
@ -18,6 +27,8 @@ class API extends Controller
function projectIsOwnedBy ($projectid, $userid)
{
$this->check_access ();
if (!isset($projectid) || !isset($userid)) return 'NO';
// TODO: access control - may allow localhost only
@ -27,6 +38,8 @@ class API extends Controller
function logCodeCommit ($type, $repo, $rev)
{
$this->check_access ();
if (!isset($repo) || !isset($rev)) return;
// TODO: access control - may allow localhost only

View File

@ -1,16 +1,16 @@
<?php
class Source extends Controller
class Code extends Controller
{
var $VIEW_ERROR = 'error';
var $VIEW_FOLDER = 'source_folder';
var $VIEW_FILE = 'source_file';
var $VIEW_BLAME = 'source_blame';
var $VIEW_HISTORY = 'source_history';
var $VIEW_REVISION = 'source_revision';
var $VIEW_DIFF = 'source_diff';
var $VIEW_FOLDER = 'code_folder';
var $VIEW_FILE = 'code_file';
var $VIEW_BLAME = 'code_blame';
var $VIEW_HISTORY = 'code_history';
var $VIEW_REVISION = 'code_revision';
var $VIEW_DIFF = 'code_diff';
function Source ()
function Code ()
{
parent::Controller ();
$this->load->helper ('url');
@ -39,6 +39,7 @@ class Source extends Controller
$path = $this->converter->HexToAscii ($path);
if ($path == '.') $path = ''; /* treat a period specially */
$path = $this->_normalize_path ($path);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
@ -113,6 +114,7 @@ class Source extends Controller
$path = $this->converter->HexToAscii ($path);
if ($path == '.') $path = ''; /* treat a period specially */
$path = $this->_normalize_path ($path);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
@ -174,6 +176,7 @@ class Source extends Controller
$path = $this->converter->HexToAscii ($path);
if ($path == '.') $path = ''; /* treat a period specially */
$path = $this->_normalize_path ($path);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
@ -225,6 +228,7 @@ class Source extends Controller
$path = $this->converter->HexToAscii ($path);
if ($path == '.') $path = ''; /* treat a period specially */
$path = $this->_normalize_path ($path);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
@ -275,6 +279,8 @@ class Source extends Controller
$data['login'] = $login;
$path = $this->converter->HexToAscii ($path);
if ($path == '.') $path = ''; /* treat a period specially */
$path = $this->_normalize_path ($path);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
@ -318,4 +324,12 @@ class Source extends Controller
}
}
}
function _normalize_path ($path)
{
$path = preg_replace('/[\/]+/', '/', $path);
if ($path == '/') $path = '';
return $path;
}
}

View File

@ -0,0 +1,363 @@
<?php
class Issue extends Controller
{
var $VIEW_ERROR = 'error';
var $VIEW_HOME = 'issue_home';
var $VIEW_SHOW = 'issue_show';
var $VIEW_EDIT = 'issue_edit';
var $VIEW_DELETE = 'issue_delete';
function Issue ()
{
parent::Controller ();
$this->load->helper ('url');
$this->load->helper ('form');
$this->load->library ('Converter', 'converter');
$this->load->model (CODEPOT_LOGIN_MODEL, 'login');
$this->load->library ('Language', 'lang');
$this->lang->load ('common', CODEPOT_LANG);
}
function home ($projectid = '')
{
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
$data['login'] = $login;
$project = $this->projects->get ($projectid);
if ($project === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($project === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_PROJECT') .
" - {$projectid}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$issues = $this->issues->getAll ($login['id'], $project);
if ($issues === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['project'] = $project;
$data['issues'] = $issues;
$this->load->view ($this->VIEW_HOME, $data);
}
}
}
function _show_issue ($projectid, $name, $create)
{
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
$data['login'] = $login;
if ($name == '')
{
$data['message'] = 'INVALID PARAMETERS';
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
$name = $this->converter->HexToAscii ($name);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($project === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_PROJECT') .
" - {$projectid}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$issue = $this->issues->get ($login['id'], $project, $name);
if ($issue === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
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);
}
}
else
{
$data['project'] = $project;
$data['issue'] = $issue;
$this->load->view ($this->VIEW_SHOW, $data);
}
}
}
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)
{
$this->load->helper ('form');
$this->load->library ('form_validation');
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($project === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_PROJECT') .
" - {$projectid}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else if (!$login['sysadmin?'] &&
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['message'] = "NO PERMISSION - $projectid";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$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]');
$this->form_validation->set_rules (
'issue_text', 'text', 'required');
$this->form_validation->set_error_delimiters (
'<span class="form_field_error">','</span>');
$data['mode'] = $mode;
$data['message'] = '';
$data['project'] = $project;
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');
if ($this->form_validation->run())
{
$result = ($mode == 'update')?
$this->issues->update ($login['id'], $issue):
$this->issues->create ($login['id'], $issue);
if ($result === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
else
{
redirect ('issue/show/' . $project->id . '/' .
$this->converter->AsciiToHex($issue->name));
}
}
else
{
$data['message'] = "Your input is not complete, Bro";
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
else
{
if ($mode == 'update')
{
$issue = $this->issues->get ($login['id'], $project, $name);
if ($issue === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($issue == NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_ISSUE') .
" - {$name}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
else
{
$issue->projectid = $projectid;
$issue->name = $name;
$issue->text = '';
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
}
}
function create ($projectid = '', $name = '')
{
return $this->_edit_issue ($projectid, $name, 'create');
}
function update ($projectid = '', $name = '')
{
return $this->_edit_issue ($projectid, $name, 'update');
}
function delete ($projectid = '', $name = '')
{
$this->load->helper ('form');
$this->load->library ('form_validation');
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($project === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_PROJECT') .
" - {$projectid}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else if (!$login['sysadmin?'] &&
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['message'] = "NO PERMISSION - $projectid";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['message'] = '';
$data['project'] = $project;
$this->form_validation->set_rules ('issue_confirm', 'confirm', 'alpha');
$this->form_validation->set_error_delimiters('<span class="form_field_error">','</span>');
if($this->input->post('issue'))
{
$issue->projectid = $this->input->post('issue_projectid');
$issue->name = $this->input->post('issue_name');
$data['issue_confirm'] = $this->input->post('issue_confirm');
if ($this->form_validation->run())
{
if ($data['issue_confirm'] == 'yes')
{
$result = $this->issues->delete ($login['id'], $issue);
if ($result === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$data['issue'] = $issue;
$this->load->view ($this->VIEW_DELETE, $data);
}
else
{
redirect ("issue/home/{$project->id}");
}
}
else
{
redirect ("issue/show/{$project->id}/" .
$this->converter->AsciiToHex($issue->name));
}
}
else
{
$data['message'] = "Your input is not complete, Bro.";
$data['issue'] = $issue;
$this->load->view ($this->VIEW_DELETE, $data);
}
}
else
{
$issue = $this->issues->get ($login['id'], $project, $name);
if ($issue === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($issue === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_ISSUE') .
" - {$name}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['issue_confirm'] = 'no';
$data['issue'] = $issue;
$this->load->view ($this->VIEW_DELETE, $data);
}
}
}
}
}

View File

@ -327,6 +327,8 @@ class Project extends Controller
$pagecfg['total_rows'] = $num_log_entries;
$pagecfg['per_page'] = CODEPOT_MAX_LOGS_PER_PAGE;
$pagecfg['uri_segment'] = 4;
$pagecfg['first_link'] = $this->lang->line('First');
$pagecfg['last_link'] = $this->lang->line('Last');
$log_entries = $this->logs->getEntries ($offset, $pagecfg['per_page'], $projectid);
if ($log_entries === FALSE)

View File

@ -314,6 +314,8 @@ class Site extends Controller
$pagecfg['total_rows'] = $num_log_entries;
$pagecfg['per_page'] = CODEPOT_MAX_LOGS_PER_PAGE;
$pagecfg['uri_segment'] = 3;
$pagecfg['first_link'] = $this->lang->line('First');
$pagecfg['last_link'] = $this->lang->line('Last');
$log_entries = $this->logs->getEntries ($offset, $pagecfg['per_page']);
if ($log_entries === FALSE)

View File

@ -96,26 +96,55 @@ class Wiki extends Controller
}
else
{
if ($name == '__PROJECT_HOME__')
if ($this->_is_reserved ($name, TRUE))
{
redirect ("project/home/{$projectid}");
}
else if ($name == '__WIKI_HOME__')
{
redirect ("wiki/home/{$projectid}");
$ex0 = $this->_trans_reserved ($name);
redirect ("{$ex0}/home/{$projectid}");
}
else
{
$ex = explode (':', $name);
if (count($ex) == 2)
$cnt = count($ex);
if ($cnt == 2)
{
if ($ex[0] == '__PROJECT_HOME__')
if ($this->_is_reserved ($ex[0], TRUE))
{
redirect ("project/home/{$ex[1]}");
$ex0 = $this->_trans_reserved ($ex[0]);
$ex1 = ($ex[1] == '')? $projectid: $ex[1];
redirect ("{$ex0}/home/{$ex1}");
}
else if ($ex[0] == '__WIKI_HOME__')
}
else if ($cnt == 3)
{
redirect ("wiki/home/{$ex[1]}");
if ($this->_is_reserved ($ex[0], TRUE) &&
$ex[0] != '__PROJECT__' && $ex[0] != '__CODE__')
{
$ex0 = $this->_trans_reserved ($ex[0]);
$ex1 = ($ex[1] == '')? $projectid: $ex[1];
$ex2 = $this->converter->AsciiToHex ($ex[2]);
redirect ("{$ex0}/show/{$ex1}/{$ex2}");
}
}
else if ($cnt == 4)
{
if ($ex[0] == '__CODE__')
{
$ex0 = $this->_trans_reserved ($ex[0]);
$ex1 = ($ex[1] == '')? $projectid: $ex[1];
if ($ex[2] == 'file' || $ex[2] == 'history' ||
$ex[2] == 'blame' || $ex[2] == 'diff')
{
$ex3 = $this->converter->AsciiToHex ($ex[3]);
redirect ("{$ex0}/{$ex[2]}/{$ex1}/{$ex3}");
}
else
{
$data['message'] =
"WRONG ACTION NAME FOR CODE - {$name}";
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
}
}
@ -192,12 +221,6 @@ class Wiki extends Controller
$data['message'] = "NO PERMISSION - $projectid";
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($name == '__PROJECT_HOME__' ||
$name == '__WIKI_HOME__')
{
$data['message'] = "RESERVED WIKI PAGE - $name ";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$this->form_validation->set_rules (
@ -220,6 +243,14 @@ class Wiki extends Controller
$wiki->text = $this->input->post('wiki_text');
if ($this->form_validation->run())
{
if ($this->_is_reserved ($wiki->name, FALSE))
{
$data['message'] = "RESERVED WIKI NAME - {$wiki->name}";
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
}
else
{
$result = ($mode == 'update')?
$this->wikis->update ($login['id'], $wiki):
@ -232,10 +263,11 @@ class Wiki extends Controller
}
else
{
redirect ('wiki/show/' . $project->id . '/' .
redirect ("wiki/show/{$project->id}/" .
$this->converter->AsciiToHex($wiki->name));
}
}
}
else
{
$data['message'] = "Your input is not complete, Bro";
@ -280,6 +312,31 @@ class Wiki extends Controller
}
}
function _trans_reserved ($name)
{
return substr (strtolower ($name), 2, strlen($name) - 4);
}
function _is_reserved ($name, $exact)
{
if ($exact)
{
return $name == '__PROJECT__' ||
$name == '__WIKI__' ||
$name == '__FILE__' ||
$name == '__CODE__' ||
$name == '__ISSUE__';
}
else
{
return substr ($name, 0, 11) == '__PROJECT__' ||
substr ($name, 0, 8) == '__WIKI__' ||
substr ($name, 0, 8) == '__FILE__' ||
substr ($name, 0, 8) == '__CODE__' ||
substr ($name, 0, 9) == '__ISSUE__';
}
}
function create ($projectid = '', $name = '')
{
return $this->_edit_wiki ($projectid, $name, 'create');
@ -322,15 +379,14 @@ class Wiki extends Controller
$data['message'] = "NO PERMISSION - $projectid";
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($name == '__PROJECT_HOME__' ||
$name == '__WIKI_HOME__')
else if ($this->_is_reserved ($name, FALSE))
{
$data['message'] = "RESERVED WIKI PAGE - $name ";
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['message'] = "";
$data['message'] = '';
$data['project'] = $project;
$this->form_validation->set_rules ('wiki_confirm', 'confirm', 'alpha');

View File

@ -16,13 +16,17 @@ $lang['Directory'] = 'Directory';
$lang['Download'] = 'Download';
$lang['Edit'] = 'Edit';
$lang['Error'] = 'Error';
$lang['File'] = 'File';
$lang['Files'] = 'Files';
$lang['First'] = 'First';
$lang['Folder'] = 'Folder';
$lang['Head revision'] = 'Head revision';
$lang['History'] = 'History';
$lang['Home'] = 'Home';
$lang['File'] = 'File';
$lang['Files'] = 'Files';
$lang['Folder'] = 'Folder';
$lang['ID'] = 'ID';
$lang['Issue'] = 'Issue';
$lang['Issues'] = 'Issues';
$lang['Last'] = 'Last';
$lang['MD5'] = 'MD5';
$lang['Member'] = 'Member';
$lang['Members'] = 'Members';
@ -62,8 +66,9 @@ $lang['MSG_LOG_DELETE_BY'] = 'Deleted by %s';
$lang['MSG_LOG_UPDATE_BY'] = 'Updated by %s';
$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_SOURCE_CODE_AVAIL'] = 'No source code available';
$lang['MSG_NO_ISSUES_AVAIL'] = 'No outstanding issues';
$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';

View File

@ -16,13 +16,17 @@ $lang['Directory'] = 'Direktori';
$lang['Download'] = 'Download';
$lang['Edit'] = 'Rubah';
$lang['Error'] = 'Error';
$lang['File'] = 'File';
$lang['Files'] = 'File';
$lang['First'] = 'Pertama';
$lang['Folder'] = 'Folder';
$lang['Head revision'] = 'Kepala revisi';
$lang['History'] = 'Sejarah';
$lang['Home'] = 'Beranda';
$lang['File'] = 'File';
$lang['Files'] = 'File';
$lang['Folder'] = 'Folder';
$lang['ID'] = 'ID';
$lang['Issue'] = 'Issue';
$lang['Issues'] = 'Issue';
$lang['Last'] = 'Terakhir';
$lang['MD5'] = 'MD5';
$lang['Member'] = 'Anggota';
$lang['Members'] = 'Anggota';
@ -61,8 +65,9 @@ $lang['MSG_LOG_DELETE_BY'] = 'Dihapus oleh %s';
$lang['MSG_LOG_UPDATE_BY'] = 'Diupdate oleh %s';
$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_SOURCE_CODE_AVAIL'] = 'Tidak ada kode sumber tersedia';
$lang['MSG_NO_ISSUES_AVAIL'] = 'Tidak ada 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';

View File

@ -16,13 +16,17 @@ $lang['Directory'] = '디렉토리';
$lang['Download'] = '내려받기';
$lang['Edit'] = '수정';
$lang['Error'] = '오류';
$lang['File'] = '파일';
$lang['Files'] = '파일';
$lang['First'] = '처음';
$lang['Folder'] = '폴더';
$lang['Head revision'] = '최신리비전';
$lang['History'] = '변경기록';
$lang['Home'] = '홈';
$lang['File'] = '파일';
$lang['Files'] = '파일';
$lang['Folder'] = '폴더';
$lang['ID'] = '아이디';
$lang['Issue'] = '이슈';
$lang['Issues'] = '이슈';
$lang['Last'] = '마지막';
$lang['MD5'] = 'MD5';
$lang['Member'] = '구성원';
$lang['Members'] = '구성원';
@ -61,8 +65,9 @@ $lang['MSG_LOG_DELETE_BY'] = '%s에 의해 삭제되었습니다';
$lang['MSG_LOG_UPDATE_BY'] = '%s에 의해 갱신되었습니다';
$lang['MSG_NO_DIFF'] = '차이점이 없습니다';
$lang['MSG_NO_FILES_AVAIL'] = '사용가능한 파일이 없습니다';
$lang['MSG_NO_SOURCE_CODE_AVAIL'] = '사용가능한 소스코드가 없습니다';
$lang['MSG_NO_CODE_AVAIL'] = '소스코드가 없습니다';
$lang['MSG_NO_FILES_AVAIL'] = '파일이 없습니다';
$lang['MSG_NO_ISSUES_AVAIL'] = '이슈항목이 없습니다';
$lang['MSG_NO_SUCH_PROJECT'] = '프로젝트가 없습니다';
$lang['MSG_NO_SUCH_WIKI_PAGE'] = '위키페이지가 없습니다';
$lang['MSG_NO_WIKIS_AVAIL'] = '사용가능한 위키페이지가 없습니다';

View File

@ -2,6 +2,7 @@ wwwdir=$(WWWDIR)/codepot/models
www_DATA = \
filemodel.php \
index.html \
issuemodel.php \
ldaploginmodel.php \
loginmodel.php \
logmodel.php \

View File

@ -165,6 +165,7 @@ wwwdir = $(WWWDIR)/codepot/models
www_DATA = \
filemodel.php \
index.html \
issuemodel.php \
ldaploginmodel.php \
loginmodel.php \
logmodel.php \

View File

@ -0,0 +1,114 @@
<?php
class IssueModel extends Model
{
function IssueModel ()
{
parent::Model ();
$this->load->database ();
}
function get ($userid, $project, $id)
{
$this->db->trans_start ();
$this->db->where ('projectid', $project->id);
$this->db->where ('id', $id);
$query = $this->db->get ('issue');
$this->db->trans_complete ();
if ($this->db->trans_status() === FALSE) return FALSE;
$result = $query->result ();
return empty($result)? NULL: $result[0];
}
function getAll ($userid, $project)
{
$this->db->trans_start ();
$this->db->where ('projectid', $project->id);
$query = $this->db->get ('issue');
$this->db->trans_complete ();
if ($this->db->trans_status() === FALSE) return FALSE;
return $query->result ();
}
function create ($userid, $issue)
{
// TODO: check if userid can do this..
$this->db->trans_start ();
$this->db->set ('projectid', $issue->projectid);
$this->db->set ('summary', $issue->summary);
$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 ('createdon', date('Y-m-d H:i:s'));
$this->db->set ('updatedon', date('Y-m-d H:i:s'));
$this->db->set ('createdby', $userid);
$this->db->set ('updatedby', $userid);
$this->db->insert ('issue');
$this->db->set ('createdon', date('Y-m-d H:i:s'));
$this->db->set ('type', 'issue');
$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->insert ('log');
$this->db->trans_complete ();
return $this->db->trans_status();
}
function update ($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->set ('summary', $issue->summary);
$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 ('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 ();
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->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();
}
}
?>

View File

@ -1,12 +1,20 @@
wwwdir=$(WWWDIR)/codepot/views
www_DATA = \
error.php \
code_blame.php \
code_diff.php \
code_file.php \
code_folder.php \
code_history.php \
code_revision.php \
file_delete.php \
file_edit.php \
file_home.php \
file_show.php \
footer.php \
index.html \
issue_edit.php \
issue_home.php \
log.php \
login.php \
project_delete.php \
@ -17,12 +25,6 @@ www_DATA = \
site_edit.php \
site_delete.php \
site_home.php \
source_blame.php \
source_diff.php \
source_file.php \
source_folder.php \
source_history.php \
source_revision.php \
taskbar.php \
wiki_delete.php \
wiki_edit.php \

View File

@ -164,12 +164,20 @@ top_srcdir = @top_srcdir@
wwwdir = $(WWWDIR)/codepot/views
www_DATA = \
error.php \
code_blame.php \
code_diff.php \
code_file.php \
code_folder.php \
code_history.php \
code_revision.php \
file_delete.php \
file_edit.php \
file_home.php \
file_show.php \
footer.php \
index.html \
issue_edit.php \
issue_home.php \
log.php \
login.php \
project_delete.php \
@ -180,12 +188,6 @@ www_DATA = \
site_edit.php \
site_delete.php \
site_home.php \
source_blame.php \
source_diff.php \
source_file.php \
source_folder.php \
source_history.php \
source_revision.php \
taskbar.php \
wiki_delete.php \
wiki_edit.php \

View File

@ -15,7 +15,7 @@
<body onload="prettyPrint()">
<div class="content" id="project_source_blame_content">
<div class="content" id="project_code_blame_content">
<!---------------------------------------------------------------------------->
@ -28,7 +28,7 @@ $this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'source',
'pageid' => 'code',
'ctxmenuitems' => array ()
)
);
@ -36,9 +36,9 @@ $this->load->view (
<!---------------------------------------------------------------------------->
<div class="mainarea" id="project_source_blame_mainarea">
<div class="mainarea" id="project_code_blame_mainarea">
<div class="title" id="project_source_blame_mainarea_title">
<div class="title" id="project_code_blame_mainarea_title">
<?php
if ($revision <= 0)
{
@ -52,7 +52,7 @@ $this->load->view (
}
print anchor (
"/source/file/{$project->id}{$revreqroot}",
"code/file/{$project->id}{$revreqroot}",
htmlspecialchars($project->name));
$exps = explode ('/', $headpath);
@ -67,13 +67,13 @@ $this->load->view (
if ($i == $expsize - 1)
{
print anchor (
"source/blame/{$project->id}/{$xpar}{$revreq}",
"code/blame/{$project->id}/{$xpar}{$revreq}",
htmlspecialchars($exps[$i]));
}
else
{
print anchor (
"source/file/{$project->id}/{$xpar}{$revreq}",
"code/file/{$project->id}/{$xpar}{$revreq}",
htmlspecialchars($exps[$i]));
}
}
@ -84,44 +84,44 @@ $this->load->view (
print htmlspecialchars($file['fullpath']);
}
?>
</div> <!-- project_source_blame_mainarea_title -->
</div> <!-- project_code_blame_mainarea_title -->
<div class="menu" id="project_source_blame_mainarea_menu">
<div class="menu" id="project_code_blame_mainarea_menu">
<?php
$xpar = $this->converter->AsciiToHex ($headpath);
if ($file['created_rev'] != $file['head_rev'])
{
print anchor ("source/file/{$project->id}/${xpar}", $this->lang->line('Head revision'));
print anchor ("code/blame/{$project->id}/${xpar}", $this->lang->line('Head revision'));
print ' | ';
}
print anchor ("source/file/{$project->id}/${xpar}{$revreq}", $this->lang->line('Details'));
print anchor ("code/file/{$project->id}/${xpar}{$revreq}", $this->lang->line('Details'));
print ' | ';
print anchor ("source/diff/{$project->id}/{$xpar}{$revreq}", $this->lang->line('Difference'));
print anchor ("code/diff/{$project->id}/{$xpar}{$revreq}", $this->lang->line('Difference'));
print ' | ';
print anchor ("source/history/{$project->id}/{$xpar}", $this->lang->line('History'));
print anchor ("code/history/{$project->id}/{$xpar}", $this->lang->line('History'));
?>
</div> <!-- project_source_blame_mainarea_menu -->
</div> <!-- project_code_blame_mainarea_menu -->
<div class="infostrip" id="project_source_blame_mainarea_infostrip">
<?=anchor ("source/file/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
<div class="infostrip" id="project_code_blame_mainarea_infostrip">
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
<?=$this->lang->line('Revision')?>: <?=$file['created_rev']?>
<?=anchor ("source/file/{$project->id}/${xpar}/{$file['next_rev']}", '>>')?> |
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['next_rev']}", '>>')?> |
<?=$this->lang->line('Author')?>: <?=htmlspecialchars($file['last_author'])?> |
<?=$this->lang->line('Size')?>: <?=$file['size']?> |
<?=$this->lang->line('Last updated on')?>: <?=$file['time']?>
</div>
<div id="project_source_blame_mainarea_result">
<div id="project_code_blame_mainarea_result">
<?php
$fileext = substr(strrchr($file['name'], '.'), 1);
if ($fileext == "") $fileext = "html"
?>
<pre class="prettyprint lang-<?=$fileext?>" id="project_source_blame_mainarea_result_pre">
<pre class="prettyprint lang-<?=$fileext?>" id="project_code_blame_mainarea_result_pre">
<?php
$content = $file['content'];
@ -140,7 +140,7 @@ print anchor ("source/history/{$project->id}/{$xpar}", $this->lang->line('Histor
$rev_padded = str_pad ($rev, 6, ' ', STR_PAD_LEFT);
$xpar = $this->converter->AsciiTohex ($headpath);
$rev_padded = anchor ("/source/blame/{$project->id}/{$xpar}/{$rev}", $rev_padded);
$rev_padded = anchor ("code/blame/{$project->id}/{$xpar}/{$rev}", $rev_padded);
}
else
{
@ -167,11 +167,11 @@ print anchor ("source/history/{$project->id}/{$xpar}", $this->lang->line('Histor
?>
</pre>
<div id="project_source_blame_mainarea_result_info">
<div id="project_code_blame_mainarea_result_info">
<script language='javascript'>
function toggle_logmsg()
{
var x = document.getElementById ('project_source_blame_mainarea_result_info_logmsg');
var x = document.getElementById ('project_code_blame_mainarea_result_info_logmsg');
if (x) x.style.visibility = (x.style.visibility == 'visible')? 'hidden': 'visible';
return false;
}
@ -180,14 +180,14 @@ function toggle_logmsg()
<div class="title">
<a href='#' onClick='toggle_logmsg()'><?= $this->lang->line('Message') ?></a>
</div>
<pre id="project_source_blame_mainarea_result_info_logmsg" style="visibility: visible">
<pre id="project_code_blame_mainarea_result_info_logmsg" style="visibility: visible">
<?= $file['logmsg'] ?>
</pre>
</div> <!-- project_source_blame_mainarea_result_info -->
</div> <!-- project_code_blame_mainarea_result_info -->
</div> <!-- project_source_blame_mainarea_result -->
</div> <!-- project_code_blame_mainarea_result -->
</div> <!-- project_source_blame_mainarea -->
</div> <!-- project_code_blame_mainarea -->
<!---------------------------------------------------------------------------->
@ -196,7 +196,7 @@ function toggle_logmsg()
<!---------------------------------------------------------------------------->
</div> <!-- project_source_blame_content -->
</div> <!-- project_code_blame_content -->
</body>

View File

@ -15,7 +15,7 @@
<body onload="prettyPrint()">
<div class="content" id="project_source_diff_content">
<div class="content" id="project_code_diff_content">
<!---------------------------------------------------------------------------->
@ -28,7 +28,7 @@ $this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'source',
'pageid' => 'code',
'ctxmenuitems' => array ()
)
);
@ -36,9 +36,9 @@ $this->load->view (
<!---------------------------------------------------------------------------->
<div class="mainarea" id="project_source_diff_mainarea">
<div class="mainarea" id="project_code_diff_mainarea">
<div class="title" id="project_source_diff_mainarea_title">
<div class="title" id="project_code_diff_mainarea_title">
<?php
if ($revision1 <= 0)
{
@ -52,7 +52,7 @@ $this->load->view (
}
print anchor (
"/source/file/{$project->id}{$revreqroot}",
"code/file/{$project->id}{$revreqroot}",
htmlspecialchars($project->name));
$exps = explode ('/', $headpath);
@ -63,38 +63,38 @@ $this->load->view (
$par .= "/{$exps[$i]}";
$xpar = $this->converter->AsciiToHex ($par);
$xpar = "source/file/{$project->id}/{$xpar}{$revreq}";
$xpar = "code/file/{$project->id}/{$xpar}{$revreq}";
print '/';
print anchor ($xpar, htmlspecialchars($exps[$i]));
}
?>
</div> <!-- project_source_diff_mainarea_title -->
</div> <!-- project_code_diff_mainarea_title -->
<div class="menu" id="project_source_diff_mainarea_menu">
<div class="menu" id="project_code_diff_mainarea_menu">
<?php
$xpar = $this->converter->AsciiTohex ($headpath);
print anchor (
"source/file/{$project->id}/{$xpar}{$revreq}",
"code/file/{$project->id}/{$xpar}{$revreq}",
$this->lang->line('Details'));
print ' | ';
print anchor (
"source/blame/{$project->id}/{$xpar}{$revreq}",
"code/blame/{$project->id}/{$xpar}{$revreq}",
$this->lang->line('Blame'));
print ' | ';
print anchor (
"source/history/{$project->id}/{$xpar}",
"code/history/{$project->id}/{$xpar}",
$this->lang->line('History'));
?>
</div> <!-- project_source_diff_mainarea_menu -->
</div> <!-- project_code_diff_mainarea_menu -->
<?php
$fileext = substr(strrchr($file['name'], '.'), 1);
if ($fileext == "") $fileext = "html"
?>
<div id="project_source_diff_mainarea_result">
<table id="project_source_diff_mainarea_result_table">
<div id="project_code_diff_mainarea_result">
<table id="project_code_diff_mainarea_result_table">
<?php
/*
@ -108,7 +108,7 @@ $this->load->view (
$currev = $file['created_rev'];
$prevrev = $file['against']['prev_rev'];
$prevanc = "source/diff/{$project->id}/{$xpar}/{$currev}/{$prevrev}";
$prevanc = "code/diff/{$project->id}/{$xpar}/{$currev}/{$prevrev}";
print anchor ($prevanc, '<<');
print '&nbsp;&nbsp;&nbsp;';
@ -118,7 +118,7 @@ $this->load->view (
$currev = $file['created_rev'];
$nextrev = $file['against']['next_rev'];
$nextanc = "source/diff/{$project->id}/{$xpar}/{$currev}/{$nextrev}";
$nextanc = "code/diff/{$project->id}/{$xpar}/{$currev}/{$nextrev}";
print '&nbsp;&nbsp;&nbsp;';
print anchor ($nextanc, '>>');
@ -128,7 +128,7 @@ $this->load->view (
$currev = $file['against']['created_rev'];
$prevrev = $file['prev_rev'];
$prevanc = "source/diff/{$project->id}/{$xpar}/{$prevrev}/{$currev}";
$prevanc = "code/diff/{$project->id}/{$xpar}/{$prevrev}/{$currev}";
print anchor ($prevanc, '<<');
print '&nbsp;&nbsp;&nbsp;';
@ -138,7 +138,7 @@ $this->load->view (
$currev = $file['against']['created_rev'];
$nextrev = $file['next_rev'];
$nextanc = "source/diff/{$project->id}/{$xpar}/{$nextrev}/{$currev}";
$nextanc = "code/diff/{$project->id}/{$xpar}/{$nextrev}/{$currev}";
print '&nbsp;&nbsp;&nbsp;';
print anchor ($nextanc, '>>');
@ -152,13 +152,13 @@ $this->load->view (
print '<th>';
print anchor (
"source/file/{$project->id}/{$xpar}/{$file['against']['created_rev']}",
"code/file/{$project->id}/{$xpar}/{$file['against']['created_rev']}",
htmlspecialchars ($file['against']['fullpath']));
print '</th>';
print '<th>';
print anchor (
"source/file/{$project->id}/{$xpar}/{$file['created_rev']}",
"code/file/{$project->id}/{$xpar}/{$file['created_rev']}",
htmlspecialchars ($file['fullpath']));
print '</th>';
@ -220,7 +220,7 @@ $this->load->view (
</table>
</div>
</div> <!-- project_source_diff_mainarea -->
</div> <!-- project_code_diff_mainarea -->
<!---------------------------------------------------------------------------->
@ -230,7 +230,7 @@ $this->load->view (
<!---------------------------------------------------------------------------->
</div> <!-- project_source_diff_content -->
</div> <!-- project_code_diff_content -->
</body>

View File

@ -15,7 +15,7 @@
<body onload="prettyPrint()">
<div class="content" id="project_source_file_content">
<div class="content" id="project_code_file_content">
<!---------------------------------------------------------------------------->
@ -28,7 +28,7 @@ $this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'source',
'pageid' => 'code',
'ctxmenuitems' => array ()
)
);
@ -36,9 +36,9 @@ $this->load->view (
<!---------------------------------------------------------------------------->
<div class="mainarea" id="project_source_file_mainarea">
<div class="mainarea" id="project_code_file_mainarea">
<div class="title" id="project_source_file_mainarea_title">
<div class="title" id="project_code_file_mainarea_title">
<?php
if ($revision <= 0)
{
@ -52,7 +52,7 @@ $this->load->view (
}
print anchor (
"/source/file/{$project->id}{$revreqroot}",
"code/file/{$project->id}{$revreqroot}",
htmlspecialchars($project->name));
$exps = explode ('/', $headpath);
@ -65,7 +65,7 @@ $this->load->view (
print '/';
print anchor (
"source/file/{$project->id}/{$xpar}{$revreq}",
"code/file/{$project->id}/{$xpar}{$revreq}",
htmlspecialchars($exps[$i]));
}
@ -75,51 +75,51 @@ $this->load->view (
print htmlspecialchars($file['fullpath']);
}
?>
</div> <!-- project_source_file_mainarea_title -->
</div> <!-- project_code_file_mainarea_title -->
<div class="menu" id="project_source_file_mainarea_menu">
<div class="menu" id="project_code_file_mainarea_menu">
<?php
$xpar = $this->converter->AsciiToHex ($headpath);
if ($file['created_rev'] != $file['head_rev'])
{
print anchor (
"source/file/{$project->id}/${xpar}",
"code/file/{$project->id}/${xpar}",
$this->lang->line('Head revision'));
print ' | ';
}
print anchor (
"source/blame/{$project->id}/${xpar}{$revreq}",
"code/blame/{$project->id}/${xpar}{$revreq}",
$this->lang->line('Blame'));
print ' | ';
print anchor (
"source/diff/{$project->id}/{$xpar}{$revreq}",
"code/diff/{$project->id}/{$xpar}{$revreq}",
$this->lang->line('Difference'));
print ' | ';
print anchor (
"source/history/{$project->id}/{$xpar}",
"code/history/{$project->id}/{$xpar}",
$this->lang->line('History'));
?>
</div> <!-- project_source_file_mainarea_menu -->
</div> <!-- project_code_file_mainarea_menu -->
<div class="infostrip" id="project_source_file_mainarea_infostrip">
<?=anchor ("source/file/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
<div class="infostrip" id="project_code_file_mainarea_infostrip">
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
<?=$this->lang->line('Revision')?>: <?=$file['created_rev']?>
<?=anchor ("source/file/{$project->id}/${xpar}/{$file['next_rev']}", '>>')?> |
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['next_rev']}", '>>')?> |
<?=$this->lang->line('Author')?>: <?=htmlspecialchars($file['last_author'])?> |
<?=$this->lang->line('Size')?>: <?=$file['size']?> |
<?=$this->lang->line('Last updated on')?>: <?=$file['time']?>
</div>
<div id="project_source_file_mainarea_result">
<div id="project_code_file_mainarea_result">
<?php
$fileext = substr(strrchr($file['name'], '.'), 1);
if ($fileext == '') $fileext = "html"
?>
<pre class="prettyprint lang-<?=$fileext?>" id="project_source_file_mainarea_result_pre">
<pre class="prettyprint lang-<?=$fileext?>" id="project_code_file_mainarea_result_pre">
<?php
// print htmlspecialchars($file['content']);
@ -146,11 +146,11 @@ if ($fileext == '') $fileext = "html"
</pre>
<div id="project_source_file_mainarea_result_info">
<div id="project_code_file_mainarea_result_info">
<script language='javascript'>
function toggle_logmsg()
{
var x = document.getElementById ('project_source_file_mainarea_result_info_logmsg');
var x = document.getElementById ('project_code_file_mainarea_result_info_logmsg');
if (x) x.style.visibility = (x.style.visibility == 'visible')? 'hidden': 'visible';
return false;
}
@ -159,14 +159,14 @@ function toggle_logmsg()
<div class="title">
<a href='#' onClick='toggle_logmsg()'><?= $this->lang->line('Message') ?></a>
</div>
<pre id="project_source_file_mainarea_result_info_logmsg" style="visibility: visible">
<pre id="project_code_file_mainarea_result_info_logmsg" style="visibility: visible">
<?= $file['logmsg'] ?>
</pre>
</div> <!-- project_source_file_mainarea_result_info -->
</div> <!-- project_code_file_mainarea_result_info -->
</div> <!-- project_source_file_mainarea_result -->
</div> <!-- project_code_file_mainarea_result -->
</div> <!-- project_source_file_mainarea -->
</div> <!-- project_code_file_mainarea -->
<!---------------------------------------------------------------------------->
@ -175,7 +175,7 @@ function toggle_logmsg()
<!---------------------------------------------------------------------------->
</div> <!-- project_source_file_content -->
</div> <!-- project_code_file_content -->
</body>

View File

@ -9,7 +9,7 @@
<body>
<div class="content" id="project_source_folder_content">
<div class="content" id="project_code_folder_content">
<!---------------------------------------------------------------------------->
@ -22,7 +22,7 @@ $this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'source',
'pageid' => 'code',
'ctxmenuitems' => array ()
)
);
@ -31,18 +31,18 @@ $this->load->view (
<!---------------------------------------------------------------------------->
<div class="sidebar" id="project_source_folder_sidebar">
<div class="box" id="project_source_folder_sidebar_info">
<div class="sidebar" id="project_code_folder_sidebar">
<div class="box" id="project_code_folder_sidebar_info">
<div class="boxtitle"><?=$this->lang->line('Revision')?>: <?=$file['created_rev']?></div>
<pre><?=$file['logmsg']?></pre>
</div>
</div> <!-- project_source_folder_sidebar -->
</div> <!-- project_code_folder_sidebar -->
<!---------------------------------------------------------------------------->
<div class="mainarea" id="project_source_folder_mainarea">
<div class="mainarea" id="project_code_folder_mainarea">
<div class="title">
<?php
@ -60,7 +60,7 @@ $this->load->view (
// print the main anchor for the root folder.
// let the anchor text be the project name.
print anchor (
"/source/file/{$project->id}{$revreqroot}",
"code/file/{$project->id}{$revreqroot}",
htmlspecialchars($project->name));
// explode non-root folder parts to anchors
@ -73,7 +73,7 @@ $this->load->view (
$par .= '/' . $exps[$i];
$xpar = $this->converter->AsciiToHex ($par);
print anchor (
"source/file/{$project->id}/{$xpar}{$revreq}",
"code/file/{$project->id}/{$xpar}{$revreq}",
htmlspecialchars($exps[$i]));
}
@ -99,24 +99,24 @@ $this->load->view (
if (count($file['content']) <= 0)
{
print $this->lang->line('MSG_NO_SOURCE_CODE_AVAIL');
print $this->lang->line('MSG_NO_CODE_AVAIL');
}
else
{
print '<div class="menu" id="project_source_folder_mainarea_menu">';
print '<div class="menu" id="project_code_folder_mainarea_menu">';
$xpar = $this->converter->AsciiTohex ($headpath);
if ($revision > 0 && $revision < $next_revision)
{
print anchor ("source/file/{$project->id}", $this->lang->line('Head revision'));
print anchor ("code/file/{$project->id}", $this->lang->line('Head revision'));
print ' | ';
}
print anchor ("source/history/{$project->id}/{$xpar}", $this->lang->line('History'));
print anchor ("code/history/{$project->id}/{$xpar}", $this->lang->line('History'));
print '</div>';
usort ($file['content'], 'comp_files');
print '<div id="project_source_folder_mainarea_result">';
print '<table id="project_source_folder_mainarea_result_table">';
print '<div id="project_code_folder_mainarea_result">';
print '<table id="project_code_folder_mainarea_result_table">';
print '<tr class="heading">';
print '<th>' . $this->lang->line('Name') . '</th>';
print '<th>' . $this->lang->line('Revision') . '</th>';
@ -141,7 +141,7 @@ $this->load->view (
print "<tr class='{$rowclass}'>";
print '<td>';
print anchor (
"source/file/{$project->id}/{$hexpath}{$revreq}",
"code/file/{$project->id}/{$hexpath}{$revreq}",
htmlspecialchars($f['name']));
print '</td>';
print '<td>';
@ -166,7 +166,7 @@ $this->load->view (
print "<tr class='{$rowclass}'>";
print '<td>';
print anchor (
"source/file/{$project->id}/{$hexpath}{$revreq}",
"code/file/{$project->id}/{$hexpath}{$revreq}",
htmlspecialchars($f['name']));
print '</td>';
print '<td>';
@ -185,12 +185,12 @@ $this->load->view (
print '<td>';
print anchor (
"source/blame/{$project->id}/{$hexpath}{$revreq}",
"code/blame/{$project->id}/{$hexpath}{$revreq}",
$this->lang->line('Blame'));
print '</td>';
print '<td>';
print anchor (
"source/diff/{$project->id}/{$hexpath}{$revreq}",
"code/diff/{$project->id}/{$hexpath}{$revreq}",
$this->lang->line('Difference'));
print '</td>';
print '</tr>';
@ -201,7 +201,7 @@ $this->load->view (
}
?>
</div> <!-- project_source_folder_mainarea -->
</div> <!-- project_code_folder_mainarea -->
<!---------------------------------------------------------------------------->
@ -210,7 +210,7 @@ $this->load->view (
<!---------------------------------------------------------------------------->
</div> <!-- project_source_folder_content -->
</div> <!-- project_code_folder_content -->
</body>

View File

@ -9,7 +9,7 @@
<body>
<div class="content" id="project_source_history_content">
<div class="content" id="project_code_history_content">
<!---------------------------------------------------------------------------->
@ -22,7 +22,7 @@ $this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'source',
'pageid' => 'code',
'ctxmenuitems' => array ()
)
);
@ -30,9 +30,9 @@ $this->load->view (
<!---------------------------------------------------------------------------->
<div class="mainarea" id="project_source_history_mainarea">
<div class="mainarea" id="project_code_history_mainarea">
<div class="title" id="project_source_history_mainarea_title">
<div class="title" id="project_code_history_mainarea_title">
<?php
if ($revision <= 0)
{
@ -47,7 +47,7 @@ $this->load->view (
// print the anchor for the root nolder with a project name
print anchor (
"/source/history/{$project->id}{$revreqroot}",
"code/history/{$project->id}{$revreqroot}",
htmlspecialchars($project->name));
// explodes part of the full path name into an array
@ -61,17 +61,17 @@ $this->load->view (
$par .= '/' . $exps[$i];
$xpar = $this->converter->AsciiToHex ($par);
print anchor (
"source/history/{$project->id}/{$xpar}{$revreq}",
"code/history/{$project->id}/{$xpar}{$revreq}",
htmlspecialchars($exps[$i]));
}
?>
</div>
<div class="menu" id="project_source_history_mainarea_menu">
</div> <!-- project_source_history_mainarea_menu -->
<div class="menu" id="project_code_history_mainarea_menu">
</div> <!-- project_code_history_mainarea_menu -->
<div id="project_source_history_mainarea_result">
<table id="project_source_history_mainarea_result_table">
<div id="project_code_history_mainarea_result">
<table id="project_code_history_mainarea_result_table">
<tr class='heading'>
<th><?=$this->lang->line('Revision')?></th>
<th><?=$this->lang->line('Author')?></th>
@ -95,7 +95,7 @@ $this->load->view (
$xfullpath = $this->converter->AsciiToHex (
($fullpath == '')? '.': $fullpath);
print anchor ("/source/file/{$project->id}/{$xfullpath}/{$h['rev']}", $h['rev']);
print anchor ("code/file/{$project->id}/{$xfullpath}/{$h['rev']}", $h['rev']);
print '</td>';
print '<td>';
@ -117,17 +117,17 @@ $this->load->view (
if ($file['type'] == 'file')
{
print '<td>';
print anchor ("/source/blame/{$project->id}/{$xfullpath}/{$h['rev']}",
print anchor ("code/blame/{$project->id}/{$xfullpath}/{$h['rev']}",
$this->lang->line('Blame'));
print ' ';
print anchor ("/source/diff/{$project->id}/{$xfullpath}/{$h['rev']}",
print anchor ("code/diff/{$project->id}/{$xfullpath}/{$h['rev']}",
$this->lang->line('Difference'));
print '</td>';
}
else if ($file['type'] == 'dir')
{
print '<td>';
print anchor ("/source/revision/{$project->id}/{$xfullpath}/{$h['rev']}",
print anchor ("code/revision/{$project->id}/{$xfullpath}/{$h['rev']}",
$this->lang->line('Details'));
print '</td>';
}
@ -165,9 +165,9 @@ $this->load->view (
}
?>
</table>
</div> <!-- project_source_history_mainarea_body -->
</div> <!-- project_code_history_mainarea_body -->
</div> <!-- project_source_history_mainarea -->
</div> <!-- project_code_history_mainarea -->
<!---------------------------------------------------------------------------->
@ -177,7 +177,7 @@ $this->load->view (
<!---------------------------------------------------------------------------->
</div> <!-- project_source_history_content -->
</div> <!-- project_code_history_content -->
</body>

View File

@ -9,7 +9,7 @@
<body>
<div class="content" id="project_source_revision_content">
<div class="content" id="project_code_revision_content">
<!---------------------------------------------------------------------------->
@ -22,7 +22,7 @@ $this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'source',
'pageid' => 'code',
'ctxmenuitems' => array ()
)
);
@ -30,13 +30,13 @@ $this->load->view (
<!---------------------------------------------------------------------------->
<div class="mainarea" id="project_source_revision_mainarea">
<div class="mainarea" id="project_code_revision_mainarea">
<?php
$history = $file['history'];
?>
<div class="title" id="project_source_revision_mainarea_title">
<div class="title" id="project_code_revision_mainarea_title">
<?php
if ($revision <= 0)
{
@ -50,7 +50,7 @@ $history = $file['history'];
}
print anchor (
"/source/revision/{$project->id}{$revreqroot}",
"code/revision/{$project->id}{$revreqroot}",
htmlspecialchars($project->name));
$exps = explode ('/', $headpath);
@ -63,7 +63,7 @@ $history = $file['history'];
print '/';
print anchor (
"source/revision/{$project->id}/{$xpar}{$revreq}",
"code/revision/{$project->id}/{$xpar}{$revreq}",
htmlspecialchars($exps[$i]));
}
@ -75,36 +75,36 @@ $history = $file['history'];
?>
</div>
<div class="menu" id="project_source_revision_mainarea_menu">
<div class="menu" id="project_code_revision_mainarea_menu">
<?php
$xpar = $this->converter->AsciiToHex(($headpath == '')? '.': $headpath);
if ($revision > 0 && $revision < $next_revision)
{
print anchor ("source/revision/{$project->id}/{$xpar}", $this->lang->line('Head revision'));
print anchor ("code/revision/{$project->id}/{$xpar}", $this->lang->line('Head revision'));
print ' | ';
}
print anchor ("source/history/{$project->id}/{$xpar}", $this->lang->line('History'));
print anchor ("code/history/{$project->id}/{$xpar}", $this->lang->line('History'));
?>
</div> <!-- project_source_revision_mainarea_menu -->
</div> <!-- project_code_revision_mainarea_menu -->
<div class="infostrip" id="project_source_revision_mainarea_infostrip">
<?=anchor ("source/revision/{$project->id}/${xpar}/{$prev_revision}", '<<')?>
<div class="infostrip" id="project_code_revision_mainarea_infostrip">
<?=anchor ("code/revision/{$project->id}/${xpar}/{$prev_revision}", '<<')?>
<?=$this->lang->line('Revision')?>: <?=$history['rev']?>
<?=anchor ("source/revision/{$project->id}/${xpar}/{$next_revision}", '>>')?> |
<?=anchor ("code/revision/{$project->id}/${xpar}/{$next_revision}", '>>')?> |
<?=$this->lang->line('Author')?>: <?=htmlspecialchars($history['author'])?> |
<?=$this->lang->line('Last updated on')?>: <?=date('r', strtotime($history['date']))?>
</div>
<div id="project_source_revision_mainarea_result">
<div id="project_code_revision_mainarea_result">
<div class="title">Message</div>
<pre id="project_source_revision_mainarea_result_msg">
<pre id="project_code_revision_mainarea_result_msg">
<?=htmlspecialchars($history['msg'])?>
</pre>
<div class="title">Files updated</div>
<table id="project_source_revision_mainarea_result_table">
<table id="project_code_revision_mainarea_result_table">
<?php
/*
print '<tr class="heading">';
@ -123,14 +123,14 @@ $history = $file['history'];
$xpar = $this->converter->AsciiToHex ($p['path']);
print "<td class='{$p['action']}'>";
print anchor ("source/file/{$project->id}/{$xpar}/{$history['rev']}", htmlspecialchars($p['path']));
print anchor ("code/file/{$project->id}/{$xpar}/{$history['rev']}", htmlspecialchars($p['path']));
print '</td>';
/*
print '<td>';
print anchor ("source/blame/{$project->id}/{$xpar}/{$history['rev']}", $this->lang->line('Blame'));
print anchor ("code/blame/{$project->id}/{$xpar}/{$history['rev']}", $this->lang->line('Blame'));
print ' ';
print anchor ("source/diff/{$project->id}/{$xpar}/{$history['rev']}", $this->lang->line('Difference'));
print anchor ("code/diff/{$project->id}/{$xpar}/{$history['rev']}", $this->lang->line('Difference'));
print '</td>';
*/
@ -138,9 +138,9 @@ $history = $file['history'];
}
?>
</table>
</div> <!-- project_source_revision_mainarea_body -->
</div> <!-- project_code_revision_mainarea_body -->
</div> <!-- project_source_revision_mainarea -->
</div> <!-- project_code_revision_mainarea -->
<!---------------------------------------------------------------------------->
@ -150,7 +150,7 @@ $history = $file['history'];
<!---------------------------------------------------------------------------->
</div> <!-- project_source_revision_content -->
</div> <!-- project_code_revision_content -->
</body>

View File

@ -0,0 +1,88 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/common.css" />
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/project.css" />
<title><?=htmlspecialchars($issue->name)?></title>
</head>
<body>
<div class="content">
<!---------------------------------------------------------------------------->
<?php $this->load->view ('taskbar'); ?>
<!---------------------------------------------------------------------------->
<?php
$hexname = $this->converter->AsciiToHex ($issue->name);
$this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'issue',
'ctxmenuitems' => array ()
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea" id="issue_edit_mainarea">
<?php if ($message != "") print '<div id="issue_edit_message" class="form_message">'.htmlspecialchars($message).'</div>'; ?>
<?=form_open("issue/{$mode}/".$project->id.'/'.$this->converter->AsciiToHex($issue->name))?>
<?=form_fieldset()?>
<div>
<div>
<?=form_label($this->lang->line('Name').': ', 'issue_name')?>
<?=form_error('issue_name');?>
</div>
<div>
<?php
$extra = ($mode == 'update')? 'readonly="readonly"': '';
$extra .= 'maxlength="80" size="40"';
?>
<?=form_input('issue_name', set_value('issue_name', $issue->name), $extra)?>
</div>
</div>
<div>
<div>
<?=form_label($this->lang->line('Text').': ', 'issue_text')?>
<?=form_error('issue_text');?>
</div>
<div>
<?=form_textarea('issue_text', set_value('issue_text', $issue->text))?>
</div>
</div>
<div>
<?=form_hidden('issue_projectid', set_value('issue_projectid', $issue->projectid))?>
</div>
<div>
<?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?>
<?=form_submit('issue', $caption)?>
</div>
<?=form_fieldset_close()?>
<?=form_close();?>
</div> <!-- issue_edit_mainarea -->
<!---------------------------------------------------------------------------->
<?php $this->load->view ('footer'); ?>
<!---------------------------------------------------------------------------->
</div>
</body>
</html>

View File

@ -0,0 +1,68 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/common.css" />
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/project.css" />
<title><?=htmlspecialchars($project->name)?></title>
</head>
<body>
<div class="content" id="project_issue_home_content">
<!---------------------------------------------------------------------------->
<?php $this->load->view ('taskbar'); ?>
<!---------------------------------------------------------------------------->
<?php
$this->load->view (
'projectbar',
array (
'site' => NULL,
'pageid' => 'issue',
'ctxmenuitems' => array (
array ("issue/create/{$project->id}", $this->lang->line('New'))
)
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea" id="project_issue_home_mainarea">
<div class="title"><?=$this->lang->line('Issues')?></div>
<div id="project_issue_home_textarea">
<?php
if (empty($issues))
{
print $this->lang->line('MSG_NO_ISSUES_AVAIL');
}
else
{
print '<ul>';
foreach ($issues as $issue)
{
$hexname = $this->converter->AsciiToHex ($issue->name);
print '<li>' . anchor ("issue/show/{$project->id}/{$hexname}", htmlspecialchars($issue->name)) .'</li>';
}
print '</ul>';
}
?>
</div>
</div> <!-- project_issue_home_mainarea -->
<!---------------------------------------------------------------------------->
<?php $this->load->view ('footer'); ?>
<!---------------------------------------------------------------------------->
</div> <!-- project_issue_home_content -->
</body>
</html>

View File

@ -90,7 +90,7 @@ $this->load->view (
if (!isset($project) || $project == NULL)
{
print '<td class="projectid">';
print anchor ("/project/home/{$log['projectid']}", $log['projectid']);
print anchor ("project/home/{$log['projectid']}", $log['projectid']);
print '</td>';
}
@ -99,7 +99,7 @@ $this->load->view (
{
print '<td class="obejct">';
print anchor (
"/source/revision/{$log['projectid']}/{$xdot}/{$code['rev']}",
"code/revision/{$log['projectid']}/{$xdot}/{$code['rev']}",
"r{$code['rev']}");
print '</td>';

View File

@ -101,7 +101,7 @@ $this->load->view (
print '</td>';
print '<td class="object">';
print anchor (
"/source/revision/{$x['repo']}/{$xdot}/{$x['rev']}",
"code/revision/{$x['repo']}/{$xdot}/{$x['rev']}",
"r{$x['rev']}");
print '</td>';

View File

@ -36,7 +36,8 @@ function show_projectbar ($con, $site, $project, $pageid, $ctxmenuitems)
$menuitems = array (
array ("project/home/{$project->id}", $con->lang->line('Overview')),
array ("wiki/home/{$project->id}", $con->lang->line('Wiki')),
array ("source/home/{$project->id}", $con->lang->line('Code')),
array ("issue/home/{$project->id}", $con->lang->line('Issues')),
array ("code/home/{$project->id}", $con->lang->line('Code')),
array ("file/home/{$project->id}", $con->lang->line('Files'))
);
@ -54,7 +55,7 @@ function show_projectbar ($con, $site, $project, $pageid, $ctxmenuitems)
$extra = ($menuid == $pageid)? 'class="selected"': '';
$menulink = $item[0];
if ($menuid == 'source')
if ($menuid == 'code')
{
if (CODEPOT_ENABLE_WEBSVN === TRUE ||
!function_exists('svn_ls')) $menulink = $websvn;

View File

@ -68,11 +68,15 @@ $this->load->view (
<?php
foreach ($latest_projects as $project)
{
//$cap = "{$project->name} ({$project->id})";
$cap = "{$project->name}";
$anc = anchor ("project/home/{$project->id}", htmlspecialchars($cap));
//$date = date ('Y/m/d', strtotime($project->createdon));
//print "<tr><td>{$anc}</td><td>{$date}</td></tr>";
if (strcasecmp ($project->name, $project->id) != 0)
$cap = "{$project->name} ($project->id)";
else $cap = $project->name;
//$sum = preg_replace("/(.{15}).+/u", "$1…", $project->summary);
//$sum = htmlspecialchars ($sum);
$anc = anchor ("project/home/{$project->id}",
htmlspecialchars($cap), "title='{$project->summary}'");
print "<li>{$anc}</li>";
}
?>
@ -99,14 +103,14 @@ foreach ($latest_projects as $project)
print '<td class="projectid">';
/*
print anchor (
"/source/file/{$x['repo']}/{$xdot}/{$x['rev']}",
"code/file/{$x['repo']}/{$xdot}/{$x['rev']}",
$x['repo']);
*/
print anchor ("/project/home/{$x['repo']}", $x['repo']);
print anchor ("project/home/{$x['repo']}", $x['repo']);
print '</td>';
print '<td class="object">';
print anchor (
"/source/revision/{$x['repo']}/{$xdot}/{$x['rev']}",
"code/revision/{$x['repo']}/{$xdot}/{$x['rev']}",
"r{$x['rev']}");
print '</td>';

View File

@ -145,15 +145,15 @@
/*-----------------------------------------------
* project source folder view
*-----------------------------------------------*/
#project_source_folder_sidebar_info pre {
#project_code_folder_sidebar_info pre {
white-space: pre-wrap;
}
#project_source_folder_mainarea_result {
#project_code_folder_mainarea_result {
overflow: auto;
}
#project_source_folder_mainarea_result_table tr {
#project_code_folder_mainarea_result_table tr {
vertical-align: top;
white-space: nowrap;
}
@ -161,30 +161,30 @@
/*-----------------------------------------------
* project source file view
*-----------------------------------------------*/
#project_source_file_mainarea_result {
#project_code_file_mainarea_result {
position: relative;
}
#project_source_file_mainarea_result_pre {
#project_code_file_mainarea_result_pre {
/* make it the same as font-size of info .title below */
padding-top: 0.8em;
}
#project_source_file_mainarea_result_info {
#project_code_file_mainarea_result_info {
position: absolute;
top: 0;
right: 0;
width: 22em;
}
#project_source_file_mainarea_result_info pre {
#project_code_file_mainarea_result_info pre {
overflow: auto;
border: 0;
margin: 0;
padding: 0;
}
#project_source_file_mainarea_result_info .title {
#project_code_file_mainarea_result_info .title {
background-color: #7777FF;
border: 0;
margin: 0;
@ -192,43 +192,43 @@
text-align: right;
}
#project_source_file_mainarea_result_info .title a {
#project_code_file_mainarea_result_info .title a {
color: white;
font-size: inherit;
background-color: inherit;
}
#project_source_file_mainarea_result_info .title a:hover {
#project_code_file_mainarea_result_info .title a:hover {
background-color: inherit;
}
/*-----------------------------------------------
* project source blame view
*-----------------------------------------------*/
#project_source_blame_mainarea_result {
#project_code_blame_mainarea_result {
position: relative;
}
#project_source_blame_mainarea_result_pre {
#project_code_blame_mainarea_result_pre {
/* make it the same as font-size of info .title below */
padding-top: 0.8em;
}
#project_source_blame_mainarea_result_info {
#project_code_blame_mainarea_result_info {
position: absolute;
top: 0;
right: 0;
width: 22em;
}
#project_source_blame_mainarea_result_info pre {
#project_code_blame_mainarea_result_info pre {
overflow: auto;
border: 0;
margin: 0;
padding: 0;
}
#project_source_blame_mainarea_result_info .title {
#project_code_blame_mainarea_result_info .title {
background-color: #7777FF;
border: 0;
margin: 0;
@ -236,29 +236,29 @@
text-align: right;
}
#project_source_blame_mainarea_result_info .title a {
#project_code_blame_mainarea_result_info .title a {
color: white;
font-size: inherit;
background-color: inherit;
}
#project_source_blame_mainarea_result_info .title a:hover {
#project_code_blame_mainarea_result_info .title a:hover {
background-color: inherit;
}
/*-----------------------------------------------
* project source history view
*-----------------------------------------------*/
#project_source_history_mainarea_result {
#project_code_history_mainarea_result {
overflow: auto;
}
#project_source_history_mainarea_result_table tr {
#project_code_history_mainarea_result_table tr {
vertical-align: top;
white-space: nowrap;
}
#project_source_history_mainarea_result_table_path_list {
#project_code_history_mainarea_result_table_path_list {
/* the list in the 'paths' column */
margin: 0;
padding: 0;
@ -266,14 +266,14 @@
white-space: nowrap;
}
#project_source_history_mainarea_result_table pre {
#project_code_history_mainarea_result_table pre {
border: 0;
background-color: inherit;
padding: 0;
margin: 0;
}
#project_source_history_mainarea_result_table .title {
#project_code_history_mainarea_result_table .title {
font-size: inherit;
font-weight: inherit;
font-style: italic;
@ -285,11 +285,11 @@
* project source revision view
*-----------------------------------------------*/
#project_source_revision_mainarea_result {
#project_code_revision_mainarea_result {
overflow: auto;
}
#project_source_revision_mainarea_result_msg {
#project_code_revision_mainarea_result_msg {
border: 0;
padding: 0;
background-color: inherit;
@ -298,7 +298,7 @@
white-space: pre-wrap;
}
#project_source_revision_mainarea_result_table td.M {
#project_code_revision_mainarea_result_table td.M {
white-space: nowrap;
background-image:url(images/page_white_edit.png);
background-position:2px 50%;
@ -306,7 +306,7 @@
padding-left: 22px;
}
#project_source_revision_mainarea_result_table td.D {
#project_code_revision_mainarea_result_table td.D {
white-space: nowrap;
background-image:url(images/page_white_delete.png);
background-position:2px 50%;
@ -314,7 +314,7 @@
padding-left: 22px;
}
#project_source_revision_mainarea_result_table td.A {
#project_code_revision_mainarea_result_table td.A {
white-space: nowrap;
background-image:url(images/page_white_add.png);
background-position:2px 50%;
@ -322,7 +322,7 @@
padding-left: 22px;
}
#project_source_revision_mainarea_result_table td.R {
#project_code_revision_mainarea_result_table td.R {
white-space: nowrap;
background-image:url(images/page_white_add.png);
background-position:2px 50%;
@ -330,11 +330,11 @@
padding-left: 22px;
}
#project_source_revision_mainarea_result_sidebar {
#project_code_revision_mainarea_result_sidebar {
/*overflow: auto;*/
}
#project_source_revision_mainarea_result_sidebar pre {
#project_code_revision_mainarea_result_sidebar pre {
overflow: auto;
border: 0;
padding: 0;
@ -343,33 +343,33 @@
/*-----------------------------------------------
* project source diff view
*-----------------------------------------------*/
#project_source_diff_mainarea_result {
#project_code_diff_mainarea_result {
overflow: auto;
}
#project_source_diff_mainarea_result_table {
#project_code_diff_mainarea_result_table {
border: 0;
}
#project_source_diff_mainarea_result_table tr.diff td pre {
#project_code_diff_mainarea_result_table tr.diff td pre {
background-color: inherit;
border: 0;
margin: 0;
padding: 0;
}
#project_source_diff_mainarea_result_table tr.diff td.diff {
#project_code_diff_mainarea_result_table tr.diff td.diff {
padding: 0;
padding-left:22px;
margin: 0;
}
#project_source_diff_mainarea_result_table tr.diff td.diffrow {
#project_code_diff_mainarea_result_table tr.diff td.diffrow {
font-style: italic;
font-weight: bold;
}
#project_source_diff_mainarea_result_table tr.diff td.diffadded {
#project_code_diff_mainarea_result_table tr.diff td.diffadded {
border:1px solid #cdf0cd;
background-color:#ddffdd;
background-image:url(images/bullet_add.png);
@ -380,7 +380,7 @@
margin: 0;
}
#project_source_diff_mainarea_result_table tr.diff td.diffdeleted {
#project_code_diff_mainarea_result_table tr.diff td.diffdeleted {
border:1px solid #e8d4bc;
background-color:#f8e4cc;
background-image:url(images/bullet_delete.png);
@ -391,7 +391,7 @@
margin: 0;
}
#project_source_diff_mainarea_result_table tr.diff td.diffchanged {
#project_code_diff_mainarea_result_table tr.diff td.diffchanged {
border:1px solid #f0f0bc;
background-color:#ffffcc;
background-image:url(images/bullet_yellow.png);