Esempio n. 1
0
    def get_display(my):

        args = WebContainer.get_web().get_form_args()

        # get the args in the URL
        search_type = args['search_type']
        search_id = args['search_id']

        sobject = Search.get_by_search_key("%s|%s" % (search_type, search_id))

        search = Search("prod/sequence_instance")
        search.add_filter(sobject.get_foreign_key(), sobject.get_code())
        all_instances = search.get_sobjects()
        widget = DivWdg()
        widget.add_style("width: 95%")
        widget.add_style("margin-left: 20px")
        table = TableWdg("prod/sequence_instance", "layout", css="minimal")
        table.set_show_property(False)
        table.set_show_header(False)
        table.set_sobjects(all_instances)
        table.set_search(search)
        widget.add(table)

        aux_data = SequenceInstance.get_aux_data(all_instances)
        table.set_aux_data(aux_data)
        return widget
Esempio n. 2
0
    def get_display(my):

        args = WebContainer.get_web().get_form_args()

        # get the args in the URL
        search_type = args['search_type']
        search_id = args['search_id']

        sobject = Search.get_by_search_key("%s|%s" % (search_type,search_id) )

        search = Search("prod/sequence_instance")
        search.add_filter(sobject.get_foreign_key(), sobject.get_code())
        all_instances = search.get_sobjects()
        widget = DivWdg()
        widget.add_style("width: 95%")
        widget.add_style("margin-left: 20px")
        table = TableWdg("prod/sequence_instance", "layout", css="minimal")
        table.set_show_property(False)
        table.set_show_header(False)
        table.set_sobjects(all_instances)
        table.set_search(search)
        widget.add(table)

        aux_data = SequenceInstance.get_aux_data(all_instances)
        table.set_aux_data(aux_data)
        return widget
Esempio n. 3
0
    def get_display(my):

        args = WebContainer.get_web().get_form_args()

        # get the args in the URL
        search_type = args['search_type']
        search_id = args['search_id']

        sobject = Search.get_by_search_key("%s|%s" % (search_type,search_id) )

        #instances = sobject.get_all_children("prod/instance")

        all_instances = []

        # get parent instances first
        parent_code = ""
        if sobject.has_value("parent_code"):
            parent_code = sobject.get_value("parent_code")
        if parent_code != "":
            parent = sobject.get_by_code(parent_code)

            search = Search(my.get_search_type())
            search.add_filter(sobject.get_foreign_key(), parent.get_code())
            search.add_filter("type", "asset")
            instances = search.get_sobjects()

            all_instances.extend(instances)


        search = Search(my.get_search_type())
        search.add_filter(sobject.get_foreign_key(), sobject.get_code())
        search.add_filter("type", "asset")
        instances = search.get_sobjects()
        all_instances.extend(instances)

        widget = DivWdg()
        
        widget.add_style("width: 95%")
        
        widget.add_style("float: right")
        table = TableWdg(my.get_search_type(),"layout", css='simple')
        table.set_sobjects(all_instances)
        table.set_show_property(False)

        aux_data = ShotInstance.get_aux_data(all_instances)
        table.set_aux_data(aux_data)
        widget.add(table)
        return widget
Esempio n. 4
0
    def get_display(self):

        args = WebContainer.get_web().get_form_args()

        # get the args in the URL
        search_type = args['search_type']
        search_id = args['search_id']

        sobject = Search.get_by_search_key("%s|%s" % (search_type,search_id) )

        #instances = sobject.get_all_children("prod/instance")

        all_instances = []

        # get parent instances first
        parent_code = ""
        if sobject.has_value("parent_code"):
            parent_code = sobject.get_value("parent_code")
        if parent_code != "":
            parent = sobject.get_by_code(parent_code)

            search = Search(self.get_search_type())
            search.add_filter(sobject.get_foreign_key(), parent.get_code())
            search.add_filter("type", "asset")
            instances = search.get_sobjects()

            all_instances.extend(instances)


        search = Search(self.get_search_type())
        search.add_filter(sobject.get_foreign_key(), sobject.get_code())
        search.add_filter("type", "asset")
        instances = search.get_sobjects()
        all_instances.extend(instances)

        widget = DivWdg()
        
        widget.add_style("width: 95%")
        
        widget.add_style("float: right")
        table = TableWdg(self.get_search_type(),"layout", css='simple')
        table.set_sobjects(all_instances)
        table.set_show_property(False)

        aux_data = ShotInstance.get_aux_data(all_instances)
        table.set_aux_data(aux_data)
        widget.add(table)
        return widget