made sidebar boxes collapsible in the project home view and the site home view
This commit is contained in:
		| @ -33,6 +33,7 @@ $lang['Error'] = 'Error'; | ||||
| $lang['File'] = 'File'; | ||||
| $lang['Files'] = 'Files'; | ||||
| $lang['Filter'] = 'Filter'; | ||||
| $lang['Filters'] = 'Filters'; | ||||
| $lang['First'] = 'First'; | ||||
| $lang['Folder'] = 'Folder'; | ||||
| $lang['Full Difference'] = 'FullDiff'; | ||||
|  | ||||
| @ -1,3 +1,7 @@ | ||||
| <?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'; | ||||
| ?> | ||||
|  | ||||
| @ -33,6 +33,7 @@ $lang['Error'] = 'Error'; | ||||
| $lang['File'] = 'File'; | ||||
| $lang['Files'] = 'File'; | ||||
| $lang['Filter'] = 'Filter'; | ||||
| $lang['Filters'] = 'Filters'; | ||||
| $lang['First'] = 'Pertama'; | ||||
| $lang['Folder'] = 'Folder'; | ||||
| $lang['Full Difference'] = 'FullDiff'; | ||||
|  | ||||
| @ -33,6 +33,7 @@ $lang['Error'] = '오류'; | ||||
| $lang['File'] = '파일'; | ||||
| $lang['Files'] = '파일'; | ||||
| $lang['Filter'] = '필터'; | ||||
| $lang['Filters'] = '필터'; | ||||
| $lang['First'] = '처음'; | ||||
| $lang['Folder'] = '폴더'; | ||||
| $lang['Full Difference'] = '전체차이'; | ||||
|  | ||||
| @ -1,3 +1,8 @@ | ||||
| <?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'] = '변경기록이 없습니다'; | ||||
| ?> | ||||
|  | ||||
| @ -201,12 +201,14 @@ $this->load->view ( | ||||
|  | ||||
| <div id="project_catalog_mainarea_search_form"> | ||||
| 	<div> | ||||
| 	<span><?php print $this->lang->line('Filter'); ?></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><?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_LABEL_TOTAL_PROJECTS'), $total_num_projects); ?></span> | ||||
| 	</div> | ||||
| 	<form id="project_search_form"> | ||||
|  | ||||
| 		<div id="project_search_form_id_and_name"> | ||||
| 			<?php | ||||
| 			// TODO: enhance filter condition operators. contains, equals, not equal, regex, etc | ||||
| 			print form_label($this->lang->line('ID'), 'id'); | ||||
| 			print ' '; | ||||
| 			print form_input('id', set_value('owner', $search->id), 'id="project_search_id"'); | ||||
| @ -219,17 +221,19 @@ $this->load->view ( | ||||
| 			?> | ||||
| 		</div> | ||||
|  | ||||
| 		<div id="project_search_form_summary_and_or"> | ||||
| 		<div id="project_search_form_summary"> | ||||
| 			<?php  | ||||
| 			print form_label($this->lang->line('Summary'), 'summary'); | ||||
| 			print ' '; | ||||
| 			print form_input('summary', set_value('summary', $search->summary), 'id="project_search_summary" size="50"'); | ||||
| 			?> | ||||
| 		</div> | ||||
|  | ||||
| 		<div id="project_search_form_or"> | ||||
| 			<?php  | ||||
| 			print form_label('OR', 'or'); | ||||
| 			print ' '; | ||||
| 			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> | ||||
| 		<?php | ||||
|  | ||||
| @ -35,10 +35,29 @@ function render_wiki() | ||||
| 	); | ||||
|  | ||||
| 	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() { | ||||
| 	render_wiki (); | ||||
|  | ||||
| 	 | ||||
| }); | ||||
| </script> | ||||
|  | ||||
| @ -78,8 +97,10 @@ $this->load->view ( | ||||
| <!-- /////////////////////////////////////////////////////////////////////// --> | ||||
| <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 by')?> <?php print $project->createdby?></li> | ||||
| <li><?php print $this->lang->line('Last updated on')?> <?php print $project->updatedon?></li> | ||||
| @ -87,9 +108,9 @@ $this->load->view ( | ||||
| </ul> | ||||
| </div> | ||||
|  | ||||
| <div class="box"> | ||||
| <div class="boxtitle"><?php print $this->lang->line('Members')?></div> | ||||
| <ul> | ||||
| <div id="project_home_sidebar_member_box" class="collapsible-box"> | ||||
| <div id="project_home_sidebar_member_header" class="collapsible-box-header"><?php print $this->lang->line('Members')?></div> | ||||
| <ul id="project_home_sidebar_member_list" class="collapsible-box-list"> | ||||
| <?php | ||||
| 	$members = $project->members; | ||||
| 	$member_count = count($members); | ||||
| @ -132,9 +153,9 @@ $this->load->view ( | ||||
| </ul> | ||||
| </div> | ||||
|  | ||||
| <div class="box"> | ||||
| <div class="boxtitle"><?php print $this->lang->line('Repository')?></div> | ||||
| <ul> | ||||
| <div id="project_home_sidebar_repo_box" class="collapsible-box"> | ||||
| <div id="project_home_sidebar_repo_header" class="collapsible-box-header"><?php print $this->lang->line('Repository')?></div> | ||||
| <ul id="project_home_sidebar_repo_list" class="collapsible-box-list"> | ||||
| <?php | ||||
| $urls = explode (',', CODEPOT_SVN_BASE_URL); | ||||
| foreach ($urls as $url) | ||||
| @ -147,28 +168,24 @@ foreach ($urls as $url) | ||||
| } | ||||
| ?> | ||||
| </ul> | ||||
| <pre> | ||||
| <?php //print_r ($urls); ?> | ||||
| <?php //print_r ($_SERVER); ?> | ||||
| </pre> | ||||
| </div> | ||||
|  | ||||
| <div class="box"> | ||||
| <div class="boxtitle"> | ||||
| <div id="project_home_sidebar_log_box" class="collapsible-box"> | ||||
| <div id="project_home_sidebar_log_header" class="collapsible-box-header"> | ||||
| <?php print anchor ("/project/log/{$project->id}", $this->lang->line('Change log')) ?> | ||||
| </div> | ||||
| <?php  | ||||
| 	print '<table id="project_home_sidebar_log_table" class="collapsible-box-table">'; | ||||
|  | ||||
| 	if (count($log_entries) > 0) | ||||
| 	{ | ||||
| 		print '<table id="project_home_sidebar_log_table">'; | ||||
|  | ||||
| 		$xdot = $this->converter->AsciiToHex ('.'); | ||||
| 		foreach ($log_entries as $log) | ||||
| 		{ | ||||
| 			if ($log['type'] == 'code') | ||||
| 			{ | ||||
| 				$x = $log['message']; | ||||
| 	 | ||||
|  | ||||
| 				print '<tr class="odd">'; | ||||
| 				print '<td class="date">'; | ||||
| 				//print substr($x['time'], 5, 5); | ||||
| @ -179,11 +196,11 @@ foreach ($urls as $url) | ||||
| 					"code/revision/{$x['repo']}/{$xdot}/{$x['rev']}",  | ||||
| 					"r{$x['rev']}"); | ||||
| 				print '</td>'; | ||||
| 	 | ||||
|  | ||||
| 				print '</tr>'; | ||||
| 	 | ||||
|  | ||||
| 				print '<tr class="even">'; | ||||
| 	 | ||||
|  | ||||
| 				print '<td></td>'; | ||||
| 				print '<td colspan="1" class="details">'; | ||||
| 				print '<span class="description">'; | ||||
| @ -199,7 +216,7 @@ foreach ($urls as $url) | ||||
| 					print htmlspecialchars (sprintf($fmt, $x['author'])); | ||||
| 				} | ||||
| 				print '</span>'; | ||||
| 	 | ||||
|  | ||||
| 				if ($log['action'] != 'revpropchange') | ||||
| 				{ | ||||
| 					print '<pre class="message">'; | ||||
| @ -216,7 +233,7 @@ foreach ($urls as $url) | ||||
| 				print '<td class="date">'; | ||||
| 				print date ('m-d', strtotime($log['createdon'])); | ||||
| 				print '</td>'; | ||||
| 	 | ||||
|  | ||||
| 				print '<td class="object">'; | ||||
| 				$uri = ''; | ||||
| 				if ($log['type'] == 'project') | ||||
| @ -242,15 +259,15 @@ foreach ($urls as $url) | ||||
| 					$uri = "/issue/show/{$log['projectid']}/{$hex}"; | ||||
| 					$trimmed =  $this->lang->line('Issue') . " {$log['message']}"; | ||||
| 				} | ||||
| 	 | ||||
|  | ||||
| 				if ($uri != '') | ||||
| 					print anchor ($uri, htmlspecialchars($trimmed)); | ||||
| 				else | ||||
| 					print htmlspecialchars($trimmed); | ||||
| 				print '</td>'; | ||||
| 	 | ||||
|  | ||||
| 				print '</tr>'; | ||||
| 	 | ||||
|  | ||||
| 				print '<tr class="even">'; | ||||
| 				print '<td></td>'; | ||||
| 				print '<td colspan="1" class="details">'; | ||||
| @ -264,9 +281,13 @@ foreach ($urls as $url) | ||||
| 				print '</tr>'; | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		print "</table>"; | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		printf ('<tr><td>%s</td></tr>', $this->lang->line('PROJECT_MSG_NO_CHANGE_LOG')); | ||||
| 	} | ||||
|  | ||||
| 	print "</table>"; | ||||
| ?> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| @ -34,6 +34,18 @@ function render_wiki() | ||||
|  | ||||
| 	prettyPrint (); | ||||
| } | ||||
|  | ||||
| $(function () { | ||||
| 	render_wiki (); | ||||
|  | ||||
| 	$("#site_home_sidebar_latest_projects_box").accordion ({ | ||||
| 		collapsible: true  | ||||
| 	}); | ||||
|  | ||||
| 	$("#site_home_sidebar_log_box").accordion ({ | ||||
| 		collapsible: true  | ||||
| 	}); | ||||
| }); | ||||
| </script> | ||||
|  | ||||
| <title><?php | ||||
| @ -44,7 +56,7 @@ function render_wiki() | ||||
| ?></title> | ||||
| </head> | ||||
|  | ||||
| <body onload="render_wiki()"> | ||||
| <body> | ||||
|  | ||||
| <div class="content" id="site_home_content"> | ||||
|  | ||||
| @ -57,30 +69,30 @@ function render_wiki() | ||||
| <?php | ||||
|  | ||||
| $this->load->view ( | ||||
|         'projectbar', | ||||
|         array ( | ||||
| 	'projectbar', | ||||
| 	array ( | ||||
| 		'banner' => $site->name, | ||||
|  | ||||
| 		'page' => array ( | ||||
| 			'type' => ($login['sysadmin?']? 'site': ''), | ||||
| 			'id' => '', | ||||
| 			'site' => ($login['sysadmin?']? $site: NULL) | ||||
|                 ), | ||||
| 		), | ||||
|  | ||||
|                 'ctxmenuitems' => NULL | ||||
|         ) | ||||
| 		'ctxmenuitems' => NULL | ||||
| 	) | ||||
| ); | ||||
| ?> | ||||
|  | ||||
| <!-- ////////////////////////////////////////////////////////////////////// --> | ||||
|  | ||||
| <div class="mainarea" id="site_home_mainarea"> | ||||
|  | ||||
| <div class="sidebar" id="site_home_mainarea_sidebar"> | ||||
|  | ||||
| <div class="box"> | ||||
| <div class="boxtitle"><?php print $this->lang->line('Latest projects')?></div> | ||||
| <ul> | ||||
| <div class="sidebar" id="site_home_sidebar"> | ||||
|  | ||||
| <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 | ||||
| foreach ($latest_projects as $project) | ||||
| { | ||||
| @ -100,11 +112,9 @@ foreach ($latest_projects as $project) | ||||
| </ul> | ||||
| </div> | ||||
|  | ||||
| <div class="box"> | ||||
| <div class="boxtitle"> | ||||
| <?php print  anchor ("/site/log", $this->lang->line('Change log')) ?> | ||||
| </div> | ||||
| <table id="site_home_mainarea_sidebar_log_table"> | ||||
| <div id="site_home_sidebar_log_box" class="collapsible-box"> | ||||
| <div id="site_home_sidebar_log_header" class="collapsible-box-header"><?php print  anchor ("/site/log", $this->lang->line('Change log')); ?></div> | ||||
| <table id="site_home_sidebar_log_table" class="collapsible-box-table"> | ||||
| <?php  | ||||
| 	$xdot = $this->converter->AsciiToHex ('.'); | ||||
| 	foreach ($log_entries as $log) | ||||
| @ -235,7 +245,9 @@ foreach ($latest_projects as $project) | ||||
| </table> | ||||
| </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"> | ||||
|  | ||||
|  | ||||
| @ -618,7 +618,7 @@ pre.prettyprint li.L9 { background: #eee } | ||||
| 	box-shadow: 0 8px 6px -6px #777;*/ | ||||
| } | ||||
|  | ||||
| .content .sidebar .box .user_icon_img { | ||||
| .content .sidebar .user_icon_img { | ||||
| 	height: 2em; | ||||
| 	width: 2em; | ||||
| 	vertical-align: middle; | ||||
|  | ||||
| @ -5,10 +5,31 @@ | ||||
| /*-----------------------------------------------  | ||||
|  * 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; | ||||
| } | ||||
|  | ||||
| #project_home_sidebar_log_table td { | ||||
| 	padding-left: 0.5em; | ||||
| } | ||||
|  | ||||
| #project_home_sidebar_log_table tr.odd { | ||||
| 	background-color: #bbccef; | ||||
| } | ||||
|  | ||||
| @ -1,41 +1,62 @@ | ||||
| /*-----------------------------------------------  | ||||
|  * site home view  | ||||
|  *-----------------------------------------------*/ | ||||
| #site_home_mainarea_sidebar { | ||||
| #site_home_sidebar { | ||||
| 	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; | ||||
| } | ||||
|  | ||||
| #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; | ||||
| } | ||||
|  | ||||
| #site_home_mainarea_sidebar_log_table tr.odd td.date { | ||||
| #site_home_sidebar_log_table tr.odd td.date { | ||||
| 	width: 1%; | ||||
| 	white-space: nowrap; | ||||
| } | ||||
|  | ||||
| #site_home_mainarea_sidebar_log_table tr.odd td.project { | ||||
| #site_home_sidebar_log_table tr.odd td.project { | ||||
| 	width: 1%; | ||||
| 	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; | ||||
| } | ||||
|  | ||||
| #site_home_mainarea_sidebar_log_table tr.even { | ||||
| #site_home_sidebar_log_table tr.even { | ||||
| 	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; | ||||
| } | ||||
|  | ||||
| #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; | ||||
| 	margin: 1px; | ||||
| 	background-color: inherit;  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user