예제 #1
0
파일: commit.php 프로젝트: aevare/gitviewer
?>
</a></td>
</tr>
<?php 
foreach ($_['page']['parents'] as $parent) {
    print_unescaped("<tr>\n");
    print_unescaped("\t<td>Parent</td>\n");
    print_unescaped("\t<td><a href=\"" . makelink(array('a' => 'commit', 'p' => $_['page']['project'], 'h' => $parent)) . "\">{$parent}</a></td>\n");
    print_unescaped("</tr>\n");
}
?>
</tbody>
</table>

<div class="commitmessage"><pre><?php 
print_unescaped(htmlentities_wrapper($_['page']['message_full']));
?>
</pre></div>

<div class="filelist">
<table id="commit_filelist">
<thead>
<tr>
	<th colspan="2">Affected files:</th>
</tr>
</thead>
<tbody>

<?php 
foreach ($_['page']['affected_files'] as $details) {
    print_unescaped("<tr><td>");
예제 #2
0
파일: commit.php 프로젝트: schipa/viewgit
?>
</a></td>
        </tr>
        <?php 
foreach ($page['parents'] as $parent) {
    echo "<tr>\n";
    echo "\t<td>Parent</td>\n";
    echo "\t<td><a href=\"" . makelink(array('a' => 'commit', 'p' => $page['project'], 'h' => $parent)) . "\">{$parent}</a></td>\n";
    echo "</tr>\n";
}
?>
    </tbody>
</table>

<div class="commitmessage"><pre><?php 
echo htmlentities_wrapper($page['message_full']);
?>
</pre></div>

<div class="filelist">
    <table id="commit_filelist">
        <thead>
            <tr>
                <th colspan="2">Affected files:</th>
            </tr>
        </thead>
        <tbody>
            <?php 
foreach ($page['affected_files'] as $details) {
    echo '<tr><td>';
    echo '<a href="' . makelink(array('a' => 'viewblob', 'p' => $page['project'], 'h' => $details['hash'], 'hb' => $page['commit_id'], 'f' => $details['name'])) . "\">{$details['name']}</a>";
예제 #3
0
</div>


<h2>Branches</h2>
<ul class="branches">
	<?php 
$tr_class = 'even';
foreach ($_['page']['heads'] as $h) {
    ?>
		<li>
			<a href="<?php 
    print_unescaped(makelink(array('a' => 'shortlog', 'p' => $_['page']['project'], 'h' => $h['fullname'])));
    ?>
">
				<?php 
    print_unescaped(htmlentities_wrapper($h['name']));
    ?>
				<span class="date shady smalltext"><?php 
    p($h[date]);
    ?>
</span>
			</a>
		</li>
	<?php 
}
?>
</ul>


<?php 
print_unescaped($this->inc('shortlog'));
예제 #4
0
파일: header.php 프로젝트: n3wtron/viewgit
    ?>
" />
<input type="hidden" name="h" value="<?php 
    echo $page['commit_id'];
    ?>
" />
<select name="st">
<?php 
    $opts = array('commit', 'change', 'author', 'committer');
    foreach ($opts as $opt) {
        echo "\t<option";
        if (isset($page['search_t']) && $opt == $page['search_t']) {
            echo ' selected="selected"';
        }
        echo ">{$opt}</option>\n";
    }
    ?>
</select>
<input type="text" name="s"<?php 
    if (isset($page['search_s'])) {
        echo ' value="' . htmlentities_wrapper($page['search_s']) . '"';
    }
    ?>
 />
</form>
</div>
<?php 
}
?>

예제 #5
0
/**
 * Used to format RSS item title and description.
 *
 * @param info commit info from git_get_commit_info()
 */
function rss_item_format($format, $info)
{
    return preg_replace(array('/{AUTHOR}/', '/{AUTHOR_MAIL}/', '/{SHORTLOG}/', '/{LOG}/', '/{COMMITTER}/', '/{COMMITTER_MAIL}/', '/{DIFFSTAT}/'), array(htmlentities_wrapper($info['author_name']), htmlentities_wrapper($info['author_mail']), htmlentities_wrapper($info['message_firstline']), htmlentities_wrapper($info['message_full']), htmlentities_wrapper($info['committer_name']), htmlentities_wrapper($info['committer_mail']), htmlentities_wrapper(isset($info['diffstat']) ? $info['diffstat'] : '')), $format);
}
예제 #6
0
파일: index.php 프로젝트: schipa/viewgit
            <th>Description</th>
            <th>Last Commit</th>
            <th>Last Change</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
        <?php 
foreach ($page['projects'] as $p) {
    $tr_class = $tr_class == 'odd' ? 'even' : 'odd';
    echo "<tr class=\"{$tr_class}\">\n";
    echo "\t<td><a href=\"" . makelink(array('a' => 'summary', 'p' => $p['name'])) . "\">{$p['name']}</a>";
    if ($p['www']) {
        //echo "<a href=\"$p[www]\" class=\"external\">&#8599;</a>";
        tpl_extlink($p['www']);
    }
    echo "</td>\n";
    echo "\t<td>" . htmlentities_wrapper($p['description']) . "</td>\n";
    echo "\t<td>" . htmlentities_wrapper($p['message']) . "</td>\n";
    echo "\t<td>" . htmlentities_wrapper($p['head_datetime']) . "</td>\n";
    echo "\t<td>";
    echo '<a href="' . makelink(array('a' => 'tree', 'p' => $p['name'], 'h' => $p['head_tree'], 'hb' => $p['head_hash'])) . '" class="tree_link" title="Tree">tree</a>';
    echo ' <a href="' . makelink(array('a' => 'archive', 'p' => $p['name'], 'h' => $p['head_tree'], 'hb' => $p['head_hash'], 't' => 'targz')) . '" rel="nofollow" class="tar_link" title="tar/gz">tar/gz</a>';
    echo ' <a href="' . makelink(array('a' => 'archive', 'p' => $p['name'], 'h' => $p['head_tree'], 'hb' => $p['head_hash'], 't' => 'zip')) . '" rel="nofollow" class="zip_link" title="zip">zip</a>';
    echo "</td>\n";
    echo "</tr>\n";
}
?>
    </tbody>
</table>
예제 #7
0
파일: shortlog.php 프로젝트: schipa/viewgit
    $tr_class = $tr_class == 'odd' ? 'even' : 'odd';
    echo "<tr class=\"{$tr_class}\">\n";
    echo "\t<td>{$l['date']}</td>\n";
    echo "\t<td>" . format_author($l['author']) . "</td>\n";
    echo "\t<td><a href=\"" . makelink(array('a' => 'commit', 'p' => $page['project'], 'h' => $l['commit_id'])) . "\">" . htmlentities_wrapper($l['message']) . '</a>';
    if (count($l['refs']) > 0) {
        foreach ($l['refs'] as $ref) {
            $parts = explode('/', $ref);
            $shortref = join('/', array_slice($parts, 1));
            $type = 'head';
            if ($parts[0] == 'tags') {
                $type = 'tag';
            } elseif ($parts[0] == 'remotes') {
                $type = 'remote';
            }
            echo "<span class=\"label {$type}\" title=\"{$ref}\">" . htmlentities_wrapper($shortref) . '</span>';
        }
    }
    echo "</td>\n";
    echo "\t<td>";
    echo '<a href="' . makelink(array('a' => 'commitdiff', 'p' => $page['project'], 'h' => $l['commit_id'])) . '" class="cdiff_link" title="Commit Diff">commitdiff</a>';
    echo ' <a href="' . makelink(array('a' => 'tree', 'p' => $page['project'], 'h' => $l['tree'], 'hb' => $l['commit_id'])) . '" class="tree_link" title="Tree">tree</a>';
    echo ' <a href="' . makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $l['tree'], 'hb' => $l['commit_id'], 't' => 'targz')) . '" rel="nofollow" class="tar_link" title="tar/gz">tar/gz</a>';
    echo ' <a href="' . makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $l['tree'], 'hb' => $l['commit_id'], 't' => 'zip')) . '" rel="nofollow" class="zip_link" title="zip">zip</a>';
    echo ' <a href="' . makelink(array('a' => 'patch', 'p' => $page['project'], 'h' => $l['commit_id'])) . '" class="patch_link" title="Patch">patch</a>';
    echo "</td>\n";
    echo "</tr>\n";
    $page['lasthash'] = $l['commit_id'];
}
?>
    </tbody>
