19 include_once (
"FDL/Class.Dir.php");
33 if (
$docid ==
"")
$action->exitError(_(
"no document reference"));
37 if (!
$doc->isAffected())
$action->exitError(sprintf(_(
"cannot see unknow reference %s") ,
$docid));
38 if (
$doc->defDoctype !=
'D')
$action->exitError(sprintf(_(
"not a static folder %s") ,
$doc->title));
41 $action->parent->AddJsRef(
$action->GetParam(
"CORE_PUBURL") .
"/FDC/Layout/inserthtml.js");
42 $action->parent->AddJsRef(
$action->GetParam(
"CORE_STANDURL") .
"app=FDL&action=EDITJS");
43 $action->parent->AddJsRef(
$action->GetParam(
"CORE_PUBURL") .
"/FDL/Layout/editinsertdocument.js");
44 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/resizeimg.js");
46 $l =
$doc->getContent();
47 foreach ($l as $k => $v) {
48 $l[$k][
"icon"] =
$doc->getIcon($v[
"icon"]);
51 $action->lay->set(
"restrict",
false);
54 if (method_exists(
$doc,
"isAuthorized")) {
55 if (
$doc->isAuthorized($classid)) {
59 $tclassdoc =
$doc->getAuthorizedFamilies();
60 $action->lay->set(
"restrict",
true);
63 $tclassdoc =
$doc->getAuthorizedFamilies();
64 $first = current($tclassdoc);
66 $action->lay->set(
"restrict",
true);
71 $action->lay->SetBlockData(
"SELECTCLASS", $tclassdoc);
73 $action->lay->SetBlockData(
"SELECTCLASS", $tclassdoc);
74 $action->lay->set(
"famid",
false);
80 $action->lay->set(
"famtitle", sprintf(_(
"Search %s") ,
$fdoc->title));
86 $action->lay->set(
"TITLE", sprintf(_(
"Content managing of %s") ,
$doc->title));
88 $action->lay->set(
"hasstate", (
$doc->getState() !=
""));
90 $action->lay->set(
"statecolor",
$doc->getStateColor());
91 $action->lay->set(
"count", count($l));
93 $action->lay->setBlockData(
"CONTENT", $l);
94 $action->lay->set(
"nmembers", sprintf(_(
"%d documents") , count($l)));