mirror of https://github.com/BOINC/boinc.git
web: various bug fixes
- fix "jump to first unread post" feature - use <pre> for bbcode [code] - don't use table-responsive class for tables. It does bad/funky things, especially on small displays - remove start_table_noborder()
This commit is contained in:
parent
c5b948020d
commit
b33c463cf3
|
@ -377,6 +377,8 @@ function show_posts(
|
|||
}
|
||||
$i++;
|
||||
}
|
||||
// if jump to post, figure out what page to show
|
||||
//
|
||||
if ($jump_to_post) {
|
||||
$start = $ibest - ($ibest % $num_to_show);
|
||||
} else {
|
||||
|
@ -557,9 +559,8 @@ function show_post(
|
|||
|
||||
echo "
|
||||
<tr>
|
||||
<td $class rowspan=\"3\">
|
||||
<td $class rowspan=\"3\" width=\"20%\">
|
||||
<a name=\"$post->id\"></a>
|
||||
<div class=\"authorcol\">
|
||||
";
|
||||
|
||||
echo user_links($user, 0);
|
||||
|
@ -609,7 +610,7 @@ function show_post(
|
|||
}
|
||||
echo badges_string(true, $user, BADGE_HEIGHT_SMALL);
|
||||
}
|
||||
echo "</span></div></td>";
|
||||
echo "</span></td>";
|
||||
|
||||
echo "<td class=\"small\">";
|
||||
if ($controls == FORUM_CONTROLS) {
|
||||
|
@ -642,9 +643,10 @@ function show_post(
|
|||
if ($controls == FORUM_CONTROLS) {
|
||||
echo "</form>\n";
|
||||
}
|
||||
$class = $highlight?' class="bg-info" ':'';
|
||||
echo "</td>
|
||||
</tr>
|
||||
<tr class=\"".($highlight?"highlighted_":"")."row$n\">
|
||||
<tr $class>
|
||||
<td>
|
||||
";
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ function news_item($date, $title, $post) {
|
|||
}
|
||||
echo "</span>
|
||||
<br clear=all>
|
||||
<hr size=0 class=news_line>
|
||||
<hr>
|
||||
";
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ function show_profile($user, $logged_in_user, $screen_mode = false) {
|
|||
$can_edit = $logged_in_user && $user->id == $logged_in_user->id;
|
||||
|
||||
if ($can_edit) {
|
||||
row1("<a href=\"create_profile.php\">".tra("Edit your profile")."</a>");
|
||||
row1("<a href=\"create_profile.php\">".tra("Edit your profile")."</a>", 1, false);
|
||||
}
|
||||
|
||||
// If screening is enabled, only show picture in certain situations
|
||||
|
|
|
@ -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("[", "[", $x);
|
||||
return "<code>$x</code>";
|
||||
return "<pre>$x</pre>";
|
||||
},
|
||||
$text
|
||||
);
|
||||
|
@ -239,8 +239,8 @@ function bb2html($text, $export=false) {
|
|||
"<a href=\"http://\\2\" rel=\"nofollow\">http://\\2</a>",
|
||||
"<a href=\"http://\\2\" rel=\"nofollow\">\\3</a>",
|
||||
"<a href=\"http://\\2\" rel=\"nofollow\">http://\\2</a>",
|
||||
"<div style='font-style: oblique'>\\1 wrote:</div><blockquote class='postbody'>\\2</blockquote>",
|
||||
"<blockquote class='postbody'>\\1</blockquote>",
|
||||
"<em>\\1 wrote:</em><blockquote>\\2</blockquote>",
|
||||
"<blockquote>\\1</blockquote>",
|
||||
"<ul>\\1</ul><p>",
|
||||
"<ol>\\1</ol><p>",
|
||||
"<img hspace=\"8\" src=\"\\1\\2\"> ",
|
||||
|
|
|
@ -202,7 +202,7 @@ function page_head(
|
|||
echo '<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0">
|
||||
';
|
||||
if ($head_extra) {
|
||||
echo "\n$head_extra\n";
|
||||
|
@ -341,15 +341,9 @@ function pretty_time_str($x) {
|
|||
}
|
||||
|
||||
function start_table($class="") {
|
||||
echo '<div class="table-responsive">
|
||||
<table class="table table-condensed '.$class.'">
|
||||
echo '<div class="table">
|
||||
<table class="table table-condensed '.$class.'" >
|
||||
';
|
||||
|
||||
}
|
||||
|
||||
// TODO: currently no call uses the arguments, styling should only happen through CSS clases so $extra could be dropped in the future
|
||||
function start_table_noborder($extra="width=\"100%\"", $class="noborder") {
|
||||
echo "<table class=\"table $class\" $extra>";
|
||||
}
|
||||
|
||||
function end_table() {
|
||||
|
|
|
@ -326,7 +326,7 @@ function show_profile_form($profile, $warning=null) {
|
|||
echo "
|
||||
<form action=", $_SERVER['PHP_SELF'], " method=\"POST\", ENCTYPE=\"multipart/form-data\">
|
||||
";
|
||||
start_table_noborder();
|
||||
start_table();
|
||||
show_description();
|
||||
show_questions($profile);
|
||||
show_picture_option($profile);
|
||||
|
|
|
@ -99,7 +99,7 @@ if ($temp_sort_style) {
|
|||
}
|
||||
}
|
||||
|
||||
page_head($title, 'jumpToUnread();');
|
||||
page_head($title, 'onload="jumpToUnread();"');
|
||||
|
||||
$is_subscribed = $logged_in_user && BoincSubscription::lookup($logged_in_user->id, $thread->id);
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ function left(){
|
|||
'Join ',
|
||||
function() {
|
||||
global $no_computing, $no_web_account_creation, $master_url;
|
||||
echo "<ul>";
|
||||
if ($no_computing) {
|
||||
echo "
|
||||
<li> <a href=\"create_account_form.php\">Create an account</a>
|
||||
|
@ -108,6 +109,7 @@ function left(){
|
|||
<a target=\"_new\" href=\"http://boinc.berkeley.edu/wiki/BOINC_Help\">get help here</a>.
|
||||
";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue