web: prefs tooltip tweaks; simplity table format of project prefs

This commit is contained in:
David Anderson 2015-02-18 23:35:11 -08:00
parent dd1be1c0ce
commit 7348a9b47f
2 changed files with 25 additions and 30 deletions

View File

@ -45,13 +45,13 @@ $cpu_prefs = array(
"Usage limits",
new PREF_NUM(
tra("Use at most"),
"Example: 50% means use 4 cores on an 8-core CPU.",
"Keep some CPUs free for other applications. For example, 50% means use 4 cores on an 8-core CPU.",
"max_ncpus_pct",
new NUM_SPEC(tra("% of the CPUs"), 1, 100, 100)
),
new PREF_NUM(
tra("Use at most"),
"Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second.",
"Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. For example 75% means compute for 3 seconds, wait for 1 second, and repeat.",
"cpu_usage_limit",
new NUM_SPEC(tra("% of CPU time"), 1, 100, 100)
),
@ -101,13 +101,13 @@ $cpu_prefs = array(
"Other",
new PREF_NUM(
tra("Store at least"),
"Maintain enough tasks to keep the computer busy for this long.",
"Store enough tasks to keep the computer busy for this long.",
"work_buf_min_days",
new NUM_SPEC(tra("days of work"), 0, 10, .1)
),
new PREF_NUM(
tra("Store up to an additional"),
"Determines how much work is requested when contacting a project.",
"Store additional tasks above the minimum level. Determines how much work is requested when contacting a project.",
"work_buf_additional_days",
new NUM_SPEC(tra("days of work"), 0, 10, .5)
),
@ -136,7 +136,7 @@ $disk_prefs = array(
),
new PREF_OPT_NUM(
tra("Leave at least"),
"BOINC will try to leave at least much free space on the volume where it stores data.",
"If free space on the volume where BOINC stores data falls below this level, BOINC will stop fetching tasks.",
"disk_min_free_gb",
new NUM_SPEC(tra("GB free"), 0, 9999999, $dp->disk_min_free_gb, 1, 1)
),
@ -163,7 +163,7 @@ $mem_prefs = array(
),
new PREF_BOOL(
tra("Leave non-GPU tasks in memory while suspended"),
"Tasks not left in memory will resume from the last checkpoint when restarted.",
"If checked, suspended tasks resume with no work lost. If unchecked, suspended tasks resume from the last checkpoint saved to disk.",
"leave_apps_in_memory",
false
),
@ -179,46 +179,46 @@ $net_prefs = array(
"Usage limits",
new PREF_OPT_NUM(
tra("Limit download rate to"),
"Limit the rate of file download by BOINC.",
"Limit the download rate of file transfers.",
"max_bytes_sec_down",
new NUM_SPEC(tra("Kbytes/sec"), 0, 9999999, 0, 1000, 100)
new NUM_SPEC(tra("KB/sec"), 0, 9999999, 0, 1000, 100)
),
new PREF_OPT_NUM(
tra("Limit upload rate to"),
"Limit the rate of file upload by BOINC.",
"Limit the upload rate of file transfers.",
"max_bytes_sec_up",
new NUM_SPEC(tra("Kbytes/sec"), 0, 9999999, 0, 1000, 100)
new NUM_SPEC(tra("KB/sec"), 0, 9999999, 0, 1000, 100)
),
new PREF_NUM2(
tra("Limit usage to"),
"Example: BOINC should transfer at most 2 GB of data every 30 days.",
"Example: BOINC should transfer at most 2000 MB of data every 30 days.",
"daily_xfer_limit_mb",
"daily_xfer_period_days",
new NUM_SPEC(tra("Mbytes every"), 0, 9999999, 0, 1, 10000),
new NUM_SPEC(tra("MB every"), 0, 9999999, 0, 1, 10000),
new NUM_SPEC(tra("days"), 0, 9999999, 0, 1, 30)
),
"When to suspend",
new PREF_HOUR_RANGE(
tra("Transfer files only between"),
"Limit the time of day when BOINC can upload or download files.",
"Transfer files only during a particular range of hours each day.",
"net_start_hour", "net_end_hour"
),
"Other",
new PREF_BOOL(
tra("Skip data verification for image files"),
tra("Check this ONLY if your Internet provider modifies image files (UMTS does this, for example). Skipping verification reduces the security of BOINC."),
tra("Check this only if your Internet provider modifies image files. Skipping verification reduces the security of BOINC."),
"dont_verify_images",
false
),
new PREF_BOOL(
tra("Confirm before connecting to Internet"),
tra("Matters only if you have a modem, ISDN or VPN connection"),
tra("Useful only if you have a modem, ISDN or VPN connection"),
"confirm_before_connecting",
false
),
new PREF_BOOL(
tra("Disconnect when done"),
tra("Matters only if you have a modem, ISDN or VPN connection"),
tra("Useful only if you have a modem, ISDN or VPN connection"),
"hangup_if_dialed",
false
),

View File

@ -50,7 +50,7 @@ $app_types = get_app_types();
$project_pref_descs = array(
new PREF_NUM(
tra("Resource share"),
tra("Determines the proportion of your computer's resources allocated to this project. Example: if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3."),
tra("Determines the proportion of your computer's resources allocated to this project. For example, if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3."),
"resource_share",
new NUM_SPEC("", 0, 9999999, 100)
),
@ -77,7 +77,7 @@ if ($app_types->cpu) {
if ($app_types->ati) {
$project_pref_descs[] = new PREF_BOOL (
tra("Use ATI GPU"),
"Request tasks for ATI GPU from this project.",
"Request ATI GPU tasks from this project.",
"no_ati",
false,
true
@ -86,7 +86,7 @@ if ($app_types->ati) {
if ($app_types->cuda) {
$project_pref_descs[] = new PREF_BOOL (
tra("Use NVIDIA GPU"),
"Request tasks for NVIDIA GPU from this project.",
"Request NVIDIA GPU tasks from this project.",
"no_cuda",
false,
true
@ -95,7 +95,7 @@ if ($app_types->cuda) {
if ($app_types->intel_gpu) {
$project_pref_descs[] = new PREF_BOOL (
tra("Use Intel GPU"),
"Request tasks for Intel GPU from this project.",
"Request Intel GPU tasks from this project.",
"no_intel_gpu",
false,
true
@ -267,11 +267,9 @@ function prefs_show_project_specific($prefs, $columns=false) {
function print_prefs_display_project($user, $columns=false) {
$project_prefs = prefs_parse_project($user->project_prefs);
start_table();
$switch_link = " <font size=\"-2\"><a href=prefs.php?subset=project&cols=". (int)!$columns .">".tra("(Switch View)")."</a></font>";
$switch_link = " <font size=\"-1\"><a href=prefs.php?subset=project&cols=". (int)!$columns .">".tra("(Switch View)")."</a></font>";
if ($columns) {
row1(tra("Combined preferences").$switch_link, 2, "heading");
echo "<tr><td colspan=2>";
echo "<h2>".tra("Combined preferences").$switch_link."</h2>";
start_table();
prefs_show_privacy($user, true);
venue_show($user);
@ -280,26 +278,23 @@ function print_prefs_display_project($user, $columns=false) {
prefs_show_project_specific($project_prefs, true);
row_links("project", $project_prefs);
end_table();
echo "</td></tr>\n";
} else {
if (isset($project_prefs->home) || isset($project_prefs->work) || isset($project_prefs->school)) {
row1(tra("Primary (default) preferences").$switch_link, 2, "heading");
echo "<h2>".tra("Primary (default) preferences").$switch_link."</h2>";
}
echo "<tr><td colspan=2>";
start_table();
prefs_show_project($project_prefs, false);
prefs_show_privacy($user, false);
venue_show($user);
prefs_show_project_specific($project_prefs, false);
$tokens = url_tokens($user->authenticator);
row2("", "<a href=prefs_edit.php?subset=project$tokens>".tra("Edit %1 preferences", PROJECT)."</a>");
row2("", "<a href=prefs_edit.php?subset=project$tokens>".tra("Edit preferences")."</a>");
end_table();
echo "</td></tr>\n";
prefs_display_venue($project_prefs, "home", "project");
prefs_display_venue($project_prefs, "school", "project");
prefs_display_venue($project_prefs, "work", "project");
}
end_table();
}
////////////////////////////////////////////