enabled front page editing

This commit is contained in:
hyung-hwan 2010-03-21 14:50:08 +00:00
parent 2941be5ebe
commit 71c9d686df
21 changed files with 352 additions and 101 deletions

View File

@ -1,12 +1,12 @@
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; default site ID ; default site language
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
default_siteid = "default"; default_site_language = "english";
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; banner to display when no project id is available ; default site name
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
default_banner = "@PACKAGE@" default_site_name = "@PACKAGE@"
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; database settings ; database settings

View File

@ -298,7 +298,7 @@ class Issue extends Controller
" - {$projectid}"; " - {$projectid}";
$this->load->view ($this->VIEW_ERROR, $data); $this->load->view ($this->VIEW_ERROR, $data);
} }
else if (!$login['sysadmin?'] && else if (!$login['sysadmin?'] && $mode != 'create' &&
$this->projects->projectHasMember($project->id, $login['id']) === FALSE) $this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{ {
$data['project'] = $project; $data['project'] = $project;
@ -307,6 +307,8 @@ class Issue extends Controller
} }
else else
{ {
{
}
$this->form_validation->set_rules ( $this->form_validation->set_rules (
'issue_projectid', 'project ID', 'required|alpha_dash|max_length[32]'); 'issue_projectid', 'project ID', 'required|alpha_dash|max_length[32]');
$this->form_validation->set_rules ( $this->form_validation->set_rules (

View File

@ -3,11 +3,13 @@
class Site extends Controller class Site extends Controller
{ {
var $VIEW_ERROR = 'error'; var $VIEW_ERROR = 'error';
var $VIEW_SHOW = 'site_show';
var $VIEW_HOME = 'site_home'; var $VIEW_HOME = 'site_home';
var $VIEW_EDIT = 'site_edit'; var $VIEW_EDIT = 'site_edit';
var $VIEW_DELETE = 'site_delete'; var $VIEW_DELETE = 'site_delete';
var $VIEW_LOG = 'log'; var $VIEW_LOG = 'log';
var $VIEW_PROJECT_LIST = 'project_list'; var $VIEW_PROJECT_LIST = 'project_list';
var $VIEW_SITE_ADMINHOME = 'site_adminhome';
function Site () function Site ()
{ {
@ -37,7 +39,7 @@ class Site extends Controller
$this->load->model ('ProjectModel', 'projects'); $this->load->model ('ProjectModel', 'projects');
$this->load->model ('LogModel', 'logs'); $this->load->model ('LogModel', 'logs');
$site = $this->sites->get (CODEPOT_DEFAULT_SITEID); $site = $this->sites->get ($this->config->config['language']);
if ($site === FALSE) if ($site === FALSE)
{ {
$data['login'] = $login; $data['login'] = $login;
@ -45,6 +47,17 @@ class Site extends Controller
$this->load->view ($this->VIEW_ERROR, $data); $this->load->view ($this->VIEW_ERROR, $data);
return; return;
} }
if ($site === NULL && CODEPOT_DEFAULT_SITE_LANGUAGE != '')
{
$site = $this->sites->get (CODEPOT_DEFAULT_SITE_LANGUAGE);
if ($site === FALSE)
{
$data['login'] = $login;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
}
if ($site === NULL) $site = $this->sites->getDefault (); if ($site === NULL) $site = $this->sites->getDefault ();
$latest_projects = $this->projects->getLatestProjects ($login['id'], CODEPOT_MAX_LATEST_PROJECTS); $latest_projects = $this->projects->getLatestProjects ($login['id'], CODEPOT_MAX_LATEST_PROJECTS);
@ -74,6 +87,60 @@ class Site extends Controller
$this->load->view ($this->VIEW_HOME, $data); $this->load->view ($this->VIEW_HOME, $data);
} }
function adminhome ()
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
$this->load->model ('SiteModel', 'sites');
$sites = $this->sites->getAll ($login['id']);
if ($sites === FALSE)
{
$data['login'] = $login;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['login'] = $login;
$data['sites'] = $sites;
$this->load->view ($this->VIEW_SITE_ADMINHOME, $data);
}
}
function show ($siteid)
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
$this->load->model ('SiteModel', 'sites');
$data['login'] = $login;
$site = $this->sites->get ($siteid);
if ($site === FALSE)
{
$data['login'] = $login;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
if ($site === NULL)
{
$data['message'] = "NO SUCH SITE - {$siteid}";
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
$data['site'] = $site;
$this->load->view ($this->VIEW_SHOW, $data);
}
function _edit_site ($site, $mode, $login) function _edit_site ($site, $mode, $login)
{ {
$this->load->helper ('form'); $this->load->helper ('form');
@ -120,8 +187,7 @@ class Site extends Controller
} }
else else
{ {
//redirect ('site/home/' . $site->id); redirect ("site/show/{$site->id}");
redirect ('site/home');
} }
} }
else else
@ -232,16 +298,15 @@ class Site extends Controller
else else
{ {
// the site has been deleted successfully. // the site has been deleted successfully.
// go back to the site home. // go back to the site admin home.
redirect ('site/home'); redirect ('site/adminhome');
} }
} }
else else
{ {
// the confirm checkbox is not checked. // the confirm checkbox is not checked.
// go back to the site home page. // go back to the site adminhome page.
//redirect ('site/home/' . $site->id); redirect ('site/adminhome');
redirect ('site/home');
} }
} }
else else

View File

@ -1,4 +1,5 @@
<?php <?php
$lang['Administration'] = 'Administration';
$lang['All'] = 'All'; $lang['All'] = 'All';
$lang['Author'] = 'Author'; $lang['Author'] = 'Author';
$lang['Blame'] = 'Blame'; $lang['Blame'] = 'Blame';
@ -30,7 +31,11 @@ $lang['Home'] = 'Home';
$lang['ID'] = 'ID'; $lang['ID'] = 'ID';
$lang['Issue'] = 'Issue'; $lang['Issue'] = 'Issue';
$lang['Issues'] = 'Issues'; $lang['Issues'] = 'Issues';
$lang['Language'] = 'Language';
$lang['Last'] = 'Last'; $lang['Last'] = 'Last';
$lang['Last updated by'] = 'Last updated by';
$lang['Last updated on'] = 'Last updated on';
$lang['Latest projects'] = 'Latest projects';
$lang['MD5'] = 'MD5'; $lang['MD5'] = 'MD5';
$lang['Member'] = 'Member'; $lang['Member'] = 'Member';
$lang['Members'] = 'Members'; $lang['Members'] = 'Members';
@ -38,9 +43,6 @@ $lang['Message'] = 'Message';
$lang['My projects'] = 'My projects'; $lang['My projects'] = 'My projects';
$lang['Name'] = 'Name'; $lang['Name'] = 'Name';
$lang['New'] = 'New'; $lang['New'] = 'New';
$lang['Last updated by'] = 'Last updated by';
$lang['Last updated on'] = 'Last updated on';
$lang['Latest projects'] = 'Latest projects';
$lang['OK'] = 'OK'; $lang['OK'] = 'OK';
$lang['Other projects'] = 'Other projects'; $lang['Other projects'] = 'Other projects';
$lang['Overview'] = 'Overview'; $lang['Overview'] = 'Overview';

View File

@ -1,4 +1,5 @@
<?php <?php
$lang['Administration'] = 'Administration';
$lang['All'] = 'Semua'; $lang['All'] = 'Semua';
$lang['Author'] = 'Pengarang'; $lang['Author'] = 'Pengarang';
$lang['Blame'] = 'Menyalahkan'; $lang['Blame'] = 'Menyalahkan';
@ -30,7 +31,11 @@ $lang['Home'] = 'Beranda';
$lang['ID'] = 'ID'; $lang['ID'] = 'ID';
$lang['Issue'] = 'Issue'; $lang['Issue'] = 'Issue';
$lang['Issues'] = 'Issue'; $lang['Issues'] = 'Issue';
$lang['Language'] = 'Bahasa';
$lang['Last'] = 'Terakhir'; $lang['Last'] = 'Terakhir';
$lang['Last updated by'] = 'Terakhir memperbaharui oleh';
$lang['Last updated on'] = 'Waktu memperbaharui terakhir';
$lang['Latest projects'] = 'Proyek terakhir';
$lang['MD5'] = 'MD5'; $lang['MD5'] = 'MD5';
$lang['Member'] = 'Anggota'; $lang['Member'] = 'Anggota';
$lang['Members'] = 'Anggota'; $lang['Members'] = 'Anggota';
@ -38,9 +43,6 @@ $lang['Message'] = 'Pesan';
$lang['My projects'] = 'Proyek saya'; $lang['My projects'] = 'Proyek saya';
$lang['Name'] = 'Nama'; $lang['Name'] = 'Nama';
$lang['New'] = 'Baru'; $lang['New'] = 'Baru';
$lang['Last updated by'] = 'Terakhir memperbaharui oleh';
$lang['Last updated on'] = 'Waktu memperbaharui terakhir';
$lang['Latest projects'] = 'Proyek terakhir';
$lang['OK projects'] = 'OK'; $lang['OK projects'] = 'OK';
$lang['Other projects'] = 'Proyek lain'; $lang['Other projects'] = 'Proyek lain';
$lang['Overview'] = 'Ringkasan'; $lang['Overview'] = 'Ringkasan';

View File

@ -1,4 +1,5 @@
<?php <?php
$lang['Administration'] = '관리';
$lang['All'] = '모두'; $lang['All'] = '모두';
$lang['Author'] = '저자'; $lang['Author'] = '저자';
$lang['Blame'] = '책임전가'; $lang['Blame'] = '책임전가';
@ -30,7 +31,11 @@ $lang['Home'] = '홈';
$lang['ID'] = '아이디'; $lang['ID'] = '아이디';
$lang['Issue'] = '이슈'; $lang['Issue'] = '이슈';
$lang['Issues'] = '이슈'; $lang['Issues'] = '이슈';
$lang['Language'] = '언어';
$lang['Last'] = '마지막'; $lang['Last'] = '마지막';
$lang['Last updated by'] = '최종수정인';
$lang['Last updated on'] = '최종수정시간';
$lang['Latest projects'] = '최근 프로젝트';
$lang['MD5'] = 'MD5'; $lang['MD5'] = 'MD5';
$lang['Member'] = '구성원'; $lang['Member'] = '구성원';
$lang['Members'] = '구성원'; $lang['Members'] = '구성원';
@ -38,9 +43,6 @@ $lang['Message'] = '메시지';
$lang['My projects'] = '내 프로젝트'; $lang['My projects'] = '내 프로젝트';
$lang['Name'] = '이름'; $lang['Name'] = '이름';
$lang['New'] = '신규'; $lang['New'] = '신규';
$lang['Last updated by'] = '최종수정인';
$lang['Last updated on'] = '최종수정시간';
$lang['Latest projects'] = '최근 프로젝트';
$lang['OK'] = '확인'; $lang['OK'] = '확인';
$lang['Other projects'] = '다른 프로젝트'; $lang['Other projects'] = '다른 프로젝트';
$lang['Overview'] = '개요'; $lang['Overview'] = '개요';

View File

@ -10,8 +10,8 @@ class SiteModel extends Model
function getDefault () function getDefault ()
{ {
$site->id = CODEPOT_DEFAULT_SITEID; $site->id = CODEPOT_DEFAULT_SITE_LANGUAGE;
$site->name = CODEPOT_DEFAULT_BANNER; $site->name = CODEPOT_DEFAULT_SITE_NAME;
$site->text = ''; $site->text = '';
$site->updatedby = ''; $site->updatedby = '';
$site->createdby = ''; $site->createdby = '';
@ -48,6 +48,15 @@ class SiteModel extends Model
return $result[0]; return $result[0];
} }
function getAll ($userid)
{
$this->db->trans_start ();
$query = $this->db->get ('site');
$this->db->trans_complete ();
if ($this->db->trans_status() === FALSE) return FALSE;
return $query->result ();
}
function create ($userid, $site) function create ($userid, $site)
{ {
$this->db->trans_begin (); $this->db->trans_begin ();

View File

@ -24,9 +24,11 @@ www_DATA = \
project_home.php \ project_home.php \
project_list.php \ project_list.php \
projectbar.php \ projectbar.php \
site_adminhome.php \
site_edit.php \ site_edit.php \
site_delete.php \ site_delete.php \
site_home.php \ site_home.php \
site_show.php \
taskbar.php \ taskbar.php \
wiki_delete.php \ wiki_delete.php \
wiki_edit.php \ wiki_edit.php \

View File

@ -187,9 +187,11 @@ www_DATA = \
project_home.php \ project_home.php \
project_list.php \ project_list.php \
projectbar.php \ projectbar.php \
site_adminhome.php \
site_edit.php \ site_edit.php \
site_delete.php \ site_delete.php \
site_home.php \ site_home.php \
site_show.php \
taskbar.php \ taskbar.php \
wiki_delete.php \ wiki_delete.php \
wiki_edit.php \ wiki_edit.php \

View File

@ -16,7 +16,7 @@ function show_projectbar ($con, $site, $project, $pageid, $ctxmenuitems)
} }
else if (isset($site) && $site->name != '') else if (isset($site) && $site->name != '')
print htmlspecialchars($site->name); print htmlspecialchars($site->name);
else print htmlspecialchars(CODEPOT_DEFAULT_BANNER); else print htmlspecialchars(CODEPOT_DEFAULT_SITE_NAME);
print "</div>"; print "</div>";

View File

@ -0,0 +1,79 @@
<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/site.css" />
<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 () {
$('#site_new_button').button();
});
</script>
<title><?=htmlspecialchars($this->lang->line('Administration'))?></title>
</head>
<body>
<div class="content" id="site_adminhome_content">
<!---------------------------------------------------------------------------->
<?php $this->load->view ('taskbar'); ?>
<!---------------------------------------------------------------------------->
<?php
$this->load->view (
'projectbar',
array (
'site' => NULL,
'project' => NULL,
'pageid' => '',
'ctxmenuitems' => NULL
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea" id="site_adminhome_mainarea">
<div class="title"><?=$this->lang->line('Administration')?></div>
<div class="infostrip">
<span class="title">Front Pages</span>
<?php print anchor ('site/create', $this->lang->line('New'), 'id="site_new_button"'); ?>
</div>
<ul>
<?php
foreach ($sites as $site)
{
$cap = "{$site->name} ({$site->id})";
$anc = anchor ("site/show/{$site->id}", htmlspecialchars($cap));
print "<li>{$anc}</li>";
}
?>
</ul>
</div> <!-- site_adminhome_mainarea -->
<!---------------------------------------------------------------------------->
<?php $this->load->view ('footer'); ?>
<!---------------------------------------------------------------------------->
</div> <!-- site_adminhome_content -->
</body>
</html>

View File

@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <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/common.css" />
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/project.css" /> <link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/site.css" />
<title><?=htmlspecialchars($site->name)?></title> <title><?=htmlspecialchars($site->name)?></title>
</head> </head>
@ -33,12 +33,12 @@ $this->load->view (
<?php if ($message != "") print "<div id='site_create_message' class='form_message'>$message</div>"; ?> <?php if ($message != "") print "<div id='site_create_message' class='form_message'>$message</div>"; ?>
<?=form_open('site/delete/'.$site->id)?> <?=form_open("site/delete/{$site->id}")?>
<?=form_fieldset()?> <?=form_fieldset()?>
<div> <div>
<div> <div>
<?=form_checkbox('site_confirm', 'yes', set_checkbox('site_confirm', $site_confirm))?> <?=form_checkbox('site_confirm', 'yes', set_checkbox('site_confirm', $site_confirm))?>
<?=$this->lang->line('MSG_SURE_TO_DELETE_THIS')?> - <?=htmlspecialchars($site->name)?> <?=$this->lang->line('MSG_SURE_TO_DELETE_THIS')?> - <?=htmlspecialchars($site->name)?> (<?=$site->id?>)
<?=form_error('site_confirm')?> <?=form_error('site_confirm')?>
</div> </div>
</div> </div>

View File

@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <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/common.css" />
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/project.css" /> <link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/site.css" />
<title><?=htmlspecialchars($site->name)?></title> <title><?=htmlspecialchars($site->name)?></title>
</head> </head>
@ -39,20 +39,23 @@ $this->load->view (
if ($mode == 'update') $formurl .= '/'.$site->id; if ($mode == 'update') $formurl .= '/'.$site->id;
?> ?>
<?=form_open($formurl)?> <?=form_open($formurl, 'id="site_edit_form"')?>
<?=form_fieldset()?> <?=form_fieldset()?>
<div> <div>
<div> <div>
<?=form_label($this->lang->line('ID').': ', 'site_id')?> <?=form_label($this->lang->line('Language').': ', 'site_id')?>
<?=form_error('site_id')?> <?=form_error('site_id')?>
</div> </div>
<div> <div>
<?php <?php
$extra = ($mode == 'update')? 'readonly="readonly"': ''; $extra = ($mode == 'update')? 'readonly="readonly"': '';
$extra .= 'maxlength="32" size="16"'; $extra .= 'maxlength="32" size="16" class="id"';
?> ?>
<?=form_input('site_id', set_value('site_id', $site->id), $extra)?> <?=form_input('site_id',
set_value('site_id', $site->id),
$extra)
?>
</div> </div>
</div> </div>
@ -62,8 +65,10 @@ $this->load->view (
<?=form_error('site_name')?> <?=form_error('site_name')?>
</div> </div>
<div> <div>
<?php $extra = 'maxlength="80" size="40"'; ?> <?=form_input('site_name',
<?=form_input('site_name', set_value('site_name', $site->name), $extra)?> set_value('site_name', $site->name),
'maxlength="80" size="40" class="name"');
?>
</div> </div>
</div> </div>
@ -73,7 +78,10 @@ $this->load->view (
<?=form_error('site_text')?> <?=form_error('site_text')?>
</div> </div>
<div> <div>
<?=form_textarea('site_text', set_value('site_text', $site->text))?> <?=form_textarea('site_text',
set_value('site_text', $site->text),
'class="text"')
?>
</div> </div>
</div> </div>

View File

@ -3,7 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <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/common.css" />
<link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/project.css" /> <link type="text/css" rel="stylesheet" href="<?=base_url()?>/css/site.css" />
<script type="text/javascript" src="<?=base_url()?>/js/creole.js"></script> <script type="text/javascript" src="<?=base_url()?>/js/creole.js"></script>
<script type="text/javascript"> <script type="text/javascript">
function render_wiki() function render_wiki()
@ -35,23 +35,13 @@ function render_wiki()
<?php <?php
if ($login['sysadmin?'])
{
$ctxmenuitems = array (
array ("site/create", $this->lang->line('Create')),
array ("site/update/{$site->id}", $this->lang->line('Edit')),
array ("site/delete/{$site->id}", $this->lang->line('Delete'))
);
}
else $ctxmenuitems = array ();
$this->load->view ( $this->load->view (
'projectbar', 'projectbar',
array ( array (
'project' => NULL, 'project' => NULL,
'site' => $site, 'site' => $site,
'pageid' => 'site', 'pageid' => 'site',
'ctxmenuitems' => $ctxmenuitems 'ctxmenuitems' => NULL
) )
); );
?> ?>

View File

@ -0,0 +1,76 @@
<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/site.css" />
<script type="text/javascript" src="<?=base_url()?>/js/creole.js"></script>
<script type="text/javascript">
function render_wiki()
{
creole_render_wiki (
"site_show_mainarea_textpre",
"site_show_mainarea_text",
"<?=site_url()?>/site/wiki/"
);
}
</script>
<?php
?>
<title><?=htmlspecialchars($site->name)?> (<?=$site->id?>)</title>
</head>
<body onLoad="render_wiki()">
<div class="content" id="site_show_content">
<!---------------------------------------------------------------------------->
<?php $this->load->view ('taskbar'); ?>
<!---------------------------------------------------------------------------->
<?php
if ($login['sysadmin?'])
{
$ctxmenuitems = array (
array ("site/create", $this->lang->line('Create')),
array ("site/update/{$site->id}", $this->lang->line('Edit')),
array ("site/delete/{$site->id}", $this->lang->line('Delete'))
);
}
else $ctxmenuitems = array ();
$this->load->view (
'projectbar',
array (
'project' => NULL,
'site' => $site,
'pageid' => 'site',
'ctxmenuitems' => $ctxmenuitems
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea" id="site_show_mainarea">
<div id="site_show_mainarea_text">
<pre id="site_show_mainarea_textpre" style="visibility: hidden">
<?php print htmlspecialchars($site->text); ?>
</pre>
</div> <!-- site_show_mainarea_text -->
<!----------------------------------------------------------->
</div> <!-- site_show_mainarea -->
<?php $this->load->view ('footer'); ?>
</div> <!-- site_show_content -->
</body>
</html>

View File

@ -39,10 +39,8 @@ function show_taskbar ($con, $loginid, $issysadmin)
print '<div class="boxa">'; print '<div class="boxa">';
print anchor ('site/home', $con->lang->line('Home')); print anchor ('site/home', $con->lang->line('Home'));
print anchor ('site/projectlist', $con->lang->line('Projects')); print anchor ('site/projectlist', $con->lang->line('Projects'));
/*
if ($issysadmin) if ($issysadmin)
print anchor ('site/admin', $con->lang->line('System')); print anchor ('site/adminhome', $con->lang->line('Administration'));
*/
print '</div>'; print '</div>';
print '</div>'; print '</div>';

View File

@ -13,8 +13,8 @@ function load_ini ($file)
if (/*$cfg === FALSE*/ $cfg == FALSE) die ("ERROR: cannot parse $file"); if (/*$cfg === FALSE*/ $cfg == FALSE) die ("ERROR: cannot parse $file");
$xcfgs = array ( $xcfgs = array (
array ('default_siteid', 'string', 'default'), array ('default_site_language', 'string', 'english'),
array ('default_banner', 'string', '@PACKAGE@'), array ('default_site_name', 'string', '@PACKAGE@'),
array ('language', 'string', 'auto'), array ('language', 'string', 'auto'),
array ('enable_websvn', 'boolean', FALSE), array ('enable_websvn', 'boolean', FALSE),

View File

@ -6,6 +6,7 @@ www_DATA = \
issue.css \ issue.css \
jquery-ui.css \ jquery-ui.css \
project.css \ project.css \
site.css \
websvn.css websvn.css
EXTRA_DIST = $(www_DATA) EXTRA_DIST = $(www_DATA)

View File

@ -208,6 +208,7 @@ www_DATA = \
issue.css \ issue.css \
jquery-ui.css \ jquery-ui.css \
project.css \ project.css \
site.css \
websvn.css websvn.css
EXTRA_DIST = $(www_DATA) EXTRA_DIST = $(www_DATA)

View File

@ -68,53 +68,6 @@
font-weight: bold; font-weight: bold;
} }
/*-----------------------------------------------
* user home view
*-----------------------------------------------*/
#site_home_mainarea_sidebar {
width: 24em;
}
#site_home_mainarea_sidebar_log_table {
border-collapse: collapse;
}
#site_home_mainarea_sidebar_log_table tr.odd {
background-color: #bbccef;
}
#site_home_mainarea_sidebar_log_table tr.odd td {
white-space: nowrap;
}
#site_home_mainarea_sidebar_log_table tr.odd td.date {
width: 1px;
}
#site_home_mainarea_sidebar_log_table tr.even {
background-color: inherit;
}
#site_home_mainarea_sidebar_log_table tr.even .description {
font-style: italic;
}
#site_home_mainarea_sidebar_log_table tr.even pre.message {
border: 0;
margin: 1px;
background-color: inherit;
white-space: pre-wrap;
}
#site_home_mainarea_sidebar_log_table td.date {
width: 1px;
}
#site_home_mainarea_sidebar_log_table td.project {
width: 1px;
}
/*----------------------------------------------- /*-----------------------------------------------
* project home view * project home view
*-----------------------------------------------*/ *-----------------------------------------------*/
@ -149,7 +102,7 @@
white-space: pre-wrap; white-space: pre-wrap;
} }
#site_home_mainarea_sidebar_log_table td.date { #project_home_mainarea_sidebar_log_table td.date {
width: 1px; width: 1px;
} }

