def get_compact(my, sobj): table = Table(css='embed') col = table.add_col() col.add_style("width: 80px") table.add_col(css='med') table.add_col(css='large') table.add_style("width: 200px") table.add_row() src_sobj = sobj.get_parent() thumb = ThumbWdg() thumb.set_icon_size(40) thumb.set_sobject(src_sobj) table.add_cell(thumb) table.add_cell(src_sobj.get_code()) table.add_data(SpanWdg(HtmlElement.b(sobj.get_process()), css='small')) #table.add_row() expand = ExpandableTextWdg() expand.set_max_length(20) desc = sobj.get_value("description") if not desc: desc = ' ' expand.set_value(desc) table.add_row_cell(expand) return table
def _add_description(self, table): table.add_row() table.add_cell("<i>Description:</i>") expand = ExpandableTextWdg() expand.set_id('asset_info_desc') description = self.sobject.get_value("description", no_exception=True) expand.set_value( WikiUtil().convert(description) ) expand.set_max_length(240) table.add_cell( expand )
def _add_description(self, table): table.add_row() table.add_cell("<i>Description:</i>") expand = ExpandableTextWdg() expand.set_id('asset_info_desc') description = self.sobject.get_value("description", no_exception=True) expand.set_value(WikiUtil().convert(description)) expand.set_max_length(240) table.add_cell(expand)
def _add_desc(my, table, sobj): tr = table.add_row() #tr.set_attr('colspan', '3') table.add_cell(HtmlElement.i("Desc: ")) expand = ExpandableTextWdg() expand.set_max_length(40) desc = sobj.get_value("description") if not desc: desc = ' ' expand.set_value(desc) td = table.add_cell( expand ) td.set_attr('colspan', '2')
def _add_desc(my, table, sobj): tr = table.add_row() #tr.set_attr('colspan', '3') table.add_cell(HtmlElement.i("Desc: ")) expand = ExpandableTextWdg() expand.set_max_length(40) desc = sobj.get_value("description") if not desc: desc = ' ' expand.set_value(desc) td = table.add_cell(expand) td.set_attr('colspan', '2')
def get_display(self): self.sobject = self.get_current_sobject() table = Table(css='embed') table.add_style("width: 300px") table.add_color('color', 'color') table.add_row() td = table.add_cell( "<i>Code: </i> <b style='font-size: 1.2em'>%s</b>" % self.sobject.get_code()) td.add_style("background: #e0e0e0") table.add_row() self.thumb.set_current_index(self.get_current_index()) table.add_cell(self.thumb) table2 = Table(css='embed') table2.add_row() table2.add_cell("<i>Status: </i>") status = self.sobject.get_value("status") if not status: table2.add_cell("<i style='color: #c0c0c0'>None</i>") else: table2.add_cell(self.sobject.get_value("status")) self._add_frame_range(table2) table.add_cell(table2) table.add_row() td = table.add_cell("<i>Description: </i>") description = self.sobject.get_value("description") #td.add(WikiUtil().convert(description)) expand = ExpandableTextWdg() expand.set_id('asset_info_desc') expand.set_value(WikiUtil().convert(description)) expand.set_max_length(300) td.add(expand) return table
def get_display(self): self.sobject = self.get_current_sobject() custom_css = self.get_option('css') div = DivWdg(css=custom_css) div.add_color('color', 'color') div.add_style('width', '18em') code_span = SpanWdg('%s' % (self.sobject.get_code())) expand = ExpandableTextWdg() expand.set_id('shot_info_desc') description = self.sobject.get_value("description") expand.set_value(WikiUtil().convert(description)) desc_span = SpanWdg() desc_span.add(expand) div.add(code_span) div.add(HtmlElement.br()) div.add(desc_span) return div
def get_display(self): self.sobject = self.get_current_sobject() table = Table(css='embed') table.add_style("width: 300px") table.add_color('color','color') table.add_row() td = table.add_cell("<i>Code: </i> <b style='font-size: 1.2em'>%s</b>" % self.sobject.get_code() ) td.add_style("background: #e0e0e0") table.add_row() self.thumb.set_current_index(self.get_current_index()) table.add_cell(self.thumb) table2 = Table(css='embed') table2.add_row() table2.add_cell("<i>Status: </i>") status = self.sobject.get_value("status") if not status: table2.add_cell("<i style='color: #c0c0c0'>None</i>") else: table2.add_cell(self.sobject.get_value("status") ) self._add_frame_range(table2) table.add_cell( table2 ) table.add_row() td = table.add_cell( "<i>Description: </i>") description = self.sobject.get_value("description") #td.add(WikiUtil().convert(description)) expand = ExpandableTextWdg() expand.set_id('asset_info_desc') expand.set_value( WikiUtil().convert(description) ) expand.set_max_length(300) td.add(expand) return table
def get_display(self): self.sobject = self.get_current_sobject() custom_css = self.get_option('css') div = DivWdg(css=custom_css) div.add_color('color','color') div.add_style('width', '18em') code_span = SpanWdg('%s' % (self.sobject.get_code())) expand = ExpandableTextWdg() expand.set_id('shot_info_desc') description = self.sobject.get_value("description") expand.set_value( WikiUtil().convert(description) ) desc_span = SpanWdg() desc_span.add(expand) div.add(code_span) div.add(HtmlElement.br()) div.add(desc_span) return div
def get_display(my): my.sobject = my.get_current_sobject() custom_css = my.get_option('css') div = DivWdg(css=custom_css) div.add_color('color', 'color') div.add_style('width', '18em') code_span = SpanWdg('%s <i>%s</i>' \ %(my.sobject.get_code(), my.sobject.get_value('name'))) expand = ExpandableTextWdg() expand.set_id('asset_info_desc') description = my.sobject.get_value("description") expand.set_value(WikiUtil().convert(description)) desc_span = SpanWdg('Desc: ') desc_span.add(expand) div.add(code_span) div.add(HtmlElement.br()) div.add(desc_span) return div
def get_display(my): my.sobject = my.get_current_sobject() custom_css = my.get_option('css') div = DivWdg(css=custom_css) div.add_color('color','color') div.add_style('width', '18em') code_span = SpanWdg('%s <i>%s</i>' \ %(my.sobject.get_code(), my.sobject.get_value('name'))) expand = ExpandableTextWdg() expand.set_id('asset_info_desc') description = my.sobject.get_value("description") expand.set_value( WikiUtil().convert(description) ) desc_span = SpanWdg('Desc: ') desc_span.add(expand) div.add(code_span) div.add(HtmlElement.br()) div.add(desc_span) return div
def get_display(self): if not self.thumb: self.preprocess() self.sobject = self.get_current_sobject() table = Table(css='embed') table.add_color('color','color') table.add_style("width: 300px") table.add_row() th = table.add_header("<i>Code: </i> <b style='font-size: 1.2em'>%s</b>" % self.sobject.get_code() ) # add status th.add_style('text-align','left') status_span = SpanWdg("", css='large') th.add(status_span) status = self.sobject.get_value("status") if status: status_span.add(self.sobject.get_value("status")) table.add_row() self.thumb.set_current_index(self.get_current_index()) thumb_td = table.add_cell(self.thumb) row_span = 2 if self.sobject.has_value("priority"): row_span = 3 # add priority table.add_cell("<i>Priority: </i>") priority = self.sobject.get_value("priority") if not priority: table.add_cell("None") else: table.add_cell(self.sobject.get_value("priority") ) # this row should be added only if priority is added table.add_row() thumb_td.set_attr('rowspan', row_span) # add pipeline table.add_cell("<i>Pipeline: </i>") status = self.sobject.get_value("pipeline_code") if not status: table.add_cell("None") else: table.add_cell(self.sobject.get_value("pipeline_code") ) self._add_frame_range(table) table.add_row() td = table.add_cell( "<i>Description: </i>") description = self.sobject.get_value("description") expand = ExpandableTextWdg() expand.set_id('asset_info_desc') expand.set_value( WikiUtil().convert(description) ) expand.set_max_length(300) td.add(expand) main_div = DivWdg(table) if self.get_option("publish") == "false": return main_div #self._add_publish_link(main_div) return main_div
def get_display(self): if not self.thumb: self.preprocess() self.sobject = self.get_current_sobject() table = Table(css='embed') table.add_color('color', 'color') table.add_style("width: 300px") table.add_row() th = table.add_header( "<i>Code: </i> <b style='font-size: 1.2em'>%s</b>" % self.sobject.get_code()) # add status th.add_style('text-align', 'left') status_span = SpanWdg("", css='large') th.add(status_span) status = self.sobject.get_value("status") if status: status_span.add(self.sobject.get_value("status")) table.add_row() self.thumb.set_current_index(self.get_current_index()) thumb_td = table.add_cell(self.thumb) row_span = 2 if self.sobject.has_value("priority"): row_span = 3 # add priority table.add_cell("<i>Priority: </i>") priority = self.sobject.get_value("priority") if not priority: table.add_cell("None") else: table.add_cell(self.sobject.get_value("priority")) # this row should be added only if priority is added table.add_row() thumb_td.set_attr('rowspan', row_span) # add pipeline table.add_cell("<i>Pipeline: </i>") status = self.sobject.get_value("pipeline_code") if not status: table.add_cell("None") else: table.add_cell(self.sobject.get_value("pipeline_code")) self._add_frame_range(table) table.add_row() td = table.add_cell("<i>Description: </i>") description = self.sobject.get_value("description") expand = ExpandableTextWdg() expand.set_id('asset_info_desc') expand.set_value(WikiUtil().convert(description)) expand.set_max_length(300) td.add(expand) main_div = DivWdg(table) if self.get_option("publish") == "false": return main_div #self._add_publish_link(main_div) return main_div