Ejemplo n.º 1
0
	public function renderList($projects)
	{
		$p=LPC_Page::getCurrent();
		$p->clear();

		$p->st($this->label_select_project);
		$p->addJS($this->getListJS());
		$p->a("<ul>");
		$any_project=false;
		foreach($projects as $project) {
			$any_project=true;
			$p->a("<li><a href='#' onClick='setProject(".$project->id.")'>".$project->getAttrH($this->user_fields['name'])."</a></li>");
		}
		$p->a("</ul>");

		if (!$any_project) {
			$p->clear();
			$p->title=$this->label_no_projects;
			$p->st();
		}

		$form=new LPC_HTML_form($_SERVER['REQUEST_URI']);
		$form->setAttr('id','set_project');
		$form->a("<input type='hidden' id='set_project_field' name='".$this->project_POST_var."' value='0'>");
		$p->a($form);

		$p->show();
		exit();
	}
Ejemplo n.º 2
0
if (!$rs->EOF && $rs->fields[0]!=$msgKey)
	$links[]="[<a href='?m=".rawurlencode($rs->fields[0])."'>Find an untranslated message</a>]";
$p->a("<p class='container'>".implode(" &bull; ",$links)."</p>");
// Done links

$ref_trans=new LPC_I18n_message();
$ref_trans=$ref_trans->search(
	array('language','message_key'),
	array($_SESSION['LPC_reference_lang'],$msgKey)
);
if ($ref_trans)
	$ref_trans=$ref_trans[0];
else
	$ref_trans=new LPC_I18n_message();

$form=new LPC_HTML_form();
$form->a("<input type='hidden' name='m' value=\"".$msg->getAttrF('message_key')."\">");
$p->a($form);
$t=new LPC_HTML_table();
$t->addClass('two-column-60');
$form->a($t);

$t->a(new LPC_HTML_form_row(array(
	'label'=>'Message key',
	'input'=>$msg->getAttrH('message_key'),
)));
$t->a(new LPC_HTML_form_row(array(
	'label'=>'Message in reference language ('.$reference_lang->getAttrH('name').')',
	'input'=>"<div style='max-height: 300px; overflow: auto'><tt>".nl2br($ref_trans->getAttrH('translation'))."</tt></div>",
)));
$trans = new LPC_HTML_node('textarea');