59
codepot/src/css/site.css Normal file
View File

@ -0,0 +1,59 @@
/*-----------------------------------------------
* site home view
*-----------------------------------------------*/
#site_home_mainarea_sidebar {
width: 24em;
}
#site_home_mainarea_sidebar_log_table {
border-collapse: collapse;
}
#site_home_mainarea_sidebar_log_table tr.odd {
background-color: #bbccef;
}
#site_home_mainarea_sidebar_log_table tr.odd td {
white-space: nowrap;
}
#site_home_mainarea_sidebar_log_table tr.odd td.date {
width: 1px;
}
#site_home_mainarea_sidebar_log_table tr.even {
background-color: inherit;
}
#site_home_mainarea_sidebar_log_table tr.even .description {
font-style: italic;
}
#site_home_mainarea_sidebar_log_table tr.even pre.message {
border: 0;
margin: 1px;
background-color: inherit;
white-space: pre-wrap;
}
#site_home_mainarea_sidebar_log_table td.date {
width: 1px;
}
#site_home_mainarea_sidebar_log_table td.project {
width: 1px;
}
/*-----------------------------------------------
* site adminhome view
*-----------------------------------------------*/
#site_adminhome_mainarea .infostrip span.title {
float: left;
}
/*-----------------------------------------------
* site edit view
*-----------------------------------------------*/
#site_edit_form .text {
width: 100%;
}