web: tweaks

- highlight admins in msg boards using green stripe
- show code in posts without scrollbars
- default button size: sm
This commit is contained in:
David Anderson 2016-11-25 01:11:04 -08:00
parent 28a8014df0
commit 7be1f5d894
4 changed files with 4 additions and 5 deletions

View File

@ -555,7 +555,7 @@ function show_post(
} else {
$highlight = $is_posted_by_special;
}
$class = $highlight?' class="bg-info" ':'';
$class = $highlight?' style="border-left: 5px solid LightGreen" ':'';
echo "
<tr>
@ -577,7 +577,7 @@ function show_post(
$url = "pm.php?action=new&amp;userid=".$user->id;
$name = $user->name;
show_button($url, tra("Send&nbsp;message"), tra("Send %1 a private message",$name));
show_button($url, tra("Send message"), tra("Send %1 a private message",$name));
echo '<br>'.tra("Joined: %1", gmdate('j M y', $user->create_time)), "<br>";
if (!isset($user->nposts)) {

View File

@ -60,7 +60,6 @@ function pm_team_form($user, $teamid, $error=null) {
start_table();
echo $bbcode_html;
echo "<tr><td>\n";
echo "foobar";
echo "<textarea name=\"content\" class=\"form-control\" rows=\"18\">$content</textarea>";
echo "</td></tr>\n";
end_table();

View File

@ -144,7 +144,7 @@ function replace_pre_code($text, $export) {
$x = remove_br(substr($matches[0], 6, -7));
$x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false);
$x = str_replace("[", "&#91;", $x);
return "<pre style=\"width:800px;overflow:scroll\">$x</pre>";
return "<pre style=\"white-space:pre-wrap; \">$x</pre>";
},
$text
);

View File

@ -800,7 +800,7 @@ function current_url() {
// @param desc The title of the destination - typically used as a popup
// @param class The optional CSS class of the button. Defaults to a standard button
//
function show_button($url, $text, $desc=null, $class="btn btn-default btn-xs") {
function show_button($url, $text, $desc=null, $class="btn btn-default btn-sm") {
if (!$desc) $desc = $text;
echo "<a href=\"".$url."\" title=\"$desc\" class=\"".$class."\">".$text."</a>\n";
}