made sidebar boxes collapsible in the project home view and the site home view

This commit is contained in:
hyung-hwan 2015-04-17 05:26:24 +00:00
parent 39139aa5c2
commit 3432debaa2
11 changed files with 152 additions and 61 deletions

View File

@ -33,6 +33,7 @@ $lang['Error'] = 'Error';
$lang['File'] = 'File'; $lang['File'] = 'File';
$lang['Files'] = 'Files'; $lang['Files'] = 'Files';
$lang['Filter'] = 'Filter'; $lang['Filter'] = 'Filter';
$lang['Filters'] = 'Filters';
$lang['First'] = 'First'; $lang['First'] = 'First';
$lang['Folder'] = 'Folder'; $lang['Folder'] = 'Folder';
$lang['Full Difference'] = 'FullDiff'; $lang['Full Difference'] = 'FullDiff';

View File

@ -1,3 +1,7 @@
<?php <?php
$lang['PROJECT_MSG_TOTAL_PROJECTS'] = 'Total projects'; $lang['PROJECT_LABEL_TOTAL_PROJECTS'] = 'Total projects';
$lang['PROJECT_LABEL_MATCH_ALL_FILTERS'] = 'Match all filters';
$lang['PROJECT_LABEL_MATCH_ANY_FILTERS'] = 'Match any filters';
$lang['PROJECT_MSG_NO_CHANGE_LOG'] = 'No change log entries';
?> ?>

View File

@ -33,6 +33,7 @@ $lang['Error'] = 'Error';
$lang['File'] = 'File'; $lang['File'] = 'File';
$lang['Files'] = 'File'; $lang['Files'] = 'File';
$lang['Filter'] = 'Filter'; $lang['Filter'] = 'Filter';
$lang['Filters'] = 'Filters';
$lang['First'] = 'Pertama'; $lang['First'] = 'Pertama';
$lang['Folder'] = 'Folder'; $lang['Folder'] = 'Folder';
$lang['Full Difference'] = 'FullDiff'; $lang['Full Difference'] = 'FullDiff';

View File

@ -33,6 +33,7 @@ $lang['Error'] = '오류';
$lang['File'] = '파일'; $lang['File'] = '파일';
$lang['Files'] = '파일'; $lang['Files'] = '파일';
$lang['Filter'] = '필터'; $lang['Filter'] = '필터';
$lang['Filters'] = '필터';
$lang['First'] = '처음'; $lang['First'] = '처음';
$lang['Folder'] = '폴더'; $lang['Folder'] = '폴더';
$lang['Full Difference'] = '전체차이'; $lang['Full Difference'] = '전체차이';

View File

@ -1,3 +1,8 @@
<?php <?php
$lang['PROJECT_MSG_TOTAL_PROJECTS'] = '전체 프로젝트'; $lang['PROJECT_LABEL_TOTAL_PROJECTS'] = '전체 프로젝트';
$lang['PROJECT_LABEL_MATCH_ALL_FILTERS'] = '모든 필터조건을 만족해야함';
$lang['PROJECT_LABEL_MATCH_ANY_FILTERS'] = '하나 이상의 필터조건만 만족하면 됨';
$lang['PROJECT_MSG_NO_CHANGE_LOG'] = '변경기록이 없습니다';
?> ?>

View File

