Esempio n. 1
0
 def __init__(self,macroenv):
   '''
     Initialize and Set Sort Key, Sort Order, Fields/Extensions to show in the Output
     and a Mapping for Field Headers.
   '''
   RenderImpl.__init__(self,macroenv)
   self.extensions = []
   self.sortkey = self.setsortkey('id') # default: id
   self.imgpath = macroenv.tracreq.href.chrome( 'projectplan', self.macroenv.PPConstant.RelDocPath );
   try:
     self.limitlines = int(self.macroenv.macrokw.get( 'limitlines', 0 ))
   except:
     self.limitlines = 0
   
   # rows configured by user
   confrows = self.macroenv.macrokw.get( 'rows', '' ).strip() # deprecated: stupid error
   confcols = self.macroenv.macrokw.get( 'cols', '' ).strip()
   if confcols != '':
     confrows = confcols
   
   if confrows.upper() == 'ALL': # show all existing fields
     self.allfields = True
   else: # show a specified set of fields
     if confrows != '' :
       self.rows = [ r.strip() for r in confrows.split('|') if str(r).strip() != "" ]
       self.fields = ['id']
       self.fields.extend(self.rows)
     else:
       self.rows = []
   
   # should images be used in the cols
   self.useimages = self.macroenv.get_bool_arg('useimages', self.useimages )
   self.usecolors = self.macroenv.get_bool_arg('usecolors', self.usecolors )
   self.setascending(True)
Esempio n. 2
0
 def __init__(self,macroenv):
   self.FRAME_LABEL = 'Ticket Statistics'
   RenderImpl.__init__(self,macroenv)
   self.macroenv = macroenv
   
   # defines the order of the ticket status
   order = self.macroenv.macrokw.get('order')
   if order == None:
     self.orderOrg = ['*'] # everything is allowed
   else:
     self.orderOrg = order.split(';')
    def __init__(self, macroenv):
        '''
      Initialize and Set Sort Key, Sort Order, Fields/Extensions to show in the Output
      and a Mapping for Field Headers.
    '''
        RenderImpl.__init__(self, macroenv)
        self.extensions = []
        self.sortkey = self.setsortkey('id')  # default: id
        self.imgpath = macroenv.tracreq.href.chrome(
            'projectplan', self.macroenv.PPConstant.RelDocPath)
        try:
            self.limitlines = int(self.macroenv.macrokw.get('limitlines', 0))
        except:
            self.limitlines = 0

        # rows configured by user
        confrows = self.macroenv.macrokw.get(
            'rows', '').strip()  # deprecated: stupid error
        confcols = self.macroenv.macrokw.get('cols', '').strip()
        if confcols != '':
            confrows = confcols

        if confrows.upper() == 'ALL':  # show all existing fields
            self.allfields = True
        else:  # show a specified set of fields
            if confrows != '':
                self.rows = [
                    r.strip() for r in confrows.split('|')
                    if str(r).strip() != ""
                ]
                self.fields = ['id']
                self.fields.extend(self.rows)
            else:
                self.rows = []

        # should images be used in the cols
        self.useimages = self.macroenv.get_bool_arg('useimages',
                                                    self.useimages)
        self.usecolors = self.macroenv.get_bool_arg('usecolors',
                                                    self.usecolors)
        self.setascending(True)