CMS 3D CMS Logo

Functions | Variables
web_templates Namespace Reference

Functions

def usual_validation_dataset_template (dataset_name, root_link, ref_file, dir_link, paths_to_pictures, source_file)
 

Variables

 create_main_list_element
 
 main_page_template
 
 usual_validation_template
 

Function Documentation

def web_templates.usual_validation_dataset_template (   dataset_name,
  root_link,
  ref_file,
  dir_link,
  paths_to_pictures,
  source_file 
)

Definition at line 61 of file web_templates.py.

References join().

61 def usual_validation_dataset_template(dataset_name, root_link, ref_file, dir_link, paths_to_pictures, source_file):
62  chunk_list = lambda l,n: [l[i:i+n] for i in range(0, len(l), n)]
63  rows_paths = chunk_list(paths_to_pictures,2)
64  cell_template = ' <td style="width: 640px;"><A href=%s><IMG src="%s" width="640" align="center" border="0"></A></td>'
65  row_template = ''' <tr>
66 %s </tr>\n'''
67  rows = ''.join([row_template % ''.join([ cell_template % (path,path) for path in row]) for row in rows_paths])
68  reference = '<A href=%s>Reference</A>' % ref_file if ref_file else 'Reference not available'
69  source = '<A href=%s>Input Source</A>' % source_file if ref_file else 'Source not available' #ALL source files seem empty... need to check
70  return ''' <h3>%s ( <A href=%s>Root File</A> ) ( %s ) ( %s ) ( <A href=%s>Full Directory Content</A> )</h3>
71  <table style="text-align: left; " border="1" cellpadding="2" cellspacing="1">
72  <tbody>
73 %s
74  </tbody>
75  </table>
76 ''' % (dataset_name, root_link, reference, source, dir_link, rows)
77 
def usual_validation_dataset_template(dataset_name, root_link, ref_file, dir_link, paths_to_pictures, source_file)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Variable Documentation

web_templates.create_main_list_element

Definition at line 32 of file web_templates.py.

web_templates.main_page_template

Definition at line 1 of file web_templates.py.

web_templates.usual_validation_template

Definition at line 35 of file web_templates.py.