예제 #8
0
		</span>
		<?php 
    if (count($l['refs']) > 0) {
        ?>
			<div class="refs shady">
			<?php 
        foreach ($l['refs'] as $ref) {
            $parts = explode('/', $ref);
            $shortref = join('/', array_slice($parts, 1));
            $type = 'head';
            if ($parts[0] == 'tags') {
                $type = 'tag';
            } elseif ($parts[0] == 'remotes') {
                $type = 'remote';
            }
            print_unescaped("<span class=\"label {$type}\" title=\"{$ref}\">" . htmlentities_wrapper($shortref) . "</span>");
        }
        ?>
			</div>
			<div class="bottom-links">
				<a href="<?php 
        print_unescaped(makelink(array('a' => 'commitdiff', 'p' => $_['page']['project'], 'h' => $l['commit_id'])));
        ?>
" class="cdiff_link" title="Commit Diff">Commit Diff</a>
				<a href="<?php 
        print_unescaped(makelink(array('a' => 'tree', 'p' => $_['page']['project'], 'h' => $l['tree'], 'hb' => $l['commit_id'])));
        ?>
" class="tree_link" title="Tree">Tree</a>
			</div>
		<?php 
    }
예제 #9
0
파일: nav.php 프로젝트: aevare/gitviewer
<ul class="git-view git-projects">
	<?php 
