For generating List view HTML file for RADIO.
    for each item.
485130
def gen_radio_list(sig_dic):
    '''
    
    '''
    view_zuoxiang = '''<span class="iga_pd_val">'''

    dic_tmp = sig_dic['dic']
    for key in dic_tmp.keys():
        tmp_str = '''{{% if postinfo.extinfo['{0}'][0] == "{1}" %}} {2} {{% end %}}
        '''.format(sig_dic['en'], key, dic_tmp[key])
        view_zuoxiang += tmp_str

    view_zuoxiang += '''</span>'''
    return view_zuoxiang
947971
public function generateViews()
    {
        $viewPath = $viewExtension = '';
        $viewDir = $this->command->applicationDir.DS.'Views'.DS.$this->controller;
        $this->hasDirectory($viewDir);

        $viewExtension = ($this->layoutType == 'php') ? self::EXTENSION : self::TWIG_EXTENSION;
        $viewType = ($this->layoutType == 'php') ? 'Php'.DS : '';

        foreach ($this->views as $key => $view) {
            $viewPath = $this->viewTemplatePath.'controller'.DS.$viewType.$view.self::TEMP_EXTENSION;
            $this->readContents($viewPath, $view);
            $this->generate($view.$viewExtension);
        }
    }
998465
def create_html(self):
        """"""

        html_table = ""
        columns = [panel.get_html_column() for panel in self.panels]
        trs = len(columns[0])
        html_table += os.linesep.join(
            [
                "<tr>{}</tr>".format("".join(["<td>{}</td>".format(columns[col][row]) for col in range(len(columns))]))
                for row in range(trs)
            ]
        )

        with open(self._html_fn, "w+") as f:
            css_src = textwrap.dedent(
                """\
					.main_table                       {border-collapse:collapse;margin-top:15px;}
					td                                {border: solid #aaaaff 1px;padding:4px;vertical-alignment:top;}
					colgroup, thead                   {border: solid black 2px;padding 2px;}
					.configuration                    {font-size:85%;}
					.configuration, .configuration *  {margin:0;padding:0;}
					.formats                          {text-align:center;margin:20px 0px;}
					img                               {min-width:640px}
			"""
            )

            html_src = """<!DOCTYPE html>
			<html>
			<head>
				<meta charset="UTF-8" />
				<title>{title}</title>
				<style type="text/css">
				{css}
				</style>
			</head>
			<body>
				<h1>{title}</h1>
				<strong>{description}</strong>

				<table class="main_table">
				{html_table}
				</table>

			</body>
			""".format(
                html_table=html_table,
                css=css_src,
                title=self.title,
                description=self.description,
            )

            tidy_html_src = bs4.BeautifulSoup(html_src).prettify()
            f.write(tidy_html_src)
653832
@Override
    public void renderItem(Listitem item, Document doc) {
        log.trace("item render");
        item.setSelectable(true);
        item.addForward(Events.ON_DOUBLE_CLICK, item.getListbox(), Events.ON_DOUBLE_CLICK);
        addCell(item, "");
        addCell(item, doc.getDateTime());
        addCell(item, doc.getTitle());
        addCell(item, doc.getLocationName());
        addCell(item, doc.getAuthorName());
    }
810868
def __write_list_tmpl(html_tpl):
    '''
    
    '''
    out_dir = os.path.join(os.getcwd(), CRUD_PATH, 'infolist')
    if os.path.exists(out_dir):
        pass
    else:
        os.mkdir(out_dir)
    # for var_name in VAR_NAMES:
    for var_name, bl_val in SWITCH_DICS.items():
        if var_name.startswith('dic_'):
            outfile = os.path.join(out_dir, 'infolist' + '_' + var_name.split('_')[1] + '.html')
            html_view_str_arr = []
            # tview_var = eval('dic_vars.' + var_name)
            subdir = ''
            for the_val2 in bl_val:
                # sig = eval('html_vars.html_' + x)

                sig = HTML_DICS['html_' + the_val2]
                if sig['type'] == 'select':
                    html_view_str_arr.append(func_gen_html.gen_select_list(sig))
                elif sig['type'] == 'radio':
                    html_view_str_arr.append(func_gen_html.gen_radio_list(sig))
                elif sig['type'] == 'checkbox':
                    html_view_str_arr.append(func_gen_html.gen_checkbox_list(sig))

            with open(outfile, 'w') as outfileo:
                outstr = minify(
                    html_tpl.replace(
                        'xxxxxx',
                        ''.join(html_view_str_arr)
                    ).replace(
                        'yyyyyy',
                        var_name.split('_')[1][:2]
                    ).replace(
                        'ssssss',
                        subdir
                    ).replace(
                        'kkkk',
                        KIND_DICS['kind_' + var_name.split('_')[-1]]
                    )
                )
                outfileo.write(outstr)