@ -201,12 +201,14 @@ $this->load->view (
<div id="project_catalog_mainarea_search_form"> <div id="project_catalog_mainarea_search_form">
<div> <div>
<span><?php print $this->lang->line('Filter'); ?></span> <span><?php print $this->lang->line('Filters'); ?></span>
<span id="project_catalog_mainarea_total_projects_holder"><?php printf ('%s: <span id="project_catalog_mainarea_total_projects">%d</span>', $this->lang->line('PROJECT_MSG_TOTAL_PROJECTS'), $total_num_projects); ?></span> <span id="project_catalog_mainarea_total_projects_holder"><?php printf ('%s: <span id="project_catalog_mainarea_total_projects">%d</span>', $this->lang->line('PROJECT_LABEL_TOTAL_PROJECTS'), $total_num_projects); ?></span>
</div> </div>
<form id="project_search_form"> <form id="project_search_form">
<div id="project_search_form_id_and_name"> <div id="project_search_form_id_and_name">
<?php <?php
// TODO: enhance filter condition operators. contains, equals, not equal, regex, etc
print form_label($this->lang->line('ID'), 'id'); print form_label($this->lang->line('ID'), 'id');
print ' '; print ' ';
print form_input('id', set_value('owner', $search->id), 'id="project_search_id"'); print form_input('id', set_value('owner', $search->id), 'id="project_search_id"');
@ -219,17 +221,19 @@ $this->load->view (
?> ?>
</div> </div>
<div id="project_search_form_summary_and_or"> <div id="project_search_form_summary">
<?php <?php
print form_label($this->lang->line('Summary'), 'summary'); print form_label($this->lang->line('Summary'), 'summary');
print ' '; print ' ';
print form_input('summary', set_value('summary', $search->summary), 'id="project_search_summary" size="50"'); print form_input('summary', set_value('summary', $search->summary), 'id="project_search_summary" size="50"');
?> ?>
</div>
<div id="project_search_form_or">
<?php <?php
print form_label('OR', 'or');
print ' '; print ' ';
print form_checkbox('or', 'Y', set_checkbox('or', $search->or), 'id="project_search_or"'); print form_checkbox('or', 'Y', set_checkbox('or', $search->or), 'id="project_search_or"');
print form_label($this->lang->line('PROJECT_LABEL_MATCH_ANY_FILTERS', 'or'));
?> ?>
</div> </div>
<?php <?php

View File

@ -35,10 +35,29 @@ function render_wiki()
); );
prettyPrint (); prettyPrint ();
$("#project_home_sidebar_info_box").accordion ({
collapsible: true
});
$("#project_home_sidebar_member_box").accordion ({
collapsible: true
});
$("#project_home_sidebar_repo_box").accordion ({
collapsible: true
});
$("#project_home_sidebar_log_box").accordion ({
collapsible: true
});
} }
$(function() { $(function() {
render_wiki (); render_wiki ();
}); });
</script> </script>
@ -78,8 +97,10 @@ $this->load->view (
<!-- /////////////////////////////////////////////////////////////////////// --> <!-- /////////////////////////////////////////////////////////////////////// -->
<div class="sidebar" id="project_home_sidebar"> <div class="sidebar" id="project_home_sidebar">
<div class="box">
<ul> <div id="project_home_sidebar_info_box" class="collapsible-box">
<div id="project_home_sidebar_info_header" class="collapsible-box-header"><?php print $this->lang->line('Summary')?></div>
<ul id="project_home_sidebar_info_list" class="collapsible-box-list">
<li><?php print $this->lang->line('Created on')?> <?php print $project->createdon?></li> <li><?php print $this->lang->line('Created on')?> <?php print $project->createdon?></li>
<li><?php print $this->lang->line('Created by')?> <?php print $project->createdby?></li> <li><?php print $this->lang->line('Created by')?> <?php print $project->createdby?></li>
<li><?php print $this->lang->line('Last updated on')?> <?php print $project->updatedon?></li> <li><?php print $this->lang->line('Last updated on')?> <?php print $project->updatedon?></li>
@ -87,9 +108,9 @@ $this->load->view (
</ul> </ul>
</div> </div>
<div class="box"> <div id="project_home_sidebar_member_box" class="collapsible-box">
<div class="boxtitle"><?php print $this->lang->line('Members')?></div> <div id="project_home_sidebar_member_header" class="collapsible-box-header"><?php print $this->lang->line('Members')?></div>
<ul> <ul id="project_home_sidebar_member_list" class="collapsible-box-list">
<?php <?php
$members = $project->members; $members = $project->members;
$member_count = count($members); $member_count = count($members);
@ -132,9 +153,9 @@ $this->load->view (
</ul> </ul>
</div> </div>
<div class="box"> <div id="project_home_sidebar_repo_box" class="collapsible-box">
<div class="boxtitle"><?php print $this->lang->line('Repository')?></div> <div id="project_home_sidebar_repo_header" class="collapsible-box-header"><?php print $this->lang->line('Repository')?></div>
<ul> <ul id="project_home_sidebar_repo_list" class="collapsible-box-list">
<?php <?php
$urls = explode (',', CODEPOT_SVN_BASE_URL); $urls = explode (',', CODEPOT_SVN_BASE_URL);
foreach ($urls as $url) foreach ($urls as $url)
@ -147,21 +168,17 @@ foreach ($urls as $url)
} }
?> ?>
</ul> </ul>
<pre>
<?php //print_r ($urls); ?>
<?php //print_r ($_SERVER); ?>
</pre>
</div> </div>
<div class="box"> <div id="project_home_sidebar_log_box" class="collapsible-box">
<div class="boxtitle"> <div id="project_home_sidebar_log_header" class="collapsible-box-header">
<?php print anchor ("/project/log/{$project->id}", $this->lang->line('Change log')) ?> <?php print anchor ("/project/log/{$project->id}", $this->lang->line('Change log')) ?>
</div> </div>
<?php <?php
print '<table id="project_home_sidebar_log_table" class="collapsible-box-table">';
if (count($log_entries) > 0) if (count($log_entries) > 0)
{ {
print '<table id="project_home_sidebar_log_table">';
$xdot = $this->converter->AsciiToHex ('.'); $xdot = $this->converter->AsciiToHex ('.');
foreach ($log_entries as $log) foreach ($log_entries as $log)
{ {
@ -264,9 +281,13 @@ foreach ($urls as $url)
print '</tr>'; print '</tr>';
} }
} }
}
else
{
printf ('<tr><td>%s</td></tr>', $this->lang->line('PROJECT_MSG_NO_CHANGE_LOG'));
}
print "</table>"; print "</table>";
}
?> ?>
</div> </div>

