websiteWebsite
codingteam CodingTeam
A free forge, lightweight and extensible.

 

Browse the code

Revision log Information on the revision
Revision: 224 (differences)
Author: xbright
Log message: * Updated SVN browser for projects (svn is now working through file://)
* Added the ability to show an image inside the SVN repository
* A few improvements related to diff
* Added templates for SVN browsing
* Updated GeSHi usage
* Fixed a little bug in index/default template
Change revision:
    <h1><?=i18n('Browse the code');?></h1>
 
    <div class="fstree">
      <ul>
        <li class="dir">
          <a href="project/<?=$dbname;?>/browse<?=$linkr;?>">/</a>
        </li>
        <? foreach ($tags as $key => $value): ?>
          <? ((end($tags) == $value) ? $cl = 'current' : $cl = ''); ?>
          <li class="dir <?=$cl;?>">
            <a href="project/<?=$dbname;?>/browse<?=$value;?><?=$linkr;?>"><?=$key;?></a>
          </li>
        <? endforeach; ?>
      </ul>
    </div>
 
    <table style="width: 60%;margin-left: 20px;margin-bottom: 15px;" class="border_left border_right border_top border_bottom">
      <thead>
        <tr>
          <th colspan="2">
            <span style="float: right;"><a href="project/<?=$dbname;?>/browse/log<?=(isset($value) ? $value : '/');?>"><?=i18n('Revision log');?></a></span>
            <?=i18n('Information on the revision');?></th>
        </tr>
      </thead>
      <tbody>
        <tr class="background_table_first">
          <td style="width: 23%;"><?=i18n('Revision:');?></td>
          <td>
            <?=$rev;?>
            <? if ($rev > 0): ?>
              <a href="project/<?=$dbname;?>/browse/diff/<?=($rev - 1);?>/<?=$rev;?><?=(isset($value) ? $value : '/');?>"><?=i18n('(differences)');?></a></td>
            <? endif; ?>
        </tr>
        <tr class="background_table_second">
          <td style="width: 23%;"><?=i18n('Author:');?></td>
          <td>
            <? if ($rev > 0): ?>
              <a href="users/show/<?=$l_author;?>"><?=$l_author;?></a>
            <? else: ?>
              -
            <? endif; ?>
          </td>
        </tr>
        <tr class="background_table_first">
          <td style="width: 23%;"><?=i18n('Log message:');?></td>
          <td>
            <? if ($rev > 0): ?>
              <?=$l_msg;?>
            <? else: ?>
              -
            <? endif; ?>
          </td>
        </tr>
        <tr class="background_table_second">
          <td style="width: 23%;"><?=i18n('Change revision:');?></td>
          <td>
            <form action="<?=getURLByTags($this->page);?>/" method="get">
              <div>
                <input type="text" style="width: 5.0em;" name="rev" value="<?=$rev;?>" />
                <input type="submit" class="submit" value="<?=i18n('Submit');?>" />
              </div>
            </form>
          </td>
        </tr>
      </tbody>
    </table>
 
    <table style="width:100%">
      <thead>
        <tr>
          <th colspan="2"><?=i18n('File name');?></th>
          <th style="width: 10%;"><?=i18n('Size');?></th>
          <th style="width: 10%;"><?=i18n('Revision');?></th>
          <th style="width: 15%;"><?=i18n('Date');?></th>
          <th style="width: 15%;"><?=i18n('Author');?></th>
        </tr>
      </thead>
      <tbody>
        <? if (!$content): ?>
          <tr>
            <td colspan="6"><?=i18n('This directory is empty or not exist at this revision.');?></td>
          </tr>
        <? else: ?>
          <? for($i=0; $i<sizeof($ls); $i++): ?>
          <? (($i & 1) ? $cl = 'background_table_second' : $cl = 'background_table_first'); ?>
            <tr class="<?=$cl;?>">
              <td style="width: 16px;"><img src="<?=$ls[$i]['img'];?>" alt="<?=$ls[$i]['type'];?>"/></td>
              <td><a href="project/<?=$dbname;?>/browse/<?=$links;?><?=$ls[$i]['name'];?><?=$linkr;?>" style="display: block;"><?=$ls[$i]['name'];?></a></td>
              <td class="center">
                <? if ($ls[$i]['type'] == 'file'): ?>
                  <?=$ls[$i]['size'];?>
                <? else: ?>
                  -
                <? endif; ?>
              </td>
              <td class="center"><?=$ls[$i]['last_rev'];?></td>
              <td class="center"><?=$ls[$i]['last_date'];?></td>
              <td class="center"><a href="users/show/<?=$ls[$i]['last_author'];?>"><?=$ls[$i]['last_author'];?></a></td>
            </tr>
          <? endfor; ?>
        <? endif; ?>
      </tbody>
    </table>