16 if (
$doc->isAlive()) {
17 $all_lang_keys =
$doc->rawValueToArray(
$doc->getFamilyParameterValue(
'help_p_lang_key'));
18 $all_lang_texts =
$doc->rawValueToArray(
$doc->getFamilyParameterValue(
'help_p_lang_name'));
20 foreach ($all_lang_keys as $i => $key) {
21 $langs[] = $key .
'|' . $all_lang_texts[$i];
23 return implode(
',', $langs);
25 return 'fr_FR|' . _(
'french');
31 include_once (
'FDL/editutil.php');
34 $imageFamily =
new_Doc(
"",
"IMAGE");
39 $action->lay->eset(
'DOCID',
$docid);
40 $action->lay->eset(
'DOCTITLE',
$doc->getTitle());
42 $helps =
$doc->getHelpByLang();
43 $langs =
$doc->getFamilyLangs();
45 $action->lay->set(
'JSONLANGS', json_encode($langs));
47 $section_key = GetHttpVars(
'edit_section_key',
'');
48 $action->lay->eset(
'SECTIONKEY', $section_key);
51 foreach ($langs as $lang_key => $lang_name) {
53 'LANGKEY' => $lang_key,
54 'LANGISO' => strtolower(substr($lang_key, -2)) ,
55 'LANGNAME' => $lang_name,
59 $action->lay->SetBlockData(
'LEGENDCSSLANGS', $langitems);
60 $action->lay->SetBlockData(
'LEGENDLANGS', $langitems);
61 $action->lay->SetBlockData(
'MENULANGS', $langitems);
63 $action->lay->set(
"CanUploadImage", $imageFamily->hasPermission(
"create"));
71 if ($oa && $oa->fieldSet && $oa->fieldSet->id != \Adoc::HIDDENFIELD) {
84 $pattern_name = preg_quote($name,
"/");
86 $tinter = array_merge(
$doc->getFieldAttributes() ,
$doc->GetNormalAttributes());
90 foreach ($tinter as $k => $v) {
91 if ($v->id === \Adoc::HIDDENFIELD) {
94 if (($name ==
"") || (preg_match(
"/$pattern_name/i", $v->getLabel() , $reg))) {
98 $dv = sprintf(
'<b><i>%s</i></b><br/><span> %s (%s)</span>', htmlspecialchars(
$parent) , htmlspecialchars($v->getLabel()) , htmlspecialchars($v->type));
100 $dv = sprintf(
'<b><i>%s</i></b> (%s)', htmlspecialchars($v->getLabel()) , htmlspecialchars($v->type));
107 $v->getOption(
'sortable')
118 include_once (
'FDL/editutil.php');
124 $action->lay->eset(
'DOCID',
$docid);
125 $action->lay->eset(
'DOCTITLE',
$doc->getTitle());
127 $helps =
$doc->getHelpByLang();
128 $langs =
$doc->getFamilyLangs();
130 $action->lay->eset(
'JSONLANGS', json_encode($langs));
131 $helplangs = array();
134 foreach ($langs as $lang_key => $lang_name) {
136 $item[
'LANGKEY'] = $lang_key;
137 $item[
'LANGISO'] = strtolower(substr($lang_key, -2));
138 $item[
'LANGNAME'] = $lang_name;
139 $item[
'LANGDISPLAY'] =
'none';
140 $oa1 =
$doc->getAttribute(
'help_name');
141 $oa2 =
$doc->getAttribute(
'help_description');
142 if (array_key_exists($lang_key, $helps)) {
144 $item[
'LANGDISPLAY'] =
'block';
147 $item[
'INPUTLANGNAME'] =
getHtmlInput(
$doc, $oa1, $helps[$lang_key][
'help_name'], $index,
'',
true);
148 $item[
'INPUTLANGDESCRIPTION'] =
getHtmlInput(
$doc, $oa2, $helps[$lang_key][
'help_description'], $index,
'',
true);
151 $item[
'INPUTLANGDESCRIPTION'] =
getHtmlInput(
$doc, $oa2,
'', $index,
'',
true);
154 $helplangs[] = $item;
156 if (!empty($helplangs) && !$displayed) {
157 $helplangs[0][
'LANGDISPLAY'] =
'block';
159 $action->lay->SetBlockData(
'HELPLANGS1', $helplangs);
160 $action->lay->SetBlockData(
'HELPLANGS2', $helplangs);
helppage_getParentLabel($oa)
getHtmlInput(&$doc, &$oattr, $value, $index="", $jsevent="", $notd=false)
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
helppage_getHelpAttr($famid, $name="")
new_Doc($dbaccess, $id= '', $latest=false)
editmode(Action &$action)