def get_notes_wdg(my): widget = Widget() div = DivWdg(css="filter_box") columns = ['code', 'description'] search_filter = SearchFilterWdg("note_search", columns=columns,\ has_persistence=False) div.add(search_filter) sequence_filter = SequenceFilterWdg() div.add(sequence_filter) context_select = FilterSelectWdg("discussion_context") context_select.set_option("setting", "notes_preprod_context") context_select.add_empty_option("-- Any Context --") span = SpanWdg(css="med") span.add("Notes Context: ") span.add(context_select) hint = HintWdg('Submission notes for each shot are also included here') span.add(hint) div.add(span) widget.add(div) # create a search search = Search("prod/shot") sequence_filter.alter_search(search) search_filter.alter_search(search) table = TableWdg("prod/shot", "preprod_notes") table.set_search(search) widget.add(table) return widget
def get_art_reference(self): widget = Widget() help = HelpItemWdg('References', 'References tab lets the user organize art references. Each reference can be [related] to one or more assets defined in TACTIC. It can be set up when you [Edit] the reference.') self.add(help) div = DivWdg(css="filter_box") widget.add(div) columns = ['description','keywords'] search_filter = SearchFilterWdg("art_ref_search", columns=columns,\ has_persistence=False) div.add(search_filter) select = FilterSelectWdg("art_ref_category", label='Category: ', css='snall') select.set_option("setting", "art_reference_category") select.add_empty_option('-- Any --') div.add( select ) table = TableWdg("prod/art_reference") search = Search("prod/art_reference") search_filter.alter_search(search) value = select.get_value() if value != "": search.add_filter("category", value) table.set_search(search) widget.add(table) return widget
def get_camera_wdg(self): widget = Widget() div = DivWdg(css="filter_box") sequence_filter = SequenceFilterWdg() epi_code, sequence_code = sequence_filter.get_value() div.add(sequence_filter) search = Search("prod/camera") columns = ['shot_code', 'description'] search_filter = SearchFilterWdg("camera_search", columns=columns,\ has_persistence=False) search_filter.alter_search(search) div.add(search_filter) widget.add(div) if sequence_code: search.add_where("shot_code in (select code from shot where sequence_code = '%s')" % sequence_code) table = TableWdg("prod/camera") table.set_search(search) widget.add(table) return widget
def get_camera_wdg(my): widget = Widget() div = DivWdg(css="filter_box") sequence_filter = SequenceFilterWdg() epi_code, sequence_code = sequence_filter.get_value() div.add(sequence_filter) search = Search("prod/camera") columns = ['shot_code', 'description'] search_filter = SearchFilterWdg("camera_search", columns=columns,\ has_persistence=False) search_filter.alter_search(search) div.add(search_filter) widget.add(div) if sequence_code: search.add_where( "shot_code in (select code from shot where sequence_code = '%s')" % sequence_code) table = TableWdg("prod/camera") table.set_search(search) widget.add(table) return widget
def get_storyboard_wdg(my): widget = Widget() help = HelpItemWdg( 'Storyboards', 'Storyboards tab lets the user organize storyboards. You are only required to [Insert] once per shot. Subsequent versions of the storyboard should be published via the [Publish] button.' ) my.add(help) div = DivWdg(css="filter_box") sequence_filter = SequenceFilterWdg() epi_code, sequence_code = sequence_filter.get_value() div.add(sequence_filter) columns = ['code', 'shot_code'] search_filter = SearchFilterWdg("storyboard_search", columns=columns,\ has_persistence=False) div.add(search_filter) widget.add(div) # create a search search = Search("prod/storyboard") if sequence_code: search.add_where( "shot_code in (select code from shot where sequence_code = '%s')" % sequence_code) table = TableWdg("prod/storyboard") table.set_class("table") table.set_search_limit(25) table.set_search(search) widget.add(table) return widget
def get_notes_wdg(self): widget = Widget() div = DivWdg(css="filter_box") columns = ['code', 'description'] search_filter = SearchFilterWdg("note_search", columns=columns,\ has_persistence=False) div.add(search_filter) sequence_filter = SequenceFilterWdg() div.add(sequence_filter) context_select = FilterSelectWdg("discussion_context") context_select.set_option("setting", "notes_preprod_context") context_select.add_empty_option("-- Any Context --") span = SpanWdg(css="med") span.add("Notes Context: ") span.add(context_select) hint = HintWdg('Submission notes for each shot are also included here') span.add(hint) div.add(span) widget.add(div) # create a search search = Search("prod/shot") sequence_filter.alter_search(search) search_filter.alter_search(search) table = TableWdg("prod/shot", "preprod_notes") table.set_search(search) widget.add(table) return widget
def get_art_reference(my): widget = Widget() help = HelpItemWdg( 'References', 'References tab lets the user organize art references. Each reference can be [related] to one or more assets defined in TACTIC. It can be set up when you [Edit] the reference.' ) my.add(help) div = DivWdg(css="filter_box") widget.add(div) columns = ['description', 'keywords'] search_filter = SearchFilterWdg("art_ref_search", columns=columns,\ has_persistence=False) div.add(search_filter) select = FilterSelectWdg("art_ref_category", label='Category: ', css='snall') select.set_option("setting", "art_reference_category") select.add_empty_option('-- Any --') div.add(select) table = TableWdg("prod/art_reference") search = Search("prod/art_reference") search_filter.alter_search(search) value = select.get_value() if value != "": search.add_filter("category", value) table.set_search(search) widget.add(table) return widget
def init(my): search = Search("sthpw/queue") search.add_order_by("priority desc") search.add_order_by("timestamp desc") widget = Widget() div = DivWdg(css="filter_box") span = SpanWdg(css="med") from pyasm.prod.web import SearchFilterWdg search_filter = SearchFilterWdg(columns=Queue.get_search_columns()) search_filter.alter_search(search) span.add(search_filter) div.add(span) span = SpanWdg(css="med") priority_wdg = TextWdg("priority_search") priority_wdg.set_persistence() priority = priority_wdg.get_value() if priority: search.add_filter("priority", priority) span.add("Priority: ") span.add(priority_wdg) div.add(span) select = SelectWdg("queue_state") select.set_option("values", "|pending|locked|error|done") select.set_option("labels", "All|pending|locked|error|done") select.add_event("onchange", "document.form.submit()") select.set_persistence() span = SpanWdg(css="med") span.add("State: ") span.add(select) div.add(span) queue_state = select.get_value() if queue_state != "": search.add_filter("state", queue_state) user_select = SelectWdg("user_select") user_select.add_empty_option() user_search = Search("sthpw/login") user_select.set_search_for_options(user_search, "login", "login") user_select.add_event("onchange", "document.form.submit()") user_select.set_persistence() div.add("User: "******"": search.add_filter("login", queue_user) search_limit = SearchLimitWdg() search_limit.set_limit(10) div.add(search_limit) search_limit.alter_search(search) widget.add(div) sobjects = search.get_sobjects() table = TableWdg("sthpw/queue") table.set_sobjects(sobjects) widget.add(table) my.add(widget)