(self)
return div
from tactic.ui.panel import TableLayoutWdg
        table = TableLayoutWdg(search_type="sthpw/search_object",view="table",show_insert='false', show_row_select='false', do_search='false', show_gear='false', show_refresh='false', show_search_limit='false')
        search = Search("sthpw/search_object")
        search.add_filter("search_type", self.search_type)
        search_type_obj = search.get_sobject()
        table.set_sobject(search_type_obj)

        # Create the Advance bar and add the swap widget to it.
        advanced_bar = DivWdg()
        swap = SwapDisplayWdg()
        title = SpanWdg("Advanced")
        swap.create_swap_title(title, swap, advanced_bar, is_open=False)

        advanced_top = DivWdg(css="maq_search_bar")
        advanced_top.add_style("margin: 5px 0px 5px 0px")
        advanced_top.add_style("background-color: black")
        advanced_top.add_styles("background: white")
        advanced_top.add_style("padding: 3px")
        advanced_top.add(swap)
        advanced_top.add(title)
        
        # Wrap the Search Type Table in a div and add it to the advanced options.
        div_table = DivWdg()
        div_table.add_style("padding: 3px")
        div_table.add(table)
        div_table.add_style("background-color: #444")
        advanced_bar.add(div_table)
        advanced_top.add(advanced_bar)

        # Add the Advanced Search Type table.
        top_div.add(advanced_top)
        top_div.add(HtmlElement.br())
from tactic.ui.panel import TableLayoutWdg
        table = TableLayoutWdg(search_type="sthpw/search_object",view="table",show_insert='false', show_row_select='false', do_search='false', show_gear='false', show_refresh='false', show_search_limit='false')
        search = Search("sthpw/search_object")
        search.add_filter("search_type", self.search_type)
        search_type_obj = search.get_sobject()
        table.set_sobject(search_type_obj)
from tactic . ui . panel import TableLayoutWdg table = TableLayoutWdg ( search_type = sthpw / search_object view = table show_insert = false show_row_select = false do_search = false show_gear = false show_refresh = false show_search_limit = false ) search = Search ( sthpw / search_object ) search . add_filter ( search_type self . search_type ) search_type_obj = search . get_sobject () table . set_sobject ( search_type_obj )
def get_display(self):
        div = DivWdg()

        div.add_style("margin: 20px")

        
        top_div = DivWdg(id='SearchTypeManager', css='spt_panel')
        top_div.set_attr('spt_class_name','tactic.ui.panel.SearchTypeManagerWdg')
        top_div.add_class( "spt_view_manager_top" )
        
        div.add(top_div)

        #top_div.add( self.get_action_wdg(self.search_type) ) 
        #top_div.add(HtmlElement.br())

        div.add(HtmlElement.br())
        if not self.search_type:
            return div

        # check to see that the search type actually exists
        try:
            SearchType.get(self.search_type)
        except SearchException:
            return div

        # Create the Advanced Search Type table.    
        """
        from tactic.ui.panel import TableLayoutWdg
        table = TableLayoutWdg(search_type="sthpw/search_object",view="table",show_insert='false', show_row_select='false', do_search='false', show_gear='false', show_refresh='false', show_search_limit='false')
        search = Search("sthpw/search_object")
        search.add_filter("search_type", self.search_type)
        search_type_obj = search.get_sobject()
        table.set_sobject(search_type_obj)

        # Create the Advance bar and add the swap widget to it.
        advanced_bar = DivWdg()
        swap = SwapDisplayWdg()
        title = SpanWdg("Advanced")
        swap.create_swap_title(title, swap, advanced_bar, is_open=False)

        advanced_top = DivWdg(css="maq_search_bar")
        advanced_top.add_style("margin: 5px 0px 5px 0px")
        advanced_top.add_style("background-color: black")
        advanced_top.add_styles("background: white")
        advanced_top.add_style("padding: 3px")
        advanced_top.add(swap)
        advanced_top.add(title)
        
        # Wrap the Search Type Table in a div and add it to the advanced options.
        div_table = DivWdg()
        div_table.add_style("padding: 3px")
        div_table.add(table)
        div_table.add_style("background-color: #444")
        advanced_bar.add(div_table)
        advanced_top.add(advanced_bar)

        # Add the Advanced Search Type table.
        top_div.add(advanced_top)
        top_div.add(HtmlElement.br())
        """

        table = Table()
        table.add_color("color", "color")
        table.add_row()

        # add the sections
        td = table.add_cell()
        td.add_style("vertical-align: top")

        # add the template view containing the possible block items to be added
        # ie: New Column
        menu_div = DivWdg()
        menu_div.set_id("menu_item_template")
        menu_div.add_style("display: none")
        menu_div.add( self.get_section_wdg("template") )
        td.add(menu_div) 

        # add the widget column
        show_definition = self.kwargs.get("show_definition")
        if  not show_definition in ['false', False]:
            definition_view = DivWdg()
            definition_view.set_id("menu_item_list")
            definition_view.add( self.get_section_wdg("definition", title='Widget Column', editable=False, default=True) )
            td.add(definition_view)

        td.add("<br/>")

        # add the db_column
        definition_view = DivWdg()
        definition_view.add_style('min-width: 200px')
        definition_view.set_id("menu_item_list")
        definition_view.add( self.get_section_wdg("db_column", title='Database Columns', editable=False) )

        td.add(definition_view)
        td.add_style("vertical-align: top")
        td.add("<br/>")



        # add the custom definition containing the possible items to be added
        # ie: default columns
        """
        menu_div = DivWdg()
        menu_div.set_id("menu_item_custom_definition")
        menu_div.add_style("display: block")

        menu_div.add( self.get_section_wdg("custom_definition") )
        td.add(menu_div)
        """

        # add detail information
        detail_wdg = ManageSearchTypeDetailWdg(search_type=self.search_type)
        td = table.add_cell( detail_wdg )

        # set the panel information
        td.set_id("manage_side_bar_detail")
        td.add_class('spt_view_manager_detail')
        td.add_style("display", "table-cell")
        td.add_attr("spt_class_name", "tactic.ui.panel.ManageSearchTypeDetailWdg")
        td.add_attr("spt_search_type", self.search_type)

        td.add_style("padding: 0 20px 20px 20px")
        td.add_style("vertical-align: top")
        #td.add_attr("rowspan", "2")

        

        top_div.add(table)
        # add the predefined list
        predefined = self.get_predefined_wdg()
        top_div.add(predefined)

        return div
