changed layout of the code history view.
removed graphs from the view too
This commit is contained in:
parent
0d0b374d8b
commit
daa23cbcab
@ -92,8 +92,10 @@ $this->load->view (
|
|||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="graph" id="code_history_graph">
|
|
||||||
|
<!-- <div class="graph" id="code_history_graph">
|
||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
$xfullpath = $this->converter->AsciiToHex (($fullpath == '')? '.': $fullpath);
|
$xfullpath = $this->converter->AsciiToHex (($fullpath == '')? '.': $fullpath);
|
||||||
|
|
||||||
$graph_url = codepot_merge_path (site_url(), "/code/graph/commits-by-users/{$project->id}/{$xfullpath}{$revreq}");
|
$graph_url = codepot_merge_path (site_url(), "/code/graph/commits-by-users/{$project->id}/{$xfullpath}{$revreq}");
|
||||||
@ -101,18 +103,16 @@ $this->load->view (
|
|||||||
|
|
||||||
$graph_url = codepot_merge_path (site_url(), "/code/graph/commit-share-by-users/{$project->id}/{$xfullpath}{$revreq}");
|
$graph_url = codepot_merge_path (site_url(), "/code/graph/commit-share-by-users/{$project->id}/{$xfullpath}{$revreq}");
|
||||||
print "<img src='{$graph_url}' />";
|
print "<img src='{$graph_url}' />";
|
||||||
|
*/
|
||||||
?>
|
?>
|
||||||
</div> <!-- code_history_graph -->
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<div id="code_history_result" class="codepot-relative-container-view">
|
<div id="code_history_result" class="codepot-relative-container-view">
|
||||||
<table id="code_history_result_table" class="codepot-full-width-table codepot-spacious-table">
|
<table id="code_history_result_table" class="codepot-full-width-table codepot-spacious-table">
|
||||||
<tr class='codepot-full-width-table-header'>
|
<tr class='codepot-full-width-table-header'>
|
||||||
<th><?php /*print $this->lang->line('Revision')*/ ?></th>
|
|
||||||
<th><?php print $this->lang->line('Committer')?></th>
|
<th><?php print $this->lang->line('Committer')?></th>
|
||||||
<th><?php print $this->lang->line('Date')?></th>
|
<th><?php print $this->lang->line('Details') ?></th>
|
||||||
<th><?php print $this->lang->line('Message')?></th>
|
|
||||||
<?php if ($file['type'] == 'file' || $file['type'] == 'dir') print '<th></th>'; ?>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$rowclasses = array ('even', 'odd');
|
$rowclasses = array ('even', 'odd');
|
||||||
@ -122,41 +122,32 @@ $this->load->view (
|
|||||||
for ($i = $history_count; $i > 0; )
|
for ($i = $history_count; $i > 0; )
|
||||||
{
|
{
|
||||||
$h = $history[--$i];
|
$h = $history[--$i];
|
||||||
|
$xfullpath = $this->converter->AsciiToHex (($fullpath == '')? '.': $fullpath);
|
||||||
|
|
||||||
$rowclass = $rowclasses[($history_count - $i) % 2];
|
$rowclass = $rowclasses[($history_count - $i) % 2];
|
||||||
print "<tr class='{$rowclass}'>";
|
//print "<tr class='{$rowclass}'>";
|
||||||
|
print "<tr>";
|
||||||
|
|
||||||
print '<td class="commit-revision-td">';
|
print '<td class="commit-author-td" rowspan=2>';
|
||||||
$xfullpath = $this->converter->AsciiToHex (
|
|
||||||
($fullpath == '')? '.': $fullpath);
|
|
||||||
|
|
||||||
print anchor ("code/file/{$project->id}/{$xfullpath}/{$h['rev']}", $h['rev']);
|
|
||||||
|
|
||||||
if (!empty($h['tag']))
|
|
||||||
{
|
|
||||||
print ' ';
|
|
||||||
print '<span class="left_arrow_indicator">';
|
|
||||||
print htmlspecialchars($h['tag']);
|
|
||||||
print '</span>';
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '<td class="commit-author-td">';
|
|
||||||
// Repository migration from googlecode revealed that it did not put
|
// Repository migration from googlecode revealed that it did not put
|
||||||
// 'author' for initial project creation. So I've added the following check.
|
// 'author' for initial project creation. So I've added the following check.
|
||||||
if (array_key_exists('author', $h))
|
if (array_key_exists('author', $h))
|
||||||
{
|
{
|
||||||
$user_icon_url = codepot_merge_path (site_url(), '/user/icon/' . $this->converter->AsciiToHex($h['author']));
|
$user_icon_url = codepot_merge_path (site_url(), '/user/icon/' . $this->converter->AsciiToHex($h['author']));
|
||||||
print "<img src='{$user_icon_url}' class='codepot-committer-icon-24x24' /> ";
|
$user_home_url = codepot_merge_path (site_url(), '/user/home/' . $this->converter->AsciiToHex($h['author']));
|
||||||
|
//print "<img src='{$user_icon_url}' class='codepot-committer-icon-24x24' /> ";
|
||||||
|
print "<div class='commit-author-icon'>";
|
||||||
|
print "<a href='{$user_home_url}'><img src='{$user_icon_url}' class='commit-author-icon' /></a>";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
|
print '<div class="commit-author-id">';
|
||||||
|
print "<a href='{$user_home_url}'>";
|
||||||
print htmlspecialchars($h['author']);
|
print htmlspecialchars($h['author']);
|
||||||
|
print '</a>';
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="commit-date-td"><tt>';
|
|
||||||
print codepot_unixtimetodispdate(strtotime($h['date']), 'Y-m-d');
|
|
||||||
print '</tt></td>';
|
|
||||||
|
|
||||||
print '<td class="commit-message-td">';
|
print '<td class="commit-message-td">';
|
||||||
if ($h['review_count'] > 0)
|
if ($h['review_count'] > 0)
|
||||||
{
|
{
|
||||||
@ -169,18 +160,43 @@ $this->load->view (
|
|||||||
//print htmlspecialchars($h['msg']);
|
//print htmlspecialchars($h['msg']);
|
||||||
//print '</pre>';
|
//print '</pre>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '<td>';
|
print '<tr>';
|
||||||
|
print '<td class="commit-revision-td">';
|
||||||
|
|
||||||
|
print '<div class="commit-revision-and-datetime">';
|
||||||
|
print '<div class="commit-revision">';
|
||||||
|
print '<tt>';
|
||||||
|
print anchor ("code/file/{$project->id}/{$xfullpath}/{$h['rev']}", $h['rev']);
|
||||||
|
if (!empty($h['tag']))
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
print '<span class="left_arrow_indicator">';
|
||||||
|
print htmlspecialchars($h['tag']);
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
print '</tt>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="commit-datetime">';
|
||||||
|
print '<tt>';
|
||||||
|
print codepot_unixtimetodispdate(strtotime($h['date']));
|
||||||
|
print '</tt>';
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="commit-actions">';
|
||||||
if ($file['type'] == 'file')
|
if ($file['type'] == 'file')
|
||||||
{
|
{
|
||||||
print anchor ("code/blame/{$project->id}/{$xfullpath}/{$h['rev']}",
|
print anchor ("code/blame/{$project->id}/{$xfullpath}/{$h['rev']}",
|
||||||
'<i class="fa fa-bomb"></i> ' . $this->lang->line('Blame'));
|
'<div class="commit-action-item"><i class="fa fa-bomb"></i> ' . $this->lang->line('Blame') . '</div>');
|
||||||
print ' | ';
|
|
||||||
print anchor ("code/diff/{$project->id}/{$xfullpath}/{$h['rev']}",
|
print anchor ("code/diff/{$project->id}/{$xfullpath}/{$h['rev']}",
|
||||||
'<i class="fa fa-server"></i> ' . $this->lang->line('Difference'));
|
'<div class="commit-action-item"><i class="fa fa-server"></i> ' . $this->lang->line('Difference') . '</div>');
|
||||||
}
|
}
|
||||||
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -222,6 +222,24 @@
|
|||||||
background-color: #AABBFF;
|
background-color: #AABBFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#code_history_result_table td.commit-author-td {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table img.commit-author-icon {
|
||||||
|
width: 3em;
|
||||||
|
height: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-author-id {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table td.commit-message-td {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
#code_history_result_table td.commit-message-td:hover {
|
#code_history_result_table td.commit-message-td:hover {
|
||||||
background-color: #F0F0F0;
|
background-color: #F0F0F0;
|
||||||
}
|
}
|
||||||
@ -237,6 +255,78 @@
|
|||||||
font-family: "DejaVu Sans Mono", consolas, monaco, "Andale Mono", monospace;
|
font-family: "DejaVu Sans Mono", consolas, monaco, "Andale Mono", monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#code_history_result_table td.commit-revision-td {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table td.commit-revision-td:hover {
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table td.commit-revision-td div {
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-revision-and-datetime {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-actions {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-end;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-revision {
|
||||||
|
background-color: #008CBA;
|
||||||
|
border: 1px solid #008CBA;
|
||||||
|
color: white;
|
||||||
|
padding: 0px 5px 0px 5px;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.9em;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 2px;
|
||||||
|
transition-duration: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-revision:hover {
|
||||||
|
background-color: #00BCFA;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-revision a,
|
||||||
|
#code_history_result_table .commit-revision a:hover,
|
||||||
|
#code_history_result_table .commit-revision a:visited {
|
||||||
|
color: white
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-action-item {
|
||||||
|
background-color: #008CBA;
|
||||||
|
border: 1px solid #008CBA;
|
||||||
|
color: white;
|
||||||
|
padding: 0px 5px 0px 5px;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.9em;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 2px;
|
||||||
|
transition-duration: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#code_history_result_table .commit-action-item:hover {
|
||||||
|
background-color: #00BCFA;
|
||||||
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------
|
/*-----------------------------------------------
|
||||||
* project source revision view
|
* project source revision view
|
||||||
*-----------------------------------------------*/
|
*-----------------------------------------------*/
|
||||||
|
Loading…
Reference in New Issue
Block a user