View File

@ -34,6 +34,18 @@ function render_wiki()
prettyPrint (); prettyPrint ();
} }
$(function () {
render_wiki ();
$("#site_home_sidebar_latest_projects_box").accordion ({
collapsible: true
});
$("#site_home_sidebar_log_box").accordion ({
collapsible: true
});
});
</script> </script>
<title><?php <title><?php
@ -44,7 +56,7 @@ function render_wiki()
?></title> ?></title>
</head> </head>
<body onload="render_wiki()"> <body>
<div class="content" id="site_home_content"> <div class="content" id="site_home_content">
@ -74,13 +86,13 @@ $this->load->view (
<!-- ////////////////////////////////////////////////////////////////////// --> <!-- ////////////////////////////////////////////////////////////////////// -->
<div class="mainarea" id="site_home_mainarea">
<div class="sidebar" id="site_home_mainarea_sidebar">
<div class="box"> <div class="sidebar" id="site_home_sidebar">
<div class="boxtitle"><?php print $this->lang->line('Latest projects')?></div>
<ul> <div id="site_home_sidebar_latest_projects_box" class="collapsible-box">
<div id="site_home_sidebar_latest_projects_header" class="collapsible-box-header"><?php print $this->lang->line('Latest projects'); ?></div>
<ul id="site_home_sidebar_latest_projects_list" class="collapsible-box-list">
<?php <?php
foreach ($latest_projects as $project) foreach ($latest_projects as $project)
{ {
@ -100,11 +112,9 @@ foreach ($latest_projects as $project)
</ul> </ul>
</div> </div>
<div class="box"> <div id="site_home_sidebar_log_box" class="collapsible-box">
<div class="boxtitle"> <div id="site_home_sidebar_log_header" class="collapsible-box-header"><?php print anchor ("/site/log", $this->lang->line('Change log')); ?></div>
<?php print anchor ("/site/log", $this->lang->line('Change log')) ?> <table id="site_home_sidebar_log_table" class="collapsible-box-table">
</div>
<table id="site_home_mainarea_sidebar_log_table">
<?php <?php
$xdot = $this->converter->AsciiToHex ('.'); $xdot = $this->converter->AsciiToHex ('.');
foreach ($log_entries as $log) foreach ($log_entries as $log)
@ -235,7 +245,9 @@ foreach ($latest_projects as $project)
</table> </table>
</div> <!-- box --> </div> <!-- box -->
</div> <!-- site_home_mainarea_sidebar --> </div> <!-- site_home_sidebar -->
<div class="mainarea" id="site_home_mainarea">
<div class="result" id="site_home_mainarea_result"> <div class="result" id="site_home_mainarea_result">

View File

@ -618,7 +618,7 @@ pre.prettyprint li.L9 { background: #eee }
box-shadow: 0 8px 6px -6px #777;*/ box-shadow: 0 8px 6px -6px #777;*/
} }
.content .sidebar .box .user_icon_img { .content .sidebar .user_icon_img {
height: 2em; height: 2em;
width: 2em; width: 2em;
vertical-align: middle; vertical-align: middle;

View File

@ -5,10 +5,31 @@
/*----------------------------------------------- /*-----------------------------------------------
* project home view * project home view
*-----------------------------------------------*/ *-----------------------------------------------*/
#project_home_sidebar_log_table {
#project_home_sidebar .collapsible-box {
margin-bottom: 1em;
}
#project_home_sidebar .collapsible-box-header {
background: #E5ECF9 none repeat scroll 0 0;
border: #D4DBE8 1px solid;
}
#project_home_sidebar .collapsible-box-list {
padding-left: 1.8em;
margin-left: 0;
line-height: 1.5em;
}
#project_home_sidebar .collapsible-box-table {
line-height: 1.5em;
border-collapse: collapse; border-collapse: collapse;
} }
#project_home_sidebar_log_table td {
padding-left: 0.5em;
}
#project_home_sidebar_log_table tr.odd { #project_home_sidebar_log_table tr.odd {
background-color: #bbccef; background-color: #bbccef;
} }

