changed the code history view a little

This commit is contained in:
hyung-hwan 2017-03-13 06:57:06 +00:00
parent d3b61a6616
commit 3f5307ed05

View File

@ -95,7 +95,7 @@ $this->load->view (
<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">
<?php <?php
$rowclasses = array ('even', 'odd');
$history = $file['history']; $history = $file['history'];
$history_count = count($history); $history_count = count($history);
$curfullpath = $fullpath; $curfullpath = $fullpath;
@ -104,10 +104,7 @@ $this->load->view (
$h = $history[--$i]; $h = $history[--$i];
$xfullpath = $this->converter->AsciiToHex (($fullpath == '')? '.': $fullpath); $xfullpath = $this->converter->AsciiToHex (($fullpath == '')? '.': $fullpath);
$rowclass = $rowclasses[($history_count - $i) % 2];
//print "<tr class='{$rowclass}'>";
print "<tr>"; print "<tr>";
print '<td class="commit-author-td" rowspan=2>'; print '<td class="commit-author-td" rowspan=2>';
// 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.
@ -122,21 +119,6 @@ $this->load->view (
} }
print '</td>'; print '</td>';
print '<td class="commit-message-td">';
if ($h['review_count'] > 0)
{
$tmp = sprintf ('<span class="codepot-history-review-count">%d</span>', $h['review_count']);
print anchor("code/revision/{$project->id}/{$xfullpath}/{$h['rev']}#code_revision_result_comments", $tmp);
print ' ';
}
print anchor ("code/revision/{$project->id}/{$xfullpath}/{$h['rev']}", htmlspecialchars($h['msg']), "class='commit-message'");
//print '<pre>';
//print htmlspecialchars($h['msg']);
//print '</pre>';
print '</td>';
print '</tr>';
print '<tr>';
print '<td class="commit-revision-td">'; print '<td class="commit-revision-td">';
print '<div class="commit-revision-and-datetime">'; print '<div class="commit-revision-and-datetime">';
@ -159,15 +141,14 @@ $this->load->view (
print '</tt>'; print '</tt>';
print '</div>'; print '</div>';
print '<div class="codepot-buttoned-anchor">'; //print '<div class="codepot-buttoned-anchor">';
print '<div style="font-weight: bold;">';
print "<a href='{$user_home_url}'>"; print "<a href='{$user_home_url}'>";
print htmlspecialchars($h['author']); print htmlspecialchars($h['author']);
print '</a>'; print '</a>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
print '<div class="commit-actions">'; print '<div class="commit-actions">';
if ($file['type'] == 'file') if ($file['type'] == 'file')
{ {
@ -184,6 +165,19 @@ $this->load->view (
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '<tr>';
print '<td class="commit-message-td">';
if ($h['review_count'] > 0)
{
$tmp = sprintf ('<span class="codepot-history-review-count">%d</span>', $h['review_count']);
print anchor("code/revision/{$project->id}/{$xfullpath}/{$h['rev']}#code_revision_result_comments", $tmp);
print ' ';
}
print anchor ("code/revision/{$project->id}/{$xfullpath}/{$h['rev']}", htmlspecialchars($h['msg']), "class='commit-message'");
print '</td>';
print '</tr>';
// //
// let's track the copy path. // let's track the copy path.
// //