def get_display ( self ) : div = DivWdg ( ) div . add_style ( "margin: 20px" ) top_div = DivWdg ( id = 'SearchTypeManager' , css = 'spt_panel' ) top_div . set_attr ( 'spt_class_name' , 'tactic.ui.panel.SearchTypeManagerWdg' ) top_div . add_class ( "spt_view_manager_top" ) div . add ( top_div ) #top_div.add( self.get_action_wdg(self.search_type) )  #top_div.add(HtmlElement.br()) div . add ( HtmlElement . br ( ) ) if not self . search_type : return div # check to see that the search type actually exists try : SearchType . get ( self . search_type ) except SearchException : return div # Create the Advanced Search Type table.     table = Table ( ) table . add_color ( "color" , "color" ) table . add_row ( ) # add the sections td = table . add_cell ( ) td . add_style ( "vertical-align: top" ) # add the template view containing the possible block items to be added # ie: New Column menu_div = DivWdg ( ) menu_div . set_id ( "menu_item_template" ) menu_div . add_style ( "display: none" ) menu_div . add ( self . get_section_wdg ( "template" ) ) td . add ( menu_div ) # add the widget column show_definition = self . kwargs . get ( "show_definition" ) if not show_definition in [ 'false' , False ] : definition_view = DivWdg ( ) definition_view . set_id ( "menu_item_list" ) definition_view . add ( self . get_section_wdg ( "definition" , title = 'Widget Column' , editable = False , default = True ) ) td . add ( definition_view ) td . add ( "<br/>" ) # add the db_column definition_view = DivWdg ( ) definition_view . add_style ( 'min-width: 200px' ) definition_view . set_id ( "menu_item_list" ) definition_view . add ( self . get_section_wdg ( "db_column" , title = 'Database Columns' , editable = False ) ) td . add ( definition_view ) td . add_style ( "vertical-align: top" ) td . add ( "<br/>" ) # add the custom definition containing the possible items to be added # ie: default columns """
        menu_div = DivWdg()
        menu_div.set_id("menu_item_custom_definition")
        menu_div.add_style("display: block")

        menu_div.add( self.get_section_wdg("custom_definition") )
        td.add(menu_div)
        """ # add detail information detail_wdg = ManageSearchTypeDetailWdg ( search_type = self . search_type ) td = table . add_cell ( detail_wdg ) # set the panel information td . set_id ( "manage_side_bar_detail" ) td . add_class ( 'spt_view_manager_detail' ) td . add_style ( "display" , "table-cell" ) td . add_attr ( "spt_class_name" , "tactic.ui.panel.ManageSearchTypeDetailWdg" ) td . add_attr ( "spt_search_type" , self . search_type ) td . add_style ( "padding: 0 20px 20px 20px" ) td . add_style ( "vertical-align: top" ) #td.add_attr("rowspan", "2") top_div . add ( table ) # add the predefined list predefined = self . get_predefined_wdg ( ) top_div . add ( predefined ) return div