Skip to content

Commit

Permalink
Add docs for get_page_is_responsive().
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Oct 13, 2015
1 parent 6e68771 commit 97517d2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion doc/modules/frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ the web frontend.
:meth:`~saliwebfrontend.display_index_page` calls
:meth:`~saliwebfrontend.get_index_page`.
Each method also calls :meth:`~saliwebfrontend.check_page_access` to
check whether access to the page is permitted.
check whether access to the page is permitted, and
:meth:`~saliwebfrontend.get_page_is_responsive` to determine whether
the page is responsive (resizeable).

.. method:: get_index_page()

Expand Down Expand Up @@ -189,6 +191,20 @@ the web frontend.
permitted. By default, it simply returns, allowing all access, for all
pages except the submit page, from which certain IPs are blocked.

.. method:: get_page_is_responsive(page_type)

Returns true iff the given page is 'responsive', that is it can be
safely resized to be much larger or smaller than the default size.
Pages that are *not* responsive will be displayed at the default size,
which doesn't look great on most mobile devices for example (the user
will typically have to resize and/or pan the screen, or read very small
text). A responsive page will be resized to fit the smartphone screen,
which could also look bad if page elements aren't designed to scale.

*page_type* is as for :meth:`~saliweb::frontend.check_page_access`. By
default, the queue and help pages are marked as responsive. It can be
overridden if other pages (such as the index page) are also resizable.

.. method:: download_results_file(job, file)

This method is called to download a single results file (when the user
Expand Down

0 comments on commit 97517d2

Please sign in to comment.