Package s3 :: Module s3navigation
[frames] | no frames]

Module s3navigation

source code

S3 Navigation Module


Copyright: 2011-2019 (c) Sahana Software Foundation

License: MIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

To Do: - refine check_selected (e.g. must be False if link=False)

Classes
  S3NavigationItem
Base class and API for navigation items.
  S3ScriptItem
Simple Navigation Item just for injecting scripts into HTML forms
  S3ResourceHeader
Simple Generic Resource Header for tabbed component views
Functions
 
s3_rheader_resource(r)
Identify the tablename and record ID for the rheader
source code
 
s3_rheader_tabs(r, tabs=None)
Constructs a DIV of component links for a S3RESTRequest
source code
Function Details

s3_rheader_resource(r)

source code 

Identify the tablename and record ID for the rheader

Parameters:
  • r - the current S3Request

s3_rheader_tabs(r, tabs=None)

source code 

Constructs a DIV of component links for a S3RESTRequest

Parameters:
  • tabs - the tabs as list of tuples (title, component_name, vars), where vars is optional