enhanced the code viewer to show svn properties
This commit is contained in:
parent
b41a102353
commit
3104736b42
@ -48,4 +48,4 @@ rpm: dist
|
|||||||
mkdir -p "@abs_top_builddir@/RPM/SRPMS"
|
mkdir -p "@abs_top_builddir@/RPM/SRPMS"
|
||||||
mkdir -p "@abs_top_builddir@/RPM/RPMS"
|
mkdir -p "@abs_top_builddir@/RPM/RPMS"
|
||||||
cp codepot-@VERSION@.tar.gz "@abs_top_builddir@/RPM/SOURCES"
|
cp codepot-@VERSION@.tar.gz "@abs_top_builddir@/RPM/SOURCES"
|
||||||
rpmbuild --define "_topdir @abs_top_builddir@/RPM" -ba codepot.spec
|
rpmbuild --define "_topdir @abs_top_builddir@/RPM" -ba codepot.spec --target noarch
|
||||||
|
@ -733,7 +733,7 @@ rpm: dist
|
|||||||
mkdir -p "@abs_top_builddir@/RPM/SRPMS"
|
mkdir -p "@abs_top_builddir@/RPM/SRPMS"
|
||||||
mkdir -p "@abs_top_builddir@/RPM/RPMS"
|
mkdir -p "@abs_top_builddir@/RPM/RPMS"
|
||||||
cp codepot-@VERSION@.tar.gz "@abs_top_builddir@/RPM/SOURCES"
|
cp codepot-@VERSION@.tar.gz "@abs_top_builddir@/RPM/SOURCES"
|
||||||
rpmbuild --define "_topdir @abs_top_builddir@/RPM" -ba codepot.spec
|
rpmbuild --define "_topdir @abs_top_builddir@/RPM" -ba codepot.spec --target noarch
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
@ -11,11 +11,12 @@ default_site_name = "@PACKAGE@"
|
|||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; database settings
|
; database settings
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
database_username =
|
database_hostname = "localhost"
|
||||||
database_password =
|
database_username = ""
|
||||||
database_name =
|
database_password = ""
|
||||||
database_driver =
|
database_name = ""
|
||||||
database_prefix =
|
database_driver = ""
|
||||||
|
database_prefix = ""
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ldap settings
|
; ldap settings
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
$active_group = "default";
|
$active_group = "default";
|
||||||
$active_record = TRUE;
|
$active_record = TRUE;
|
||||||
|
|
||||||
$db['default']['hostname'] = "localhost";
|
$db['default']['hostname'] = CODEPOT_DATABASE_HOSTNAME;
|
||||||
$db['default']['username'] = CODEPOT_DATABASE_USERNAME;
|
$db['default']['username'] = CODEPOT_DATABASE_USERNAME;
|
||||||
$db['default']['password'] = CODEPOT_DATABASE_PASSWORD;
|
$db['default']['password'] = CODEPOT_DATABASE_PASSWORD;
|
||||||
$db['default']['database'] = CODEPOT_DATABASE_NAME;
|
$db['default']['database'] = CODEPOT_DATABASE_NAME;
|
||||||
@ -50,5 +50,18 @@ $db['default']['cachedir'] = "";
|
|||||||
$db['default']['char_set'] = "utf8";
|
$db['default']['char_set'] = "utf8";
|
||||||
$db['default']['dbcollat'] = "utf8_general_ci";
|
$db['default']['dbcollat'] = "utf8_general_ci";
|
||||||
|
|
||||||
|
$db['auth-mysql']['hostname'] = CODEPOT_AUTH_MYSQL_HOSTNAME;
|
||||||
|
$db['auth-mysql']['username'] = CODEPOT_AUTH_MYSQL_USERNAME;
|
||||||
|
$db['auth-mysql']['password'] = CODEPOT_AUTH_MYSQL_PASSWORD;
|
||||||
|
$db['auth-mysql']['database'] = CODEPOT_AUTH_MYSQL_NAME;
|
||||||
|
$db['auth-mysql']['dbdriver'] = "mysql";
|
||||||
|
$db['auth-mysql']['dbprefix'] = CODEPOT_AUTH_MYSQL_PREFIX;
|
||||||
|
$db['auth-mysql']['pconnect'] = FALSE;
|
||||||
|
$db['auth-mysql']['db_debug'] = FALSE;
|
||||||
|
$db['auth-mysql']['cache_on'] = FALSE;
|
||||||
|
$db['auth-mysql']['cachedir'] = "";
|
||||||
|
$db['auth-mysql']['char_set'] = "utf8";
|
||||||
|
$db['auth-mysql']['dbcollat'] = "utf8_general_ci";
|
||||||
|
|
||||||
/* End of file database.php */
|
/* End of file database.php */
|
||||||
/* Location: ./system/application/config/database.php */
|
/* Location: ./system/application/config/database.php */
|
||||||
|
@ -20,6 +20,7 @@ class Code extends Controller
|
|||||||
|
|
||||||
$this->load->library ('Language', 'lang');
|
$this->load->library ('Language', 'lang');
|
||||||
$this->lang->load ('common', CODEPOT_LANG);
|
$this->lang->load ('common', CODEPOT_LANG);
|
||||||
|
$this->lang->load ('code', CODEPOT_LANG);
|
||||||
}
|
}
|
||||||
|
|
||||||
function home ($projectid = '', $subdir = '', $rev = SVN_REVISION_HEAD)
|
function home ($projectid = '', $subdir = '', $rev = SVN_REVISION_HEAD)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
wwwdir=$(WWWDIR)/codepot/language/english
|
wwwdir=$(WWWDIR)/codepot/language/english
|
||||||
www_DATA = \
|
www_DATA = \
|
||||||
|
code_lang.php \
|
||||||
common_lang.php \
|
common_lang.php \
|
||||||
issue_lang.php \
|
issue_lang.php \
|
||||||
index.html \
|
index.html \
|
||||||
|
@ -166,6 +166,7 @@ top_builddir = @top_builddir@
|
|||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
wwwdir = $(WWWDIR)/codepot/language/english
|
wwwdir = $(WWWDIR)/codepot/language/english
|
||||||
www_DATA = \
|
www_DATA = \
|
||||||
|
code_lang.php \
|
||||||
common_lang.php \
|
common_lang.php \
|
||||||
issue_lang.php \
|
issue_lang.php \
|
||||||
index.html \
|
index.html \
|
||||||
|
9
codepot/src/codepot/language/english/code_lang.php
Normal file
9
codepot/src/codepot/language/english/code_lang.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
$lang['CODE_COMMIT'] = 'Commit';
|
||||||
|
$lang['CODE_HIDE_DETAILS'] = 'Hide details';
|
||||||
|
$lang['CODE_PROPERTIES'] = 'Properties';
|
||||||
|
$lang['CODE_PROPERTY'] = 'Property';
|
||||||
|
$lang['CODE_SHOW_DETAILS'] = 'Show details';
|
||||||
|
|
||||||
|
$lang['CODE_MSG_COMMITTED_BY_ON'] = 'Committed by %s on %s';
|
||||||
|
?>
|
@ -1,5 +1,6 @@
|
|||||||
wwwdir=$(WWWDIR)/codepot/language/korean
|
wwwdir=$(WWWDIR)/codepot/language/korean
|
||||||
www_DATA = \
|
www_DATA = \
|
||||||
|
code_lang.php \
|
||||||
common_lang.php \
|
common_lang.php \
|
||||||
issue_lang.php \
|
issue_lang.php \
|
||||||
index.html \
|
index.html \
|
||||||
|
@ -166,6 +166,7 @@ top_builddir = @top_builddir@
|
|||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
wwwdir = $(WWWDIR)/codepot/language/korean
|
wwwdir = $(WWWDIR)/codepot/language/korean
|
||||||
www_DATA = \
|
www_DATA = \
|
||||||
|
code_lang.php \
|
||||||
common_lang.php \
|
common_lang.php \
|
||||||
issue_lang.php \
|
issue_lang.php \
|
||||||
index.html \
|
index.html \
|
||||||
|
9
codepot/src/codepot/language/korean/code_lang.php
Normal file
9
codepot/src/codepot/language/korean/code_lang.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
$lang['CODE_COMMIT'] = '커밋';
|
||||||
|
$lang['CODE_HIDE_DETAILS'] = '상세내역숨김';
|
||||||
|
$lang['CODE_PROPERTIES'] = '속성';
|
||||||
|
$lang['CODE_PROPERTY'] = '속성';
|
||||||
|
$lang['CODE_SHOW_DETAILS'] = '상세내역보기';
|
||||||
|
|
||||||
|
$lang['CODE_MSG_COMMITTED_BY_ON'] = '%s가 %s에 커밋함';
|
||||||
|
?>
|
@ -6,6 +6,7 @@ www_DATA = \
|
|||||||
ldaploginmodel.php \
|
ldaploginmodel.php \
|
||||||
loginmodel.php \
|
loginmodel.php \
|
||||||
logmodel.php \
|
logmodel.php \
|
||||||
|
mysqlloginmodel.php \
|
||||||
projectmodel.php \
|
projectmodel.php \
|
||||||
sitemodel.php \
|
sitemodel.php \
|
||||||
subversionmodel.php \
|
subversionmodel.php \
|
||||||
|
@ -172,6 +172,7 @@ www_DATA = \
|
|||||||
ldaploginmodel.php \
|
ldaploginmodel.php \
|
||||||
loginmodel.php \
|
loginmodel.php \
|
||||||
logmodel.php \
|
logmodel.php \
|
||||||
|
mysqlloginmodel.php \
|
||||||
projectmodel.php \
|
projectmodel.php \
|
||||||
sitemodel.php \
|
sitemodel.php \
|
||||||
subversionmodel.php \
|
subversionmodel.php \
|
||||||
|
37
codepot/src/codepot/models/mysqlloginmodel.php
Normal file
37
codepot/src/codepot/models/mysqlloginmodel.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
require_once 'loginmodel.php';
|
||||||
|
|
||||||
|
class MysqlLoginModel extends LoginModel
|
||||||
|
{
|
||||||
|
function LdapLoginModel ()
|
||||||
|
{
|
||||||
|
parent::LoginModel ();
|
||||||
|
$this->load->database ('auth-mysql');
|
||||||
|
}
|
||||||
|
|
||||||
|
function authenticate ($userid, $password)
|
||||||
|
{
|
||||||
|
$this->db->trans_start ();
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
$this->db->select ('username');
|
||||||
|
$this->db->where ('username', $userid);
|
||||||
|
$this->db->where ('passwd', $userid);
|
||||||
|
*/
|
||||||
|
$this->db->trans_complete ();
|
||||||
|
if ($this->db->trans_status() === FALSE) return FALSE;
|
||||||
|
|
||||||
|
return parent::authenticate ($userid, $password, $email);
|
||||||
|
}
|
||||||
|
|
||||||
|
function queryUserInfo ($userid)
|
||||||
|
{
|
||||||
|
$user['id'] = '';
|
||||||
|
$user['email'] = '';
|
||||||
|
|
||||||
|
return $user;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -7,9 +7,21 @@ class SubversionModel extends Model
|
|||||||
parent::Model ();
|
parent::Model ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _canonical_path($path)
|
||||||
|
{
|
||||||
|
$canonical = preg_replace('|/\.?(?=/)|','',$path);
|
||||||
|
while (($collapsed = preg_replace('|/[^/]+/\.\./|','/',$canonical,1)) !== $canonical)
|
||||||
|
{
|
||||||
|
$canonical = $collapsed;
|
||||||
|
}
|
||||||
|
$canonical = preg_replace('|^/\.\./|','/',$canonical);
|
||||||
|
return $canonical;
|
||||||
|
}
|
||||||
|
|
||||||
function getFile ($projectid, $path, $rev = SVN_REVISION_HEAD)
|
function getFile ($projectid, $path, $rev = SVN_REVISION_HEAD)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file://'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$info = @svn_info ($url, FALSE, $rev);
|
$info = @svn_info ($url, FALSE, $rev);
|
||||||
if ($info === FALSE || count($info) != 1) return FALSE;
|
if ($info === FALSE || count($info) != 1) return FALSE;
|
||||||
@ -31,10 +43,20 @@ class SubversionModel extends Model
|
|||||||
1, SVN_DISCOVER_CHANGED_PATHS);
|
1, SVN_DISCOVER_CHANGED_PATHS);
|
||||||
if ($log === FALSE) return FALSE;
|
if ($log === FALSE) return FALSE;
|
||||||
|
|
||||||
|
$prop = @svn_proplist ($url, FALSE, $rev);
|
||||||
|
if ($prop === FALSE) return FALSE;
|
||||||
|
|
||||||
|
if (array_key_exists ($url, $prop))
|
||||||
|
{
|
||||||
|
$fileinfo['properties'] = $prop[$url];
|
||||||
|
}
|
||||||
|
else $fileinfo['properties'] = NULL;
|
||||||
|
|
||||||
$fileinfo['fullpath'] = substr (
|
$fileinfo['fullpath'] = substr (
|
||||||
$info[0]['url'], strlen($info[0]['repos']));
|
$info[0]['url'], strlen($info[0]['repos']));
|
||||||
$fileinfo['content'] = $str;
|
$fileinfo['content'] = $str;
|
||||||
$fileinfo['logmsg'] = (count($log) > 0)? $log[0]['msg']: '';
|
$fileinfo['logmsg'] = (count($log) > 0)? $log[0]['msg']: '';
|
||||||
|
|
||||||
return $fileinfo;
|
return $fileinfo;
|
||||||
}
|
}
|
||||||
else if ($info[0]['kind'] == SVN_NODE_DIR)
|
else if ($info[0]['kind'] == SVN_NODE_DIR)
|
||||||
@ -52,6 +74,13 @@ class SubversionModel extends Model
|
|||||||
if ($log === FALSE) return FALSE;
|
if ($log === FALSE) return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$prop = @svn_proplist ($url, FALSE, $rev);
|
||||||
|
if ($prop === FALSE) return FALSE;
|
||||||
|
|
||||||
|
if (array_key_exists ($url, $prop))
|
||||||
|
$fileinfo['properties'] = $prop[$url];
|
||||||
|
else $fileinfo['properties'] = NULL;
|
||||||
|
|
||||||
$fileinfo['fullpath'] = substr (
|
$fileinfo['fullpath'] = substr (
|
||||||
$info[0]['url'], strlen($info[0]['repos']));
|
$info[0]['url'], strlen($info[0]['repos']));
|
||||||
$fileinfo['name'] = $info[0]['path'];
|
$fileinfo['name'] = $info[0]['path'];
|
||||||
@ -69,7 +98,8 @@ class SubversionModel extends Model
|
|||||||
|
|
||||||
function getBlame ($projectid, $path, $rev = SVN_REVISION_HEAD)
|
function getBlame ($projectid, $path, $rev = SVN_REVISION_HEAD)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$info = @svn_info ($url, FALSE, $rev);
|
$info = @svn_info ($url, FALSE, $rev);
|
||||||
if ($info === FALSE || count($info) != 1) return FALSE;
|
if ($info === FALSE || count($info) != 1) return FALSE;
|
||||||
@ -100,7 +130,8 @@ class SubversionModel extends Model
|
|||||||
|
|
||||||
function getHistory ($projectid, $path, $rev = SVN_REVISION_HEAD)
|
function getHistory ($projectid, $path, $rev = SVN_REVISION_HEAD)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$info = @svn_info ($url, FALSE, $rev);
|
$info = @svn_info ($url, FALSE, $rev);
|
||||||
if ($info === FALSE || count($info) != 1) return FALSE;
|
if ($info === FALSE || count($info) != 1) return FALSE;
|
||||||
@ -134,7 +165,8 @@ class SubversionModel extends Model
|
|||||||
|
|
||||||
function getRevHistory ($projectid, $path, $rev)
|
function getRevHistory ($projectid, $path, $rev)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$info = @svn_info ($url, FALSE, $rev);
|
$info = @svn_info ($url, FALSE, $rev);
|
||||||
if ($info === FALSE || count($info) != 1) return FALSE;
|
if ($info === FALSE || count($info) != 1) return FALSE;
|
||||||
@ -420,7 +452,8 @@ class SubversionModel extends Model
|
|||||||
//
|
//
|
||||||
function getDiff ($projectid, $path, $rev1, $rev2)
|
function getDiff ($projectid, $path, $rev1, $rev2)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$lsinfo1 = @svn_ls ($url, $rev1, FALSE, TRUE);
|
$lsinfo1 = @svn_ls ($url, $rev1, FALSE, TRUE);
|
||||||
if ($lsinfo1 === FALSE || count($lsinfo1) != 1) return FALSE;
|
if ($lsinfo1 === FALSE || count($lsinfo1) != 1) return FALSE;
|
||||||
@ -504,7 +537,8 @@ class SubversionModel extends Model
|
|||||||
|
|
||||||
function getPrevRev ($projectid, $path, $rev)
|
function getPrevRev ($projectid, $path, $rev)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$log = @svn_log (
|
$log = @svn_log (
|
||||||
$url, $rev, SVN_REVISION_INITIAL, 2,
|
$url, $rev, SVN_REVISION_INITIAL, 2,
|
||||||
@ -520,7 +554,8 @@ class SubversionModel extends Model
|
|||||||
|
|
||||||
function getNextRev ($projectid, $path, $rev)
|
function getNextRev ($projectid, $path, $rev)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$log = @svn_log (
|
$log = @svn_log (
|
||||||
$url, SVN_REVISION_HEAD, $rev, 0,
|
$url, SVN_REVISION_HEAD, $rev, 0,
|
||||||
@ -557,7 +592,8 @@ class SubversionModel extends Model
|
|||||||
|
|
||||||
function getHeadRev ($projectid, $path)
|
function getHeadRev ($projectid, $path)
|
||||||
{
|
{
|
||||||
$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
//$url = 'file:///'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}";
|
||||||
|
$url = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}");
|
||||||
|
|
||||||
$log = @svn_log (
|
$log = @svn_log (
|
||||||
$url, SVN_REVISION_HEAD, SVN_REVISION_INITIAL, 1,
|
$url, SVN_REVISION_HEAD, SVN_REVISION_INITIAL, 1,
|
||||||
|
@ -10,6 +10,36 @@
|
|||||||
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-lua.js"></script>
|
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-lua.js"></script>
|
||||||
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-sql.js"></script>
|
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-sql.js"></script>
|
||||||
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-vb.js"></script>
|
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-vb.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="<?=base_url()?>/js/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="<?=base_url()?>/js/jquery-ui.min.js"></script>
|
||||||
|
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/jquery-ui.css" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
if ($("#code_blame_mainarea_result_info").is(":visible"))
|
||||||
|
btn_label = "<?=$this->lang->line('CODE_HIDE_DETAILS')?>";
|
||||||
|
else
|
||||||
|
btn_label = "<?=$this->lang->line('CODE_SHOW_DETAILS')?>";
|
||||||
|
|
||||||
|
btn = $("#code_blame_mainarea_details_button").button({"label": btn_label}).click (function () {
|
||||||
|
|
||||||
|
if ($("#code_blame_mainarea_result_info").is(":visible"))
|
||||||
|
{
|
||||||
|
$("#code_blame_mainarea_result_info").hide();
|
||||||
|
$("#code_blame_mainarea_details_button").button(
|
||||||
|
"option", "label", "<?=$this->lang->line('CODE_SHOW_DETAILS')?>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#code_blame_mainarea_result_info").show();
|
||||||
|
$("#code_blame_mainarea_details_button").button(
|
||||||
|
"option", "label", "<?=$this->lang->line('CODE_HIDE_DETAILS')?>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<title><?=htmlspecialchars($project->name)?></title>
|
<title><?=htmlspecialchars($project->name)?></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -112,12 +142,11 @@ print anchor ("code/history/{$project->id}/{$xpar}", $this->lang->line('History'
|
|||||||
</div> <!-- code_blame_mainarea_menu -->
|
</div> <!-- code_blame_mainarea_menu -->
|
||||||
|
|
||||||
<div class="infostrip" id="code_blame_mainarea_infostrip">
|
<div class="infostrip" id="code_blame_mainarea_infostrip">
|
||||||
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
|
<?=anchor ("code/blame/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
|
||||||
<?=$this->lang->line('Revision')?>: <?=$file['created_rev']?>
|
<?=$this->lang->line('Revision')?>: <?=$file['created_rev']?>
|
||||||
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['next_rev']}", '>>')?> |
|
<?=anchor ("code/blame/{$project->id}/${xpar}/{$file['next_rev']}", '>>')?> |
|
||||||
<?=$this->lang->line('Author')?>: <?=htmlspecialchars($file['last_author'])?> |
|
|
||||||
<?=$this->lang->line('Size')?>: <?=$file['size']?> |
|
<?=$this->lang->line('Size')?>: <?=$file['size']?> |
|
||||||
<?=$this->lang->line('Last updated on')?>: <?=$file['time']?>
|
<a id="code_blame_mainarea_details_button" href='#'><?=$this->lang->line('Details')?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="code_blame_mainarea_result">
|
<div id="code_blame_mainarea_result">
|
||||||
@ -174,21 +203,34 @@ print anchor ("code/history/{$project->id}/{$xpar}", $this->lang->line('History'
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<div id="code_blame_mainarea_result_info">
|
<div id="code_blame_mainarea_result_info">
|
||||||
<script language='javascript'>
|
<div class="title"><?= $this->lang->line('CODE_COMMIT') ?></div>
|
||||||
function toggle_logmsg()
|
<?php printf ($this->lang->line('CODE_MSG_COMMITTED_BY_ON'), $file['last_author'], $file['time']); ?>
|
||||||
{
|
|
||||||
var x = document.getElementById ('code_blame_mainarea_result_info_logmsg');
|
|
||||||
if (x) x.style.visibility = (x.style.visibility == 'visible')? 'hidden': 'visible';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="title">
|
<div class="title"><?= $this->lang->line('Message') ?></div>
|
||||||
<a href='#' onClick='toggle_logmsg()'><?= $this->lang->line('Message') ?></a>
|
<pre id="code_blame_mainarea_result_info_logmsg">
|
||||||
</div>
|
|
||||||
<pre id="code_blame_mainarea_result_info_logmsg" style="visibility: visible">
|
|
||||||
<?= $file['logmsg'] ?>
|
<?= $file['logmsg'] ?>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (array_key_exists('properties', $file) && count($file['properties']) > 0)
|
||||||
|
{
|
||||||
|
print '<div class="title">';
|
||||||
|
print $this->lang->line('CODE_PROPERTIES');
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<ul id="code_blame_mainarea_result_info_property_list">';
|
||||||
|
foreach ($file['properties'] as $pn => $pv)
|
||||||
|
{
|
||||||
|
print '<li>';
|
||||||
|
print htmlspecialchars($pn);
|
||||||
|
print ' - ';
|
||||||
|
print htmlspecialchars($pv);
|
||||||
|
print '</li>';
|
||||||
|
}
|
||||||
|
print '</ul>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</pre>
|
||||||
</div> <!-- code_blame_mainarea_result_info -->
|
</div> <!-- code_blame_mainarea_result_info -->
|
||||||
|
|
||||||
</div> <!-- code_blame_mainarea_result -->
|
</div> <!-- code_blame_mainarea_result -->
|
||||||
|
@ -10,6 +10,36 @@
|
|||||||
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-lua.js"></script>
|
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-lua.js"></script>
|
||||||
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-sql.js"></script>
|
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-sql.js"></script>
|
||||||
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-vb.js"></script>
|
<script type="text/javascript" src="<?=base_url()?>/js/prettify/lang-vb.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="<?=base_url()?>/js/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="<?=base_url()?>/js/jquery-ui.min.js"></script>
|
||||||
|
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/jquery-ui.css" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
if ($("#code_file_mainarea_result_info").is(":visible"))
|
||||||
|
btn_label = "<?=$this->lang->line('CODE_HIDE_DETAILS')?>";
|
||||||
|
else
|
||||||
|
btn_label = "<?=$this->lang->line('CODE_SHOW_DETAILS')?>";
|
||||||
|
|
||||||
|
btn = $("#code_file_mainarea_details_button").button({"label": btn_label}).click (function () {
|
||||||
|
|
||||||
|
if ($("#code_file_mainarea_result_info").is(":visible"))
|
||||||
|
{
|
||||||
|
$("#code_file_mainarea_result_info").hide();
|
||||||
|
$("#code_file_mainarea_details_button").button(
|
||||||
|
"option", "label", "<?=$this->lang->line('CODE_SHOW_DETAILS')?>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#code_file_mainarea_result_info").show();
|
||||||
|
$("#code_file_mainarea_details_button").button(
|
||||||
|
"option", "label", "<?=$this->lang->line('CODE_HIDE_DETAILS')?>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<title><?=htmlspecialchars($project->name)?></title>
|
<title><?=htmlspecialchars($project->name)?></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -113,9 +143,8 @@ $this->load->view (
|
|||||||
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
|
<?=anchor ("code/file/{$project->id}/${xpar}/{$file['prev_rev']}", '<<')?>
|
||||||
<?=$this->lang->line('Revision')?>: <?=$file['created_rev']?>
|
<?=$this->lang->line('Revision')?>: <?=$file['created_rev']?>
|
||||||
<?=anchor ("code/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('Size')?>: <?=$file['size']?> |
|
||||||
<?=$this->lang->line('Last updated on')?>: <?=$file['time']?>
|
<a id="code_file_mainarea_details_button" href='#'><?=$this->lang->line('Details')?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="code_file_mainarea_result">
|
<div id="code_file_mainarea_result">
|
||||||
@ -153,21 +182,34 @@ if ($fileext == '') $fileext = "html"
|
|||||||
|
|
||||||
|
|
||||||
<div id="code_file_mainarea_result_info">
|
<div id="code_file_mainarea_result_info">
|
||||||
<script language='javascript'>
|
<div class="title"><?= $this->lang->line('CODE_COMMIT') ?></div>
|
||||||
function toggle_logmsg()
|
<?php printf ($this->lang->line('CODE_MSG_COMMITTED_BY_ON'), $file['last_author'], $file['time']); ?>
|
||||||
{
|
|
||||||
var x = document.getElementById ('code_file_mainarea_result_info_logmsg');
|
|
||||||
if (x) x.style.visibility = (x.style.visibility == 'visible')? 'hidden': 'visible';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="title">
|
<div class="title"><?= $this->lang->line('Message') ?></div>
|
||||||
<a href='#' onClick='toggle_logmsg()'><?= $this->lang->line('Message') ?></a>
|
<pre id="code_file_mainarea_result_info_logmsg">
|
||||||
</div>
|
|
||||||
<pre id="code_file_mainarea_result_info_logmsg" style="visibility: visible">
|
|
||||||
<?= $file['logmsg'] ?>
|
<?= $file['logmsg'] ?>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (array_key_exists('properties', $file) && count($file['properties']) > 0)
|
||||||
|
{
|
||||||
|
print '<div class="title">';
|
||||||
|
print $this->lang->line('CODE_PROPERTIES');
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<ul id="code_file_mainarea_result_info_property_list">';
|
||||||
|
foreach ($file['properties'] as $pn => $pv)
|
||||||
|
{
|
||||||
|
print '<li>';
|
||||||
|
print htmlspecialchars($pn);
|
||||||
|
print ' - ';
|
||||||
|
print htmlspecialchars($pv);
|
||||||
|
print '</li>';
|
||||||
|
}
|
||||||
|
print '</ul>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</pre>
|
||||||
</div> <!-- code_file_mainarea_result_info -->
|
</div> <!-- code_file_mainarea_result_info -->
|
||||||
|
|
||||||
</div> <!-- code_file_mainarea_result -->
|
</div> <!-- code_file_mainarea_result -->
|
||||||
|
@ -35,12 +35,19 @@ function load_ini ($file)
|
|||||||
array ('max_logs_in_site_home', 'integer', 10),
|
array ('max_logs_in_site_home', 'integer', 10),
|
||||||
array ('max_logs_in_project_home', 'integer', 5),
|
array ('max_logs_in_project_home', 'integer', 5),
|
||||||
|
|
||||||
|
array ('database_hostname', 'string', 'localhost'),
|
||||||
array ('database_username', 'string', ''),
|
array ('database_username', 'string', ''),
|
||||||
array ('database_password', 'string', ''),
|
array ('database_password', 'string', ''),
|
||||||
array ('database_name', 'string', ''),
|
array ('database_name', 'string', ''),
|
||||||
array ('database_driver', 'string', ''),
|
array ('database_driver', 'string', ''),
|
||||||
array ('database_prefix', 'string', ''),
|
array ('database_prefix', 'string', ''),
|
||||||
|
|
||||||
|
array ('auth_mysql_hostname', 'string', 'localhost'),
|
||||||
|
array ('auth_mysql_username', 'string', ''),
|
||||||
|
array ('auth_mysql_password', 'string', ''),
|
||||||
|
array ('auth_mysql_name', 'string', ''),
|
||||||
|
array ('auth_mysql_prefix', 'string', ''),
|
||||||
|
|
||||||
array ('ldap_server_host', 'string', '127.0.0.1'),
|
array ('ldap_server_host', 'string', '127.0.0.1'),
|
||||||
array ('ldap_server_port', 'integer', 389),
|
array ('ldap_server_port', 'integer', 389),
|
||||||
array ('ldap_server_protocol_version', 'integer', 3),
|
array ('ldap_server_protocol_version', 'integer', 3),
|
||||||
|
@ -28,9 +28,14 @@
|
|||||||
|
|
||||||
#code_file_mainarea_result_info {
|
#code_file_mainarea_result_info {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 5;
|
||||||
right: 0;
|
right: 5;
|
||||||
width: 22em;
|
width: 22em;
|
||||||
|
background: #E5ECF9 none repeat scroll 0 0;
|
||||||
|
border: #D4DBE8 1px solid;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0.2em 0.4em 0.2em 0.4em;
|
||||||
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_file_mainarea_result_info pre {
|
#code_file_mainarea_result_info pre {
|
||||||
@ -38,24 +43,20 @@
|
|||||||
border: 0;
|
border: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
background-color: inherit;
|
||||||
|
white-space: -moz-pre-wrap;
|
||||||
|
white-space: -o-pre-wrap;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_file_mainarea_result_info .title {
|
#code_file_mainarea_result_info .title {
|
||||||
background-color: #7777FF;
|
background-color: #8888FF;
|
||||||
border: 0;
|
color: #FFFFFF;
|
||||||
margin: 0;
|
border: #D4DBE8 1px solid;
|
||||||
font-size: 0.8em;
|
margin: 0.3em 0 0.3em 0;
|
||||||
text-align: right;
|
padding: 0.1em 0.1em 0.1em 0.1em;
|
||||||
}
|
|
||||||
|
|
||||||
#code_file_mainarea_result_info .title a {
|
|
||||||
color: white;
|
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
background-color: inherit;
|
text-transform: uppercase;
|
||||||
}
|
|
||||||
|
|
||||||
#code_file_mainarea_result_info .title a:hover {
|
|
||||||
background-color: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------
|
/*-----------------------------------------------
|
||||||
@ -72,9 +73,14 @@
|
|||||||
|
|
||||||
#code_blame_mainarea_result_info {
|
#code_blame_mainarea_result_info {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 5;
|
||||||
right: 0;
|
right: 5;
|
||||||
width: 22em;
|
width: 22em;
|
||||||
|
background: #E5ECF9 none repeat scroll 0 0;
|
||||||
|
border: #D4DBE8 1px solid;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0.2em 0.4em 0.2em 0.4em;
|
||||||
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_blame_mainarea_result_info pre {
|
#code_blame_mainarea_result_info pre {
|
||||||
@ -82,24 +88,20 @@
|
|||||||
border: 0;
|
border: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
background-color: inherit;
|
||||||
|
white-space: -moz-pre-wrap;
|
||||||
|
white-space: -o-pre-wrap;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_blame_mainarea_result_info .title {
|
#code_blame_mainarea_result_info .title {
|
||||||
background-color: #7777FF;
|
background-color: #8888FF;
|
||||||
border: 0;
|
color: #FFFFFF;
|
||||||
margin: 0;
|
border: #D4DBE8 1px solid;
|
||||||
font-size: 0.8em;
|
margin: 0.3em 0 0.3em 0;
|
||||||
text-align: right;
|
padding: 0.1em 0.1em 0.1em 0.1em;
|
||||||
}
|
|
||||||
|
|
||||||
#code_blame_mainarea_result_info .title a {
|
|
||||||
color: white;
|
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
background-color: inherit;
|
text-transform: uppercase;
|
||||||
}
|
|
||||||
|
|
||||||
#code_blame_mainarea_result_info .title a:hover {
|
|
||||||
background-color: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------
|
/*-----------------------------------------------
|
||||||
@ -127,6 +129,9 @@
|
|||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
white-space: -moz-pre-wrap;
|
||||||
|
white-space: -o-pre-wrap;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code_history_mainarea_result_table .title {
|
#code_history_mainarea_result_table .title {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user