foreach ($_['projectlist'] as $p) {
    ?>
		<li><a href="<?php 
    print_unescaped(makelink(array('a' => 'summary', 'p' => $p['name'])));
    ?>
"><?php 
    print_unescaped($p[name]);
    ?>
 <span class="date"><?php 
    print_unescaped(htmlentities_wrapper($p['head_datetime']));
    ?>
</span></a></li>
	<?php 
}
?>
</ul>
예제 #10
0
<tr>
	<th class="date">Date</th>
	<th class="author">Author</th>
	<th class="message">Message</th>
	<th class="actions">Actions</th>
</tr>
</thead>
<tbody>
<?php 
$page['lasthash'] = 'HEAD';
foreach ($page['shortlog'] as $l) {
    $tr_class = $tr_class == "odd" ? "even" : "odd";
    echo "<tr class=\"{$tr_class}\">\n";
    echo "\t<td>{$l['date']}</td>\n";
    echo "\t<td>" . format_author($l['author']) . "</td>\n";
    echo "\t<td><a href=\"" . makelink(array('a' => 'commit', 'p' => $page['project'], 'h' => $l['commit_id'])) . "\">" . htmlentities_wrapper($l['message']) . "</a>";
    if (count($l['refs']) > 0) {
        foreach ($l['refs'] as $ref) {
            $parts = explode('/', $ref);
            $shortref = join('/', array_slice($parts, 1));
            $type = 'head';
            if ($parts[0] == 'tags') {
                $type = 'tag';
            } elseif ($parts[0] == 'remotes') {
                $type = 'remote';
            }
            echo "<span class=\"label {$type}\" title=\"{$ref}\">{$shortref}</span>";
        }
    }
    echo "</td>\n";
    echo "\t<td>";
예제 #11
0
파일: summary.php 프로젝트: schipa/viewgit
<h1>Heads</h1>

<table class="heads" id="heads">
    <thead>
        <tr>
            <th class="date">Date</th>
            <th class="branch">Branch</th>
            <th class="actions">Actions</th>
        </tr>
    </thead>
    <tbody>
        <?php 
$tr_class = 'even';
foreach ($page['heads'] as $h) {
    $tr_class = $tr_class == 'odd' ? 'even' : 'odd';
    echo "<tr class=\"{$tr_class}\">\n";
    echo "\t<td>{$h['date']}</td>\n";
    echo "\t<td><a href=\"" . makelink(array('a' => 'shortlog', 'p' => $page['project'], 'h' => $h['fullname'])) . "\">" . htmlentities_wrapper($h['name']) . "</a></td>\n";
    echo "\t<td></td>\n";
    echo "</tr>\n";
}
?>
    </tbody>
</table>

<?php 
// call plugins that register "summary" hook
if (in_array('summary', array_keys(VGPlugin::$plugin_hooks))) {
    VGPlugin::call_hooks('summary');
}