View File

@ -1,41 +1,62 @@
/*----------------------------------------------- /*-----------------------------------------------
* site home view * site home view
*-----------------------------------------------*/ *-----------------------------------------------*/
#site_home_mainarea_sidebar { #site_home_sidebar {
width: 24em; width: 24em;
padding-left: 0.5em;
} }
#site_home_mainarea_sidebar_log_table { #site_home_sidebar .collapsible-box {
margin-bottom: 1em;
}
#site_home_sidebar .collapsible-box-header {
background: #E5ECF9 none repeat scroll 0 0;
border: #D4DBE8 1px solid;
}
#site_home_sidebar .collapsible-box-list {
padding-left: 1.8em;
margin-left: 0;
line-height: 1.5em;
}
#site_home_sidebar .collapsible-box-table {
line-height: 1.5em;
border-collapse: collapse; border-collapse: collapse;
} }
#site_home_mainarea_sidebar_log_table tr.odd { #site_home_sidebar_log_table td {
padding-left: 0.5em;
}
#site_home_sidebar_log_table tr.odd {
background-color: #bbccef; background-color: #bbccef;
} }
#site_home_mainarea_sidebar_log_table tr.odd td.date { #site_home_sidebar_log_table tr.odd td.date {
width: 1%; width: 1%;
white-space: nowrap; white-space: nowrap;
} }
#site_home_mainarea_sidebar_log_table tr.odd td.project { #site_home_sidebar_log_table tr.odd td.project {
width: 1%; width: 1%;
white-space: nowrap; white-space: nowrap;
} }
#site_home_mainarea_sidebar_log_table tr.odd td.object { #site_home_sidebar_log_table tr.odd td.object {
white-space: nowrap; white-space: nowrap;
} }
#site_home_mainarea_sidebar_log_table tr.even { #site_home_sidebar_log_table tr.even {
background-color: inherit; background-color: inherit;
} }
#site_home_mainarea_sidebar_log_table tr.even td.details .description { #site_home_sidebar_log_table tr.even td.details .description {
font-style: italic; font-style: italic;
} }
#site_home_mainarea_sidebar_log_table tr.even td.details pre.message { #site_home_sidebar_log_table tr.even td.details pre.message {
border: 0; border: 0;
margin: 1px; margin: 1px;
background-color: inherit; background-color: inherit;