|
From: <al...@us...> - 2008-10-26 20:27:32
|
Revision: 767
http://sciret.svn.sourceforge.net/sciret/?rev=767&view=rev
Author: alpeb
Date: 2008-10-26 20:27:28 +0000 (Sun, 26 Oct 2008)
Log Message:
-----------
templated article history tab
Modified Paths:
--------------
trunk/templates/ViewArticle.tpl
trunk/views/ViewArticle.php
Modified: trunk/templates/ViewArticle.tpl
===================================================================
--- trunk/templates/ViewArticle.tpl 2008-10-26 20:23:44 UTC (rev 766)
+++ trunk/templates/ViewArticle.tpl 2008-10-26 20:27:28 UTC (rev 767)
@@ -120,21 +120,21 @@
<h2>
[l]History[/l]
</h2>
- <table collspace="0" >
+ <table cellpadding="3" cellspacing="2" class="table1">
<tr>
- <th scope="col" class="specth">
+ <th class="th_h">
[l]Date[/l]
</th>
- <th scope="col">
+ <th>
[l]User[/l]
</th>
- <th scope="col">
+ <th>
[l]Action[/l]
</th>
</tr>
<!-- BEGIN history_line_block -->
- <tr>
- <td class="spec">
+ <tr class="{rowClass}">
+ <td class="td_h">
{historyDate}
</td>
<td>
Modified: trunk/views/ViewArticle.php
===================================================================
--- trunk/views/ViewArticle.php 2008-10-26 20:23:44 UTC (rev 766)
+++ trunk/views/ViewArticle.php 2008-10-26 20:27:28 UTC (rev 767)
@@ -109,8 +109,10 @@
// ** HISTORY ***
$historyGateway = new HistoryGateway;
$firstIteration = true;
+ $rowClass = 'row_off';
foreach ($historyGateway->getEvents($this->article->getId()) as $history) {
$this->tpl->set_var(array(
+ 'rowClass' => $rowClass,
'historyDate' => $this->user->formatDate($history->getDate()),
'historyUser' => $history->getUserFullName(),
));
@@ -124,6 +126,7 @@
$this->tpl->parse('history_line', 'history_line_block', !$firstIteration);
$firstIteration = false;
+ $rowClass = ($rowClass == 'row_off')? 'row_on' : 'row_off';
}
if ($firstIteration) {
$this->tpl->set_var('history_line', $this->user->lang('No events recorded'));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|