891777
def gen_html(row_list):
        
        table = "<table>"
        for row in row_list:
            table += "<tr>"
            cells = row["cells"]
            for c in cells:
                t = c['cell'] if c else ''
                table += t
            table += "</tr>"
        table += "</table>"
        return table
385955
def _generate_html(data, out):
    '''
    
    '''
    print('<html>', file=out)
    print('<body>', file=out)
    _generate_html_table(data, out, 0)
    print('</body>', file=out)
    print('</html>', file=out)
50083
def render_html(self):
        """"""
        return self._template.safe_substitute(
            report_type=self._report_type,
            results=self.render_json()
        )
711544
function( option, list )
		{
			var label = doc.createElement( 'label' );
			label.setAttribute( 'for', 'cke_option' + option );
			label.setHtml( list[ option ] );

			if ( dialog.sLang == option )	// Current.
				dialog.chosed_lang = option;

			var div = doc.createElement( 'div' );
			var radio = CKEDITOR.dom.element.createFromHtml( '<input id="cke_option' +
					option + '" type="radio" ' +
					( dialog.sLang == option ? 'checked="checked"' : '' ) +
					' value="' + option + '" name="scayt_lang" />' );

			radio.on( 'click', function()
				{
					this.$.checked = true;
					dialog.chosed_lang = option;
				});

			div.append( radio );
			div.append( label );

			return {
				lang : list[ option ],
				code : option,
				radio : div
			};
		}
858745
public void createWebElementAndAddInList(String webData, WebView webView){

		WebElement webElement = createWebElementAndSetLocation(webData, webView);

		if((webElement!=null)) 
			webElements.add(webElement);
	}
647876
function() {
		
			var html = $('<ul class="'+this.classes.flip+' '+(this.factory.running ? this.factory.classes.play : '')+'" />');
			
			for(var x = 0; x < 10; x++) {
				var item = $([
				'<li data-digit="'+x+'">',
					'<a href="#">',
						'<div class="up">',
							'<div class="shadow"></div>',
							'<div class="inn">'+x+'</div>',
						'</div>',
						'<div class="down">',
							'<div class="shadow"></div>',
							'<div class="inn">'+x+'</div>',
						'</div>',
					'</a>',
				'</li>'].join(''));
				
				this.items.push(item);
				
				html.append(item);
			}
						
			return html;
		}
1025424
public function formatList(): string
    {
        $html = '<a href="' . e($this->url()) . '" class="list_item">';
        $html .= '<b>' . $this->fullName() . '</b>';
        $html .= $this->formatListDetails();
        $html .= '</a>';

        return $html;
    }
