Remove table-based options layout with DIV-based layout.
Don't show manual diff/revisions entry box unless javascript is not
available.
-<table class="options" cellspacing="0">
- <tr>
- <td>
- <?php echo _("Click on the revisions and branches to display the file.") ?><br />
- <?php echo _("Click on the links in between revisions to get a diff between those revisions.") ?>
- </td>
- </tr>
-</table>
+<div class="options">
+ <span>
+ <?php echo _("Click on the revisions and branches to display the file.") ?>
+ <br />
+ <?php echo _("Click on the links in between revisions to get a diff between those revisions.") ?>
+ </span>
+</div>
<p class="history">
<img usemap="#graphMap" alt="<?php echo htmlspecialchars($title) ?>" src="<?php echo $imgUrl ?>" />
-<table class="options" cellspacing="0">
- <tr>
- <td>
- <form method="get" action="diff.php">
- <?php echo Chora::formInputs() ?>
- <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
- <input type="hidden" name="r1" value="<?php echo htmlspecialchars(Horde_Util::getFormData('r1')) ?>" />
- <input type="hidden" name="r2" value="<?php echo htmlspecialchars(Horde_Util::getFormData('r2')) ?>" />
- <?php echo _("Download diff as: ") ?>
- <select name="t" onchange="this.form.submit()">
+<div class="options">
+ <span>
+ <form method="get" action="diff.php">
+ <?php echo Chora::formInputs() ?>
+ <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
+ <input type="hidden" name="r1" value="<?php echo htmlspecialchars(Horde_Util::getFormData('r1')) ?>" />
+ <input type="hidden" name="r2" value="<?php echo htmlspecialchars(Horde_Util::getFormData('r2')) ?>" />
+ <?php echo _("Download diff as: ") ?>
+ <select name="t" onchange="this.form.submit()">
<?php if (isset($diff_types['unified'])): ?>
- <option value="unified"><?php echo _("Unified") ?></option>
+ <option value="unified"><?php echo _("Unified") ?></option>
<?php endif; ?>
<?php if (isset($diff_types['context'])): ?>
- <option value="context"><?php echo _("Context") ?></option>
+ <option value="context"><?php echo _("Context") ?></option>
<?php endif; ?>
<?php if (isset($diff_types['column'])): ?>
- <option value="column"><?php echo _("Column") ?></option>
+ <option value="column"><?php echo _("Column") ?></option>
<?php endif; ?>
<?php if (isset($diff_types['ed'])): ?>
- <option value="ed"><?php echo _("Ed Script") ?></option>
+ <option value="ed"><?php echo _("Ed Script") ?></option>
<?php endif; ?>
- </select>
- <input class="button" type="submit" value="<?php echo _("Get Diff") ?>" /><br />
- </form>
- </td>
- </tr>
-</table>
+ </select>
+ <input class="button" type="submit" value="<?php echo _("Get Diff") ?>" /><br />
+ </form>
+ </span>
+</div>
+
<table cellspacing="0" class="hrdiff">
<caption>
<?php $blank = $registry->getImageDir('horde') . '/blank.gif' ?>
</li>
<?php endif; ?>
<?php if (!empty($val['tags'])): ?><li class="tags"><?php echo _("Tags:") ?> <?php echo implode(', ', $val['tags']) ?></li><?php endif; ?>
- <?php if (isset($val['added'])): ?><li><?php echo _("Statistics:") ?> <span class="diffadd">+<?php echo htmlspecialchars($val['added']) ?></span> <?php echo _("lines") ?>, <span class="diffdel">-<?php echo htmlspecialchars($val['deleted']) ?></span> <?php echo _("lines") ?></li><?php endif; ?>
+ <?php if (isset($val['added'])): ?><li><?php echo _("Changes:") ?> <span class="diffadd">+<?php echo htmlspecialchars($val['added']) ?></span>, <span class="diffdel">-<?php echo htmlspecialchars($val['deleted']) ?></span> <?php echo _("lines") ?></li><?php endif; ?>
</ul>
<a href="<?php echo Chora::url('co', $where, array('r' => $val['rev'])) ?>" title="<?php echo htmlspecialchars($val['rev']) ?>"><?php echo htmlspecialchars($VC->abbrev($val['rev'])) ?></a>: <?php echo $val['msg'] ?>
<div class="diffclear"></div>
<?php if (count($branches) > 1): ?>
-<table class="options" cellspacing="0">
- <tr>
- <td>
- <form method="get" action="browsedir.php">
+<div class="options">
+ <span>
+ <form method="get" action="browsedir.php">
<?php echo _("View Branch:") ?>
- <?php echo Chora::formInputs() ?>
- <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
- <select name="rev" onchange="this.form.submit()">
+ <?php echo Chora::formInputs() ?>
+ <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
+ <select name="rev" onchange="this.form.submit()">
<?php foreach ($branches as $branch): ?>
- <option value="<?php echo htmlspecialchars($branch) ?>"<?php echo ($branch == $rev) ? ' selected="selected"' : '' ?>><?php echo htmlspecialchars($branch) ?></option>
+ <option value="<?php echo htmlspecialchars($branch) ?>"<?php echo ($branch == $rev) ? ' selected="selected"' : '' ?>><?php echo htmlspecialchars($branch) ?></option>
<?php endforeach; ?>
- </select>
- <noscript><input class="button" type="submit" value="<?php echo _("View") ?>" /></noscript>
- </form>
- </td>
- </tr>
-</table>
+ </select>
+ <noscript><input class="button" type="submit" value="<?php echo _("View") ?>" /></noscript>
+ </form>
+ </span>
+</div>
<?php endif; ?>
<table id="browse" cellspacing="0" class="browse sortable striped nowrap">
<h1 class="header"><?php echo htmlspecialchars($title) ?></h1>
<table cellspacing="0" class="headerbar" id="headerbar">
<tr>
- <td>
+ <td class="browseLocation">
<?php echo _("Location:") ?>
<strong>[ <a href="<?php echo Chora::url('browsedir') ?>"><?php echo $conf['options']['sourceRootName'] ?></a> ]
<?php echo Chora::whereMenu($where) ?></strong>
- <?php if (!empty($onb)): ?>
- <em>(<?php echo _("Tracking Branch") ?> <strong><?php echo $onb ?></strong>)</em>
- <?php endif; ?>
+<?php if (!empty($onb)): ?>
+ <em><?php echo _("Tracking Branch") ?>: <strong><?php echo $onb ?></strong></em>
+<?php endif; ?>
</td>
<?php if (!empty($extraLink)): ?>
<td class="rightAlign"><?php echo $extraLink ?></td>
</table>
<?php if ($fl->revisionCount() > 100 && !Horde_Util::getFormData('all')): ?>
-<table class="options" cellspacing="0">
- <tr>
- <td>
- <?php printf(_("Only showing the 100 latest revisions. %sShow all revisions?</a> (may take a while)."),
- Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'all', 1))) ?>
- </td>
- </tr>
-</table>
+<div class="options">
+ <span>
+ <?php printf(_("Only showing the 100 latest revisions. %sShow all revisions?</a> (may take a while)."), Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'all', 1))) ?>
+ </span>
+</div>
<?php endif ?>
-<table class="options" cellspacing="0">
- <tr>
- <td>
- <?php echo _("Search Revisions:") ?>
- <input type="text" for="revlog_body" size="20" />
- </td>
+<div class="browsefileoptions">
+ <span>
+ <?php echo _("Search Revisions:") ?>
+ <input type="text" for="revlog_body" size="20" />
+ </span>
- <td class="spacer"></td>
- <td>
- <form method="get" action="diff.php">
- <?php echo Chora::formInputs() ?>
- <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
- <?php printf(_("Show diffs between %s and %s"),
- '<input type="text" size="6" name="r1" value="' . $diffValueLeft . '" />',
- '<input type="text" size="6" name="r2" value="' . $diffValueRight . '" />') ?>
- <input class="button" type="submit" value="<?php echo _("Diff") ?>" /><br />
- <em><?php printf(_("%1\$s shows diffs to the previous revision. If you select a revision by clicking its row, %1\$s will show the differences to the selected row."),
- Horde::img('diff.png', _("Show Differences"))) ?></em>
- </form>
- </td>
-
- <td class="spacer"></td>
+ <span>
+<?php if (!$browser->hasFeature('javascript')): ?>
+ <form method="get" action="diff.php">
+ <?php echo Chora::formInputs() ?>
+ <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
+ <?php printf(_("Show diffs between %s and %s"),
+ '<input type="text" size="6" name="r1" value="' . $diffValueLeft . '" />',
+ '<input type="text" size="6" name="r2" value="' . $diffValueRight . '" />') ?>
+ <input class="button" type="submit" value="<?php echo _("Diff") ?>" /><br />
+ </form>
+<?php endif; ?>
+ <em><?php printf(_("%1\$s shows diffs to the previous revision. If you select a revision by clicking its row, %1\$s will show the differences to the selected row."), Horde::img('diff.png', _("Show Differences"))) ?></em>
+ </span>
<?php if (!empty($selAllBranches)): ?>
- <td>
- <form method="get" action="browsefile.php">
- <?php echo Chora::formInputs() ?>
- <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
- <?php echo _("Show Branch:") ?>
- <select name="onb" onchange="this.form.submit()">
- <option value="0"<?php if (!isset($onb) || !$onb) echo ' selected="selected"' ?>><?php echo _("All Branches") ?></option>
- <?php echo $selAllBranches ?>
- </select>
- <noscript><input class="button" type="submit" value="<?php echo _("View") ?>" /></noscript>
- </form>
- </td>
-<?php else: ?>
- <td> </td>
+ <span>
+ <form method="get" action="browsefile.php">
+ <?php echo Chora::formInputs() ?>
+ <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
+ <?php echo _("Show Branch:") ?>
+ <select name="onb" onchange="this.form.submit()">
+ <option value="0"<?php if (!isset($onb) || !$onb) echo ' selected="selected"' ?>><?php echo _("All Branches") ?></option>
+ <?php echo $selAllBranches ?>
+ </select>
+ <noscript><input class="button" type="submit" value="<?php echo _("View") ?>" /></noscript>
+ </form>
+ </span>
<?php endif; ?>
- </tr>
-</table>
+</div>
<table class="revlog striped sortable" id="revlog" cellspacing="0">
<thead>
<span class="branch"><?php echo Horde::link(Chora::url('browsefile', $where, array('onb' => $val))) . htmlspecialchars($val) ?></a></span>
<?php endforeach; ?>
<?php if (!empty($changedlines)): ?>
- <small>(<?php printf('%s lines', htmlspecialchars($changedlines)) ?>)</small>
+ <small class="difflines">(<?php printf('%s lines', htmlspecialchars($changedlines)) ?>)</small>
+<?php elseif (!is_null($added)): ?>
+ <small class="difflines">(<span class="diffadd">+<?php echo $added ?></span>, <span class="diffdel">-<?php echo $deleted ?></span> <?php echo _("lines") ?>)</small>
<?php endif; ?>
-<?php if (!is_null($added)): ?>
- <small>(<span class="diffadd">+<?php echo $added ?></span>, <span class="diffdel">-<?php echo $deleted ?></span> <?php echo _("lines") ?>)</small>
-<?php endif; ?>
-</td>
+ </td>
<td class="ago" sortval="<?php echo (int)$lg->queryDate() ?>"><a title="<?php echo $readableDate ?>"><?php echo $commitDate ?></a></td>
<td class="author"><?php echo $author ?></td>
<td class="log">
-<table class="options" cellspacing="0">
- <tr>
- <td>
+<div class="options">
+ <span>
<?php if ($ps_id): ?>
- <?php echo $full_ps_link ?>
+ <?php echo $full_ps_link ?>
<?php else: ?>
- <?php echo _("Search Patchsets:") ?>
- <input type="text" for="patchsets_body" size="20" />
+ <?php echo _("Search Patchsets:") ?>
+ <input type="text" for="patchsets_body" size="20" />
<?php endif; ?>
- </td>
- </tr>
-</table>
+ </span>
+</div>
}
/* Options boxes. */
-table.options {
- width: 99%;
+div.options, div.browsefileoptions {
margin: 0 0 8px 5px;
}
-table.options td {
- font-size: 80%;
- width: 33%;
+div.options span, div.browsefileoptions span {
+ display: -moz-inline-stack;
+ display: inline-block;
+ zoom: 1;
+ *display: inline;
border: 1px solid #ccc;
- padding: 2px;
+ padding: 6px;
background: #e9e9e9;
vertical-align: top;
}
-table.options td.spacer {
- width: 10px;
- background: none;
- border: none;
+div.browsefileoptions span {
+ width: 31.3%;
}
-table.options em {
- display: block;
+div.options em, div.browsefileoptions em {
margin-top: 4px;
}
+div.browsefileoptions form {
+ margin-bottom: 4px;
+}
/* Tables. */
table.revlog, table.headerbar, table.browse, table.stats {
.revlog .selection .sdiff, .revlog .selection .selected .pdiff {
display: inline;
}
+.revlog .difflines {
+ display: block;
+}
/* Patchset logs. */
#patchsets ul {
div.diffclear {
clear: both;
}
+
+/* Browsefile definitions. */
+td.browseLocation em {
+ display: block;
+}