Commit Graph

347 Commits

Author SHA1 Message Date
David Anderson 0a94ab9d30 web: fixes for dark background; make button text normal size 2017-08-20 01:39:39 -07:00
David Anderson dfe7261cda web: improve button colors and appearance
principles:
- primary action buttons are green (btn-success)
- secondary action buttons are blue (btn-primary)
- potentially risky action buttons are yellow (btn-warning)
- if there are a lot of buttons (e.g. forum posts) use btn-xs
2017-08-20 01:17:21 -07:00
David Anderson e445541f4b web: allow parts of web functionality to be disabled
See issue #2051
2017-08-20 00:21:33 -07:00
David Anderson 431abc13ab Improve button appearance in prefs page
- for "add prefs for home" etc. use buttons instead of link
- use green for default button
- use yellow for risky buttons (like "reset prefs")
2017-08-14 12:35:48 -07:00
David Anderson 7b6479f437 Web: add option in gpu_desc() to show shorter version of GPU string 2017-07-22 00:13:08 -07:00
David Anderson bc536494dd Web: small changes
- make the filename of user home page configurable
- make some strings translatable
2017-07-13 01:17:21 -07:00
David Anderson 85d3af117e Web: add optional arg to time_diff() for choosing resolution 2017-07-05 01:17:24 -07:00
David Anderson 75d8bae2c5 web: add optional class param to row_heading() 2017-07-03 14:46:34 -07:00
David Anderson 620ba64c72 web: add rules for private messages (similar to forum rules) 2017-07-01 13:43:43 -07:00
David Anderson e9244a7844 web: use NO_COMPUTING constant rather than config.xml flag
We were using both.  Make it just one.
2017-06-16 22:44:24 -07:00
David Anderson 5afcdf0c3c Web: don't request postal code by default
We were asking for postal code (optional) on registration.
The purpose was to let projects study
the geographical distribution of their volunteers.
But AFAIK no one ever did this,
and some volunteers have said (understandably, I think)
that asking for postal code seems like an invasion of privacy.

