Beispiel #1
0
 def _make_parent_list(self, trait):
     plist = UnorderedList()
     parents = self.trait.parents(trait=trait)
     for parent in parents:
         pp = Anchor(parent, href='show.parent.%s' % parent)
         plist.append(ListItem(pp))
     return plist
Beispiel #2
0
 def _make_parent_list(self, trait):
     plist = UnorderedList()
     parents = self.trait.parents(trait=trait)
     for parent in parents:
         pp = Anchor(parent, href='show.parent.%s' % parent)
         plist.append(ListItem(pp))
     return plist
Beispiel #3
0
    def set_family(self, family):
        self.family.set_family(family)
        parents = self.family.parents()
        erows = self.family.environment_rows()
        self.clear_body()
        title = SectionTitle('Family:  %s' % family)
        title['bgcolor'] = 'IndianRed'
        title['width'] = '100%'

        self.body.append(title)
        parent_anchor = Anchor('Parents', href='edit.parents.%s' % family)
        self.body.append(SectionTitle(parent_anchor))
        if len(parents):
            plist = UnorderedList()
            for p in parents:
                plist.append(ListItem(p))
            self.body.append(plist)
        vtitle = Anchor('Variables',
                        href='edit.variables.%s' % self.family.current)
        self.body.append(SectionTitle(vtitle))
        if len(erows):
            self.body.append(PVarTable(erows, bgcolor='MistyRose2'))
        self.body.append(Ruler())
        del_anchor = Anchor('delete', href='delete.family.%s' % family)
        self.body.append(del_anchor)
Beispiel #4
0
 def set_profile(self, profile):
     self.clear_body()
     self.profile.set_profile(profile)
     suite = self.profile.current.suite
     maintitle_text = 'Profile:  %s' % profile
     #ptitle.append('(suite ')
     #ptitle.append(Anchor(suite, href='change.suite.%s' % suite))
     #ptitle.append(')')
     #title = SectionTitle('Profile:  %s   (suite %s) ' % (profile, suite))
     title = SectionTitle(maintitle_text)
     title['bgcolor'] = 'IndianRed'
     title['width'] = '100%'
     title.cell.append('  (suite ')
     title.cell.append(Anchor(suite, href='change.suite.%s' % suite))
     title.cell.append(')')
     
     self.body.append(title)
     rows = self.profile.get_trait_rows()
     ptitle = Anchor('Traits', href='edit.traits.%s' % self.profile.current.profile)
     self.body.append(SectionTitle(ptitle))
     if len(rows):
         self.body.append(TraitTable(rows, bgcolor='IndianRed1'))
     vtitle = Anchor('Variables', href='edit.variables.%s' % self.profile.current.profile)
     self.body.append(SectionTitle(vtitle))
     erows = self.profile._env.get_rows()
     if len(erows):
         self.body.append(PVarTable(erows, bgcolor='MistyRose2'))
     etitle = Anchor('Families', href='edit.families.%s' % self.profile.current.profile)
     self.body.append(SectionTitle(etitle))
     families = self.profile.get_families()
     flist = UnorderedList()
     for f in families:
         flist.append(ListItem(f))
     self.body.append(flist)
Beispiel #5
0
 def _make_scripts_list(self, trait):
     rows = self.trait._scripts.scripts(trait=trait)
     if rows:
         slist = UnorderedList()
         for row in rows:
             script = row.script
             p = Paragraph()
             sa = Anchor(script, href='show.script.%s' % script)
             ea = Anchor('(edit)', href='edit.script.%s' % script)
             p.append(sa)
             p.append(ea)
             slist.append(ListItem(p))
         return slist
     else:
         return None
Beispiel #6
0
 def _make_scripts_list(self, trait):
     rows = self.trait._scripts.scripts(trait=trait)
     if rows:
         slist = UnorderedList()
         for row in rows:
             script  = row.script
             p = Paragraph()
             sa = Anchor(script, href='show.script.%s' % script)
             ea = Anchor('(edit)', href='edit.script.%s' % script)
             p.append(sa)
             p.append(ea)
             slist.append(ListItem(p))
         return slist
     else:
         return None
Beispiel #7
0
 def set_family(self, family):
     self.family.set_family(family)
     parents = self.family.parents()
     erows = self.family.environment_rows()
     self.clear_body()
     title = SectionTitle('Family:  %s' % family)
     title['bgcolor'] = 'IndianRed'
     title['width'] = '100%'
     self.body.append(title)
     self.body.append(SectionTitle('Parents'))
     if len(parents):
         plist = UnorderedList()
         for p in parents:
             plist.append(ListItem(p))
         self.body.append(plist)
     vtitle = Anchor('Variables', href='edit.variables.%s' % self.family.current)
     self.body.append(SectionTitle(vtitle))
     if len(erows):
         self.body.append(PVarTable(erows, bgcolor='MistyRose2'))
Beispiel #8
0
    def set_profile(self, profile):
        self.clear_body()
        self.profile.set_profile(profile)
        suite = self.profile.current.suite
        maintitle_text = 'Profile:  %s' % profile
        #ptitle.append('(suite ')
        #ptitle.append(Anchor(suite, href='change.suite.%s' % suite))
        #ptitle.append(')')
        #title = SectionTitle('Profile:  %s   (suite %s) ' % (profile, suite))
        title = SectionTitle(maintitle_text)
        title['bgcolor'] = 'IndianRed'
        title['width'] = '100%'
        title.cell.append('  (suite ')
        title.cell.append(Anchor(suite, href='change.suite.%s' % suite))
        title.cell.append(')')

        self.body.append(title)
        rows = self.profile.get_trait_rows()
        ptitle = Anchor('Traits',
                        href='edit.traits.%s' % self.profile.current.profile)
        self.body.append(SectionTitle(ptitle))
        if len(rows):
            self.body.append(TraitTable(rows, bgcolor='IndianRed1'))
        vtitle = Anchor('Variables',
                        href='edit.variables.%s' %
                        self.profile.current.profile)
        self.body.append(SectionTitle(vtitle))
        erows = self.profile._env.get_rows()
        if len(erows):
            self.body.append(PVarTable(erows, bgcolor='MistyRose2'))
        etitle = Anchor('Families',
                        href='edit.families.%s' % self.profile.current.profile)
        self.body.append(SectionTitle(etitle))
        families = self.profile.get_families()
        flist = UnorderedList()
        for f in families:
            flist.append(ListItem(f))
        self.body.append(flist)