def _get_sobject_wdg(self): ''' this method is called thru ajax ''' args = WebContainer.get_web().get_form_args() # get the args in the URL search_type = args['search_type'] sobj_search_type = args['sobj_search_type'] search_id = args['search_id'] view = args['view'] sobject = Search.get_by_id(sobj_search_type, search_id) content = Widget() table = TableWdg(search_type, view, css='table') table.set_show_property(False) content.add(table) content.add(HtmlElement.br(2)) search = self._get_sobject_search(sobject, search_type) sobjects = search.get_sobjects() if search_type.startswith("sthpw/note"): # this assumes that a project has submission! from pyasm.prod.biz import Submission from pyasm.search import SqlException try: notes = Submission.get_all_notes(sobject) sobjects.extend(notes) except SqlException: pass def compare(x, y): return cmp(y.get_value("timestamp"), x.get_value("timestamp")) sobjects.sort(cmp=compare) table.set_search(search) table.set_sobjects(sobjects) return content
def _get_sobject_wdg(my): ''' this method is called thru ajax ''' args = WebContainer.get_web().get_form_args() # get the args in the URL search_type = args['search_type'] sobj_search_type = args['sobj_search_type'] search_id = args['search_id'] view = args['view'] sobject = Search.get_by_id(sobj_search_type, search_id) content = Widget() table = TableWdg(search_type, view, css='table') table.set_show_property(False) content.add(table) content.add(HtmlElement.br(2)) search = my._get_sobject_search(sobject, search_type) sobjects = search.get_sobjects() if search_type.startswith("sthpw/note"): # this assumes that a project has submission! from pyasm.prod.biz import Submission from pyasm.search import SqlException try: notes = Submission.get_all_notes(sobject) sobjects.extend( notes ) except SqlException: pass def compare(x,y): return cmp( y.get_value("timestamp"), x.get_value("timestamp") ) sobjects.sort(cmp=compare) table.set_search(search) table.set_sobjects(sobjects) return content
def get_display(self): ''' # get the args in the URL args = WebContainer.get_web().get_form_args() search_type = args['search_type'] search_id = args['search_id'] ''' sobject = self.parent main_div = DivWdg() main_div.add_style("width: 98%") main_div.add_style("float: right") self.add(main_div) # get planned assets #planned_head, planned_div = self.get_planned_wdg(sobject) #main_div.add(planned_head) #main_div.add(planned_div) # add notes notes_head, notes_div = self.get_sobject_wdg(sobject, "sthpw/note", "summary", show_count=False) main_div.add(notes_head) main_div.add(notes_div) from pyasm.prod.biz import Submission notes = Submission.get_all_notes(sobject) # add references #ref_head, ref_div = self.get_sobject_wdg(sobject, "sthpw/connection","detail", title="References") #main_div.add(ref_head) #main_div.add(ref_div) #task_head, task_div = self.get_sobject_wdg(sobject, "sthpw/task", "summary") #main_div.add(task_head) #main_div.add(task_div) # add dailies: need a special function for this dailies_head, dailies_div = self.get_dailies_wdg(sobject) main_div.add(dailies_head) main_div.add(dailies_div) # add sobject history div hist_head, hist_div = self.get_sobject_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # add checkin history div hist_head, hist_div = self.get_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # queue queue_head, queue_div = self.get_sobject_wdg(sobject, "sthpw/queue", "summary") main_div.add(queue_head) main_div.add(queue_div) # renders render_head, render_div = self.get_sobject_wdg(sobject, "prod/render") main_div.add(render_head) main_div.add(render_div) return main_div
def get_display(self): sobject = self.parent main_div = DivWdg() main_div.add_style("width: 99%") main_div.add_style("float: right") self.add(main_div) # get planned assets planned_head, planned_div = self.get_planned_wdg(sobject) main_div.add(planned_head) main_div.add(planned_div) # add layers layers_head, layers_div = self.get_sobject_wdg(sobject, "prod/layer", "table", show_count=True) main_div.add(layers_head) main_div.add(layers_div) # add notes notes_head, notes_div = self.get_sobject_wdg(sobject, "sthpw/note", "summary", show_count=False) main_div.add(notes_head) main_div.add(notes_div) from pyasm.prod.biz import Submission notes = Submission.get_all_notes(sobject) # add storyboards story_head, story_div = self.get_sobject_wdg(sobject, "prod/storyboard", "summary") main_div.add(story_head) main_div.add(story_div) # add camera camera_head, camera_div = self.get_sobject_wdg( sobject, "prod/camera", ) main_div.add(camera_head) main_div.add(camera_div) # add plates plate_head, plate_div = self.get_sobject_wdg( sobject, "effects/plate", ) main_div.add(plate_head) main_div.add(plate_div) # add references ref_head, ref_div = self.get_sobject_wdg(sobject, "sthpw/connection", "detail", title="References") main_div.add(ref_head) main_div.add(ref_div) task_head, task_div = self.get_sobject_wdg(sobject, "sthpw/task", "summary") main_div.add(task_head) main_div.add(task_div) # add dailies: need a special function for this dailies_head, dailies_div = self.get_dailies_wdg(sobject) main_div.add(dailies_head) main_div.add(dailies_div) # add sobject history div hist_head, hist_div = self.get_sobject_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # add history div hist_head, hist_div = self.get_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # queue queue_head, queue_div = self.get_sobject_wdg(sobject, "sthpw/queue", "summary") main_div.add(queue_head) main_div.add(queue_div) # renders render_head, render_div = self.get_sobject_wdg(sobject, "prod/render") main_div.add(render_head) main_div.add(render_div) # add composites layers_head, layers_div = self.get_sobject_wdg(sobject, "prod/composite", "table", show_count=True) main_div.add(layers_head) main_div.add(layers_div) return main_div # handle migration assets -- they are connected are connected to the # original # FIXME: disabling for now: we are running into ajax depth limitations """ search = Search("sthpw/connection") search.add_filter("context", "migration") search.add_sobject_filter(sobject, prefix="src_") connections = search.get_sobjects() for connection in connections: conn_search_type = connection.get_value("dst_search_type") search = Search(conn_search_type) search.add_id_filter( connection.get_value("dst_search_id") ) aref_head, aref_div = self.get_sobject_wdg(sobject,search_type,"table", title="Shot Migration", search=search) main_div.add(aref_head) main_div.add(aref_div) """ return main_div
def get_display(my): ''' # get the args in the URL args = WebContainer.get_web().get_form_args() search_type = args['search_type'] search_id = args['search_id'] ''' sobject = my.parent main_div = DivWdg() main_div.add_style("width: 98%") main_div.add_style("float: right") my.add(main_div) # get planned assets #planned_head, planned_div = my.get_planned_wdg(sobject) #main_div.add(planned_head) #main_div.add(planned_div) # add notes notes_head, notes_div = my.get_sobject_wdg(sobject, "sthpw/note", "summary", show_count=False) main_div.add(notes_head) main_div.add(notes_div) from pyasm.prod.biz import Submission notes = Submission.get_all_notes(sobject) # add references #ref_head, ref_div = my.get_sobject_wdg(sobject, "sthpw/connection","detail", title="References") #main_div.add(ref_head) #main_div.add(ref_div) #task_head, task_div = my.get_sobject_wdg(sobject, "sthpw/task", "summary") #main_div.add(task_head) #main_div.add(task_div) # add dailies: need a special function for this dailies_head, dailies_div = my.get_dailies_wdg(sobject) main_div.add(dailies_head) main_div.add(dailies_div) # add sobject history div hist_head, hist_div = my.get_sobject_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # add checkin history div hist_head, hist_div = my.get_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # queue queue_head, queue_div = my.get_sobject_wdg(sobject, "sthpw/queue","summary") main_div.add(queue_head) main_div.add(queue_div) # renders render_head, render_div = my.get_sobject_wdg(sobject, "prod/render") main_div.add(render_head) main_div.add(render_div) return main_div
def get_display(my): sobject = my.parent main_div = DivWdg() main_div.add_style("width: 99%") main_div.add_style("float: right") my.add(main_div) # get planned assets planned_head, planned_div = my.get_planned_wdg(sobject) main_div.add(planned_head) main_div.add(planned_div) # add layers layers_head, layers_div = my.get_sobject_wdg(sobject, "prod/layer", "table", show_count=True) main_div.add(layers_head) main_div.add(layers_div) # add notes notes_head, notes_div = my.get_sobject_wdg(sobject, "sthpw/note", "summary", show_count=False) main_div.add(notes_head) main_div.add(notes_div) from pyasm.prod.biz import Submission notes = Submission.get_all_notes(sobject) # add storyboards story_head, story_div = my.get_sobject_wdg(sobject, "prod/storyboard", "summary") main_div.add(story_head) main_div.add(story_div) # add camera camera_head, camera_div = my.get_sobject_wdg(sobject, "prod/camera",) main_div.add(camera_head) main_div.add(camera_div) # add plates plate_head, plate_div = my.get_sobject_wdg(sobject, "effects/plate",) main_div.add(plate_head) main_div.add(plate_div) # add references ref_head, ref_div = my.get_sobject_wdg(sobject, "sthpw/connection","detail", title="References") main_div.add(ref_head) main_div.add(ref_div) task_head, task_div = my.get_sobject_wdg(sobject, "sthpw/task", "summary") main_div.add(task_head) main_div.add(task_div) # add dailies: need a special function for this dailies_head, dailies_div = my.get_dailies_wdg(sobject) main_div.add(dailies_head) main_div.add(dailies_div) # add sobject history div hist_head, hist_div = my.get_sobject_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # add history div hist_head, hist_div = my.get_history_wdg(sobject) main_div.add(hist_head) main_div.add(hist_div) # queue queue_head, queue_div = my.get_sobject_wdg(sobject, "sthpw/queue","summary") main_div.add(queue_head) main_div.add(queue_div) # renders render_head, render_div = my.get_sobject_wdg(sobject, "prod/render") main_div.add(render_head) main_div.add(render_div) # add composites layers_head, layers_div = my.get_sobject_wdg(sobject, "prod/composite", "table", show_count=True) main_div.add(layers_head) main_div.add(layers_div) return main_div # handle migration assets -- they are connected are connected to the # original # FIXME: disabling for now: we are running into ajax depth limitations """ search = Search("sthpw/connection") search.add_filter("context", "migration") search.add_sobject_filter(sobject, prefix="src_") connections = search.get_sobjects() for connection in connections: conn_search_type = connection.get_value("dst_search_type") search = Search(conn_search_type) search.add_id_filter( connection.get_value("dst_search_id") ) aref_head, aref_div = my.get_sobject_wdg(sobject,search_type,"table", title="Shot Migration", search=search) main_div.add(aref_head) main_div.add(aref_div) """ return main_div