So I conditioned the postal-code code on a boolean constant POSTAL_CODE.
If you put
define('POSTAL_CODE', true);
in your html/project/project.inc, you'll get the old behavior.
Otherwise users won't see postal-code related stuff any more.
2017-06-05 14:26:42 -07:00
David Anderson 93c46ee5a8 web: user secure URL base if available 2017-02-12 01:03:16 -08:00
David Anderson b59f0da617 web: if web stopped, get_logged_in_user() should return null (not show error page).
Otherwise e.g. the home page will be a single line.
Must at least show message of the day.
2017-02-08 11:54:40 -08:00
David Anderson c2350c7f57 web: try to get Recaptcha working on IE 2017-02-01 22:13:21 -08:00
David Anderson dfeeee23da Web: support pages in a subdirectory of html/user/.
... such as SETI@home's Nebula pages.
Prepend URL_BASE to URLs for login/logout/signup.
I may have missed some.
2017-02-01 11:54:10 -08:00
David Anderson 06be40e8f0 Web and web RPCs: add 5-second delay if password error
Slow down hackers trying to guess passwords
2017-01-12 13:19:01 -08:00
David Anderson 31a95ba10f client: add option to use SOCKS5 for DNS
Added <socks5_remote_dns> option to cc_config.xml.
Tells Curl to use the SOCKS proxy for domain name resolution.
2017-01-05 21:34:34 -08:00
David Anderson 5e858aca97 web: if project down for maintenance, say so and quit 2017-01-05 13:25:52 -08:00
David Anderson ce213120de web: fix bug in project prefs; appearance tweaks
- editing resource shared wasn't working
- change sizes of controls to "input-sm"
- show errors correctly in project prefs
- move selection of project prefs from project_specific_prefs.inc
  to project.inc.
  This means that (unless you've added your own project prefs)
  you can update project_specific_prefs.inc from master, with no changes.

NOTE: projects will need to move their project prefs selections, e.g.
    define('COLOR_PREFS', false);
from project_specific_prefs.inc to project.inc.
Then copy project.sample/project_specific_prefs.inc to your project/
2016-12-19 15:47:52 -08:00
David Anderson cb5668a0d8 web: various appearance tweaks
policy change: when showing lists of name/value pairs in a table,
don't show the names with a different background color or font.
This is what Edward Tufte would call "noise".
Keep the visuals as simple as possible.
2016-12-19 01:15:48 -08:00
David Anderson 91025d6b7a web: add utility functions for Bootstrap forms
Bootstrap forms require a bunch of <div>s and other stuff.
I wrapped these in functions like
form_start()
form_end()
form_submit()
form_select_multiple()
form_input_text()

General idea going forward:
put HTML (especially Bootstrap-specified) in utility functions,
e.g. in util.inc or bootstrap.inc.
This will make the higher-level code easier to read,
and will facilitate moving to CSS frameworks other than Bootstrap.
2016-12-16 12:05:30 -08:00
David Anderson b916f7bab2 BOINC web site: make it work on phones
The front page was displaying as 2 columns even on phones.
I couldn't figure out the problem, but I switched to the standard
page_head() (moving the top part to project_banner()) and that fixed it.
2016-12-11 00:11:45 -08:00
David Anderson 530160fe13 web: various tweaks
- reduce default button size to sm
- change color of blockquote bar
- put order select on same line as Sort button
2016-12-09 15:50:40 -08:00
David Anderson b327ec3789 web: bug fixes and improvements
- The table structure for message-board posts was messed up.  Simplify it.
- make buttons x-small
- make button text white
2016-12-09 00:44:26 -08:00
David Anderson 3641a319fc web: improve message display
In messages (forum or PM) a [pre] section with a long line
would stretch the table cell,
causing that message and others to run off the edge of the window.

The solution, as Juha pointed out, is to use table-layout:fixed
for those tables, and to explicitly set the width of the other columns.
This causes the long lines to be put in boxes with a horizontal scrollbar,
and nothing overflows.
2016-12-07 18:17:57 -08:00
David Anderson c054358a6e web: tweaks to fix Scrutinizer complaints; few visible effects 2016-12-07 11:32:25 -08:00
David Anderson a1f624ceb2 web: add remote job submission link to navbar 2016-12-06 13:55:18 -08:00
David Anderson 9d673e1c93 web: appearance tweaks
- use form-control class for text inputs and selects.
    This makes them all full-width, but I guess that's OK.
- use success class (green) for action buttons
- right-align table headings where appropriate
- use <small> instead of text-muted.
- tweak custom CSS to fix link and navbar visited colors
2016-12-04 21:04:23 -08:00
David Anderson 107b170ae1 web: finish job of making headings blue in striped tables
i.e. use row_heading() or row_heading_array() to generate the heading
2016-12-02 23:25:01 -08:00
David Anderson b2a93ac843 web: various tweaks
- change dark-background link color
- change dark-background colors for <pre>
- fix heading color for striped tables
    It turns out that, for striped tables, Bootstrap ignores classes for <tr>.
    You have to put them in the <th>.
    row_heading() and row_heading_array() do this for you.
- put Preview content into a table w/ heading
2016-12-02 12:24:20 -08:00
David Anderson c5a743baf4 web: if web stopped, show home page anyway 2016-11-29 12:59:38 -08:00
David Anderson 1140ec069d web: always use secure URL base if available. 2016-11-28 14:25:46 -08:00
David Anderson 1d1c9eb444 web: tweaks for bootstrap
A bunch of little things.
Also new BOINC front page, by accident.
2016-11-28 00:47:25 -08:00
David Anderson 5ea948224e web: make $master_url a global var 2016-11-25 20:41:09 -08:00
David Anderson 7be1f5d894 web: tweaks
- highlight admins in msg boards using green stripe
- show code in posts without scrollbars
- default button size: sm
2016-11-25 01:11:04 -08:00
David Anderson 28a8014df0 web tweaks
- fix display of BBcode links and menus
- change textareas to class form-control
- add color to select so they work with dark and light backgrounds

Note: I'm becoming somewhat less enamored of Bootstrap.
2016-11-24 20:32:01 -08:00
David Anderson a22b1e3136 web: various tweaks
- make selects 240px wide (kludge)
- in navbar, link user name to home page
- add Project to navbar, more Your Account there
- add maximum-scale to <meta>
2016-11-24 18:01:41 -08:00
David Anderson 9b6d26ce4c web: fix layout of report-post page 2016-11-23 17:18:21 -08:00
David Anderson 7463938995 web: more fixes for dark themes 2016-11-23 02:35:28 -08:00
David Anderson 7a492cedf3 project web: various enhancements:
- change default home page to replace text with a Join button,
    which links to a new page saying how to join.
- change default to show image to top of home page
- add form-control class to all <select>s so that text displays
    correctly with dark-background themes
- change args to page_head():
    - add $is_main; gets passed to project_banner()
    - remove $title_plain; not sure what it was for
- add arg for inverse navbar
2016-11-22 01:20:07 -08:00
David Anderson df8e221287 web: various tweaks
Please enter the commit message for your changes. Lines starting
2016-11-20 15:38:19 -08:00
David Anderson b33c463cf3 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()
2016-11-11 19:11:57 -08:00
David Anderson c5b948020d Initial commit for Bootstrap 2016-11-11 12:36:27 -08:00
David Anderson 60db5c6bde web: add function for google search form.
Add this to default front page.
Also remove <table> stuff from show_login_info();
let the caller decide how to format.
2016-10-19 13:44:38 -07:00
Christian Beer 3b6df98c44 Ops: update cancel_workunits scripts to use db layer
Also uses the wrapper functions for variables supplied by post and get requests.
2016-03-17 14:37:59 +01:00
Christian Beer b4665845d0 Web: update the reCAPTCHA PHP client library to 1.1.2
This version allows the use of alternative RequestMethods in case get_file_contents() is disabled for security reasons. Currently it uses fsockopen() but it can also use php-curl. Include inc/recaptchalib.php into the file where the reCaptcha is shown or validated. The function boinc_recaptcha_isValidated() is a convenient wrapper that can be updated for future versions or changes of the RequestMethod used.
2015-11-19 16:53:48 +01:00
Christian Beer 72bec2388a Web: rename recaptcha_get_html() because of a conflict with Drupal
When also including an older recaptchalib.php this function gets redefined. Since it is only a wrapper function and only used within BOINC, renaming it is safe.
2015-10-14 12:10:06 +02:00
David Anderson 592a8654a9 web: support shortcut icon for project pages
Projects can now define a shortcut icon in project.inc, e.g.
define("SHORTCUT_ICOM", "icon.gif");
See http://boinc.berkeley.edu/trac/wiki/WebConfig
2015-01-19 12:04:12 -08:00
Nicolás Alvarez cfd1d52c80 Update recaptcha to latest version of the API.
This allows a new simplified captcha that in some cases only makes the user
have to tick a checkbox; no need to type garbled characters or anything.
More info at:
http://googleonlinesecurity.blogspot.com/2014/12/are-you-robot-introducing-no-captcha.html
2015-01-17 00:18:44 -03:00
David Anderson 1f6082a92d web: fix function name conflict 2015-01-14 20:56:20 -08:00