195342
public String htmlItem(CmsListItem item, boolean odd, boolean isPrintable) {

        StringBuffer html = new StringBuffer(1024);
        html.append("<tr ");
        if (!isPrintable) {
            html.append("class='");
            html.append(odd ? "oddrowbg" : (getWp().useNewStyle() ? "evenrowbg" : "evenrowbgnew"));
            html.append("'");
        }
        html.append(">\n");
        Iterator<CmsListColumnDefinition> itCols = m_columns.elementList().iterator();
        int width = 0;
        while (itCols.hasNext()) {
            CmsListColumnDefinition col = itCols.next();
            if (!col.isVisible() && !isPrintable) {
                continue;
            }
            if (!col.isPrintable() && isPrintable) {
                continue;
            }
            width++;
            StringBuffer style = new StringBuffer(64);
            html.append("<td");
            CmsListColumnAlignEnum align = col.getAlign();
            if ((align != CmsListColumnAlignEnum.ALIGN_LEFT) && CmsStringUtil.isNotEmpty(align.toString())) {
                style.append("text-align: ");
                style.append(col.getAlign());
                style.append("; ");
            }
            if (col.isTextWrapping()) {
                style.append("white-space: normal;");
            }
            if (isPrintable) {
                style.append("border-top: 1px solid black;");
            }
            if (style.length() > 0) {
                html.append(" style='");
                html.append(style);
                html.append("'");
            }
            html.append(">\n");
            html.append(col.htmlCell(item, isPrintable));
            html.append("</td>\n");
        }
        if (!isPrintable && hasCheckMultiActions()) {
            width++;
            html.append("\t<td class='select' style='text-align: center'>\n");
            html.append("\t\t<input type='checkbox' class='checkbox' name='listMultiAction' value='");
            html.append(item.getId());
            html.append("'>\n");
            html.append("\t</td>\n");
        }
        html.append("</tr>\n");

        Iterator<CmsListItemDetails> itDet = m_itemDetails.elementList().iterator();
        while (itDet.hasNext()) {
            CmsListItemDetails lid = itDet.next();
            if (!lid.isVisible() && !isPrintable) {
                continue;
            }
            if (!lid.isPrintable() && isPrintable) {
                continue;
            }
            if ((item.get(lid.getId()) != null)
                && CmsStringUtil.isNotEmptyOrWhitespaceOnly(item.get(lid.getId()).toString())) {
                int padCols = 0;
                itCols = m_columns.elementList().iterator();
                while (itCols.hasNext()) {
                    CmsListColumnDefinition col = itCols.next();
                    if (col.getId().equals(lid.getAtColumn())) {
                        break;
                    }
                    if (!col.isVisible() && !isPrintable) {
                        continue;
                    }
                    if (!col.isPrintable() && isPrintable) {
                        continue;
                    }
                    padCols++;
                }
                int spanCols = width - padCols;

                html.append("<tr ");
                if (!isPrintable) {
                    html.append("class='");
                    html.append(odd ? "oddrowbg" : (getWp().useNewStyle() ? "evenrowbg" : "evenrowbgnew"));
                    html.append("'");
                }
                html.append(">\n");
                if (padCols > 0) {
                    html.append("<td colspan='");
                    html.append(padCols);
                    html.append("'>&nbsp;</td>\n");
                }
                html.append("<td colspan='");
                html.append(spanCols);
                html.append("' style='padding-left: 20px; white-space:normal;'>\n");
                html.append(lid.htmlCell(item, isPrintable));
                html.append("\n</td>\n");
                html.append("\n");
                html.append("</tr>\n");
            }
        }
        return html.toString();
    }
23098
def display_listitems(items, url):
    '''
    '''
    if (len(items) == 2 and items[0].get_label() == '..'
        and items[1].get_played()):
        display_video(items)
    else:
        label_width = get_max_len(item.get_label() for item in items)
        num_width = len(str(len(items)))
        output = []
        for i, item in enumerate(items):
            output.append('[%s] %s (%s)' % (
                str(i).rjust(num_width),
                item.get_label().ljust(label_width),
                item.get_path()))

        line_width = get_max_len(output)
        output.append('-' * line_width)

        header = [
            '',
            '=' * line_width,
            'Current URL: %s' % url,
            '-' * line_width,
            '%s %s Path' % ('#'.center(num_width + 2),
                            'Label'.ljust(label_width)),
            '-' * line_width,
        ]
        print '\n'.join(header + output)
1317167
def _html(title: str, field_names: List[str]) -> str:
    
    inputs = ''.join(_SINGLE_INPUT_TEMPLATE.substitute(field_name=field_name)
                     for field_name in field_names)

    quoted_field_names = [f"'{field_name}'" for field_name in field_names]
    quoted_field_list = f"[{','.join(quoted_field_names)}]"

    return _PAGE_TEMPLATE.substitute(title=title,
                                     css=_CSS,
                                     inputs=inputs,
                                     qfl=quoted_field_list)
622918
def list2html(text):
    '''
    
    '''
    match = r'- (.+)\n'
    replace = r'<li>\1</li>\n'
    text = re.sub(match, replace, text)
    # Set start of list
    text = text.replace('<li>', '</p><ul><li>', 1)
    # Set end of list
    tmp = text.rsplit('</li>', 1)
    return '</li></ul><p>'.join(tmp)
193051
def to_html(self):
        
        if self.items is None:
            return
        else:
            html = '<ol%s>\n' % self.html_attributes()
            for item in self.items:
                html += '<li>%s</li>\n' % item.to_html()
            html += '</ol>'
            return html