File modules/util/Tree.class.php
Last commit: Thu Feb 16 01:04:38 2023 +0100 Jan Dankert New: Tags for base objects.
1 <?php 2 3 namespace util; 4 5 use cms\action\RequestParams; 6 use cms\base\Language as L; 7 use cms\model\Alias; 8 use cms\model\BaseObject; 9 use cms\model\Element; 10 use cms\model\Folder; 11 use cms\model\Group; 12 use cms\model\Link; 13 use cms\model\Page; 14 use cms\model\PageContent; 15 use cms\model\Permission; 16 use cms\model\Project; 17 use cms\model\Tag; 18 use cms\model\Template; 19 use cms\model\User; 20 use cms\model\Value; 21 use language\Messages; 22 use util\exception\SecurityException; 23 24 25 /** 26 * Navigation tree. 27 * 28 * @author Jan Dankert 29 */ 30 class Tree 31 { 32 public $treeElements = array(); 33 34 private $userIsAdmin = false; 35 36 /** 37 * Konstruktor. 38 */ 39 public function __construct() 40 { 41 // Feststellen, ob der angemeldete Benutzer ein Administrator ist 42 $user = Request::getUser(); 43 $this->userIsAdmin = is_object($user) && $user->isAdmin; 44 } 45 46 public function root() 47 { 48 $this->overview(); 49 } 50 51 52 public function overview() 53 { 54 $treeElement = new TreeElement(); 55 $treeElement->id = 0; 56 $treeElement->text = L::lang('PROJECTS'); 57 $treeElement->description = L::lang('PROJECTS'); 58 $treeElement->action = 'projectlist'; 59 $treeElement->icon = 'projectlist'; 60 $treeElement->type = 'projects'; 61 62 $this->addTreeElement($treeElement); 63 64 if ($this->userIsAdmin) { 65 66 $treeElement = new TreeElement(); 67 $treeElement->text = L::lang('USER_AND_GROUPS'); 68 $treeElement->description = L::lang('USER_AND_GROUPS'); 69 $treeElement->icon = 'userlist'; 70 $treeElement->type = 'userandgroups'; 71 $treeElement->action = 'usergroup'; 72 73 $this->addTreeElement($treeElement); 74 } 75 76 77 if ($this->userIsAdmin) { 78 $treeElement = new TreeElement(); 79 $treeElement->text = L::lang('PREFERENCES'); 80 $treeElement->description = L::lang('PREFERENCES'); 81 $treeElement->icon = 'configuration'; 82 //$treeElement->type = 'configuration'; 83 $treeElement->action = 'configuration'; 84 85 $this->addTreeElement($treeElement); 86 } 87 88 } 89 90 91 public function userandgroups() 92 { 93 if (!$this->userIsAdmin) 94 throw new SecurityException(); 95 96 $treeElement = new TreeElement(); 97 $treeElement->text = L::lang('USER'); 98 $treeElement->description = L::lang('USER'); 99 $treeElement->action = 'userlist'; 100 $treeElement->icon = 'userlist'; 101 $treeElement->type = 'users'; 102 103 $this->addTreeElement($treeElement); 104 105 $treeElement = new TreeElement(); 106 $treeElement->text = L::lang('GROUPS'); 107 $treeElement->description = L::lang('GROUPS'); 108 $treeElement->action = 'grouplist'; 109 $treeElement->icon = 'grouplist'; 110 $treeElement->type = 'groups'; 111 112 $this->addTreeElement($treeElement); 113 } 114 115 116 public function projects() 117 { 118 // Schleife ueber alle Projekte 119 foreach (Project::getAllProjects() as $id => $name) { 120 121 $project = new Project($id); 122 $rootFolder = new Folder($project->getRootObjectId()); 123 $rootFolder->load(); 124 125 // Berechtigt für das Projekt? 126 if ($rootFolder->hasRight(Permission::ACL_READ)) { 127 $treeElement = new TreeElement(); 128 129 $treeElement->internalId = $id; 130 $treeElement->id = $id; 131 $treeElement->text = $name; 132 $treeElement->icon = 'project'; 133 $treeElement->action = 'project'; 134 $treeElement->type = 'project'; 135 $treeElement->description = ''; 136 137 $this->addTreeElement($treeElement); 138 } 139 } 140 } 141 142 143 public function project($projectid) 144 { 145 $project = new Project($projectid); 146 147 // Hoechster Ordner der Projektstruktur 148 $folder = new Folder($project->getRootObjectId()); 149 $folder->load(); 150 151 $defaultLanguageId = $project->getDefaultLanguageId(); 152 $defaultModelId = $project->getDefaultModelId(); 153 154 // Ermitteln, ob der Benutzer Projektadministrator ist 155 // Projektadministratoren haben das Recht, im Root-Ordner die Eigenschaften zu aendern. 156 $userIsProjectAdmin = $folder->hasRight(Permission::ACL_PROP); 157 158 if ($folder->hasRight(Permission::ACL_READ)) { 159 $treeElement = new TreeElement(); 160 $treeElement->id = $folder->objectid; 161 // $treeElement->text = $folder->name; 162 $treeElement->text = L::lang('FOLDER_ROOT'); 163 $treeElement->description = L::lang('FOLDER_ROOT_DESC'); 164 $treeElement->extraId[RequestParams::PARAM_LANGUAGE_ID] = $defaultLanguageId; 165 $treeElement->extraId[RequestParams::PARAM_MODEL_ID] = $defaultModelId; 166 $treeElement->icon = 'folder'; 167 $treeElement->action = 'folder'; 168 // $treeElement->url = Html::url( 'folder','',$folder->objectid,array(RequestParams::PARAM_TARGET=>'content') ); 169 $treeElement->type = 'folder'; 170 $treeElement->internalId = $folder->objectid; 171 $this->addTreeElement($treeElement); 172 } 173 174 175 176 // Tags 177 $treeElement = new TreeElement(); 178 $treeElement->description = ''; 179 $treeElement->id = $projectid; 180 $treeElement->extraId[RequestParams::PARAM_PROJECT_ID] = $projectid; 181 $treeElement->internalId = $projectid; 182 $treeElement->action = 'taglist'; 183 $treeElement->text = L::lang('TAGLIST'); 184 $treeElement->icon = 'taglist'; 185 $treeElement->description = L::lang('TAGLIST_DESC'); 186 $treeElement->type = 'taglist'; 187 $this->addTreeElement($treeElement); 188 189 190 191 192 // Templates 193 if ($userIsProjectAdmin) { 194 $treeElement = new TreeElement(); 195 $treeElement->id = $projectid; 196 $treeElement->extraId[RequestParams::PARAM_PROJECT_ID] = $projectid; 197 $treeElement->extraId[RequestParams::PARAM_MODEL_ID] = $defaultModelId; 198 $treeElement->extraId[RequestParams::PARAM_LANGUAGE_ID] = $defaultLanguageId; 199 $treeElement->internalId = $projectid; 200 $treeElement->text = L::lang('TEMPLATES'); 201 // $treeElement->url = Html::url('template','listing',0,array(RequestParams::PARAM_TARGETSUBACTION=>'listing',RequestParams::PARAM_TARGET=>'content')); 202 $treeElement->description = L::lang('TEMPLATES_DESC'); 203 $treeElement->icon = 'templatelist'; 204 $treeElement->action = 'templatelist'; 205 $treeElement->type = 'templates'; 206 $this->addTreeElement($treeElement); 207 } 208 209 210 // Sprachen 211 if ($userIsProjectAdmin) { 212 $treeElement = new TreeElement(); 213 $treeElement->description = ''; 214 $treeElement->id = $projectid; 215 $treeElement->extraId[RequestParams::PARAM_PROJECT_ID] = $projectid; 216 $treeElement->internalId = $projectid; 217 $treeElement->action = 'languagelist'; 218 $treeElement->text = L::lang('LANGUAGES'); 219 // $treeElement->url = Html::url('language','listing',0,array(RequestParams::PARAM_TARGETSUBACTION=>'listing',RequestParams::PARAM_TARGET=>'content')); 220 $treeElement->icon = 'languagelist'; 221 $treeElement->description = L::lang('LANGUAGES_DESC'); 222 223 // Nur fuer Projekt-Administratoren aufklappbar 224 if ($userIsProjectAdmin) 225 $treeElement->type = 'languages'; 226 227 $this->addTreeElement($treeElement); 228 } 229 230 231 232 if ($userIsProjectAdmin) { 233 234 // Projektmodelle 235 $treeElement = new TreeElement(); 236 $treeElement->description = ''; 237 238 // Nur fuer Projekt-Administratoren aufklappbar 239 if ($userIsProjectAdmin) 240 $treeElement->type = 'models'; 241 242 $treeElement->id = $projectid; 243 $treeElement->internalId = $projectid; 244 $treeElement->extraId[RequestParams::PARAM_PROJECT_ID] = $projectid; 245 $treeElement->description = L::lang('MODELS_DESC'); 246 $treeElement->text = L::lang('MODELS'); 247 // $treeElement->url = Html::url('model','listing',0,array(RequestParams::PARAM_TARGETSUBACTION=>'listing',RequestParams::PARAM_TARGET=>'content')); 248 $treeElement->action = 'modellist'; 249 $treeElement->icon = 'modellist'; 250 $this->addTreeElement($treeElement); 251 } 252 253 } 254 255 256 public function taglist( $projectid ) 257 { 258 $project = new Project( $projectid ); 259 260 foreach ( $project->getTags() as $id=>$name ) { 261 $treeElement = new TreeElement(); 262 $treeElement->id = $id; 263 $treeElement->internalId = $id; 264 $treeElement->text = $name; 265 $treeElement->action = 'tag'; 266 $treeElement->icon = 'tag'; 267 $treeElement->type = 'tag'; 268 269 $treeElement->description = ''; 270 271 $this->addTreeElement($treeElement); 272 } 273 } 274 275 276 /** 277 * Tag. 278 * 279 * @param $tagid 280 */ 281 public function tag($tagid ) 282 { 283 $tag = new Tag( $tagid ); 284 285 foreach ($tag->getObjects() as $o ) { 286 287 // Wenn keine Leseberechtigung 288 if (!$o->hasRight(Permission::ACL_READ)) 289 continue; 290 291 $defaultName = $o->getDefaultName(); 292 293 $treeElement = new TreeElement(); 294 $treeElement->id = $o->objectid; 295 $treeElement->internalId = $o->objectid; 296 $treeElement->text = $defaultName->name; 297 $treeElement->description = L::lang('' . $o->getType()) . ' ' . $o->objectid; 298 299 if ( $defaultName->description ) 300 $treeElement->description .= ': ' . $defaultName->description; 301 else 302 $treeElement->description .= ' - ' . L::lang('NO_DESCRIPTION_AVAILABLE'); 303 304 $treeElement->action = $o->getType(); 305 $treeElement->icon = $o->getType(); 306 307 if ( in_array($o->getType(),['folder','link','page','alias'])) // openable? 308 $treeElement->type = $o->getType(); 309 310 $this->addTreeElement($treeElement); 311 } 312 } 313 314 315 316 public function users() 317 { 318 if (!$this->userIsAdmin) 319 throw new SecurityException(); 320 321 322 foreach (User::getAllUsers() as $user) { 323 $treeElement = new TreeElement(); 324 $treeElement->id = $user->userid; 325 $treeElement->internalId = $user->userid; 326 $treeElement->text = $user->name; 327 $treeElement->action = 'user'; 328 //$treeElement->type = 'user'; 329 $treeElement->icon = 'user'; 330 331 $desc = $user->fullname; 332 333 if ($user->isAdmin) 334 $desc .= ' (' . L::lang('USER_ADMIN') . ') '; 335 if ($user->desc == "") 336 $desc .= ' - ' . L::lang('NO_DESCRIPTION_AVAILABLE'); 337 else 338 $desc .= ' - ' . $user->desc; 339 340 $treeElement->description = $desc; 341 342 $this->addTreeElement($treeElement); 343 } 344 } 345 346 347 public function groups() 348 { 349 if (!$this->userIsAdmin) 350 throw new SecurityException(); 351 352 353 foreach (Group::getRootGroups() as $id => $name) { 354 $treeElement = new TreeElement(); 355 356 $g = new Group($id); 357 $g->load(); 358 359 $treeElement->id = $id; 360 $treeElement->internalId = $id; 361 $treeElement->text = $g->name; 362 $treeElement->icon = 'group'; 363 $treeElement->description = L::lang('GROUP') . ' ' . $g->name . ': ' . implode(', ', $g->getUsers()); 364 $treeElement->type = 'userofgroup'; 365 $treeElement->action = 'group'; 366 367 $this->addTreeElement($treeElement); 368 } 369 } 370 371 372 public function userofgroup($id) 373 { 374 if (!$this->userIsAdmin) 375 throw new SecurityException(); 376 377 378 $g = new Group($id); 379 380 381 foreach ($g->getChildrenIds() as $id) { 382 $treeElement = new TreeElement(); 383 384 $subGroup = new Group($id); 385 $subGroup->load(); 386 $treeElement->id = $id; 387 $treeElement->internalId = $id; 388 $treeElement->text = $subGroup->name; 389 $treeElement->icon = 'group'; 390 $treeElement->description = L::lang('GROUP') . ' ' . $subGroup->name . ': ' . implode(', ', $subGroup->getUsers()); 391 $treeElement->type = 'userofgroup'; 392 $treeElement->action = 'group'; 393 394 $this->addTreeElement($treeElement); 395 } 396 397 398 399 foreach ($g->getUsers() as $id => $name) { 400 $treeElement = new TreeElement(); 401 402 $u = new User($id); 403 $u->load(); 404 $treeElement->id = $u->userid; 405 $treeElement->internalId = $u->userid; 406 $treeElement->text = $u->name; 407 $treeElement->icon = 'user'; 408 $treeElement->action = 'user'; 409 $treeElement->description = $u->fullname; 410 411 $this->addTreeElement($treeElement); 412 } 413 414 415 } 416 417 418 public function page($id) 419 { 420 $page = new Page($id); 421 422 $page->load(); 423 424 $template = new Template($page->templateid); 425 426 foreach ($template->getElementIds() as $elementid) { 427 $element = new Element($elementid); 428 $element->load(); 429 430 if ($element->isWritable()) { 431 $treeElement = new TreeElement(); 432 $treeElement->id = $id . '_' . $elementid; 433 $treeElement->internalId = $id . '_' . $elementid; 434 $treeElement->text = $element->label; 435 $treeElement->action = 'pageelement'; 436 437 if ( in_array($element->typeid,[Element::ELEMENT_TYPE_LINK,Element::ELEMENT_TYPE_INSERT])) 438 $treeElement->type = 'pageelement'; 439 440 $treeElement->icon = 'el_' . $element->getTypeName(); 441 $treeElement->extraId = array('elementid' => $elementid); 442 443 444 $treeElement->description = L::lang('EL_' . $element->getTypeName()); 445 if ($element->desc != '') 446 $treeElement->description .= ' - ' . Text::maxLength($element->desc, 25); 447 else 448 $treeElement->description .= ' - ' . L::lang('NO_DESCRIPTION_AVAILABLE'); 449 450 $this->addTreeElement($treeElement); 451 } 452 } 453 } 454 455 456 /** 457 * Gets the linked object (if there is one). 458 * 459 * @param $id 460 * @return void 461 * @throws exception\ObjectNotFoundException 462 */ 463 public function pageelement($id) 464 { 465 $ids = explode('_', $id); 466 if (count($ids) > 1) { 467 list($pageid, $elementid) = $ids; 468 469 $page = new Page($pageid); 470 471 $page->load(); 472 473 $element = new Element($elementid); 474 $element->load(); 475 476 $pageContent = new PageContent(); 477 $pageContent->pageId = $page->pageid; 478 $pageContent->elementId = $elementid; 479 $project = $page->getProject(); 480 $pageContent->languageid = $project->getDefaultLanguageId(); 481 $pageContent->load(); 482 483 $value = new Value(); 484 $value->contentid = $pageContent->contentId; 485 $value->load(); 486 487 if (BaseObject::available($value->linkToObjectId)) { 488 $o = new BaseObject($value->linkToObjectId); 489 $o->load(); 490 if ( $o->hasRight( Permission::ACL_READ ) ) { 491 492 $treeElement = new TreeElement(); 493 $treeElement->type = $o->getType(); 494 $treeElement->action = $o->getType(); 495 $treeElement->icon = $o->getType(); 496 $treeElement->id = $o->objectid; 497 $treeElement->internalId = $o->objectid; 498 $treeElement->extraId = array(); 499 $treeElement->text = $o->getName(); 500 $treeElement->description = L::lang('' . $o->getType()) . ' ' . $o->objectid; 501 502 $this->addTreeElement($treeElement); 503 } 504 } 505 } 506 } 507 508 509 public function value($id) 510 { 511 if ($id != 0) { 512 $value = new Value(); 513 $value->loadWithId($id); 514 515 $objectid = intval($value->linkToObjectId); 516 if ($objectid != 0) { 517 $object = new BaseObject($objectid); 518 $object->load(); 519 520 $treeElement = new TreeElement(); 521 $treeElement->id = $id; 522 $treeElement->internalId = $id; 523 $treeElement->text = $object->getDefaultName()->name; 524 if (in_array($object->getType(), array('page', 'folder'))) { 525 $treeElement->type = $object->getType(); 526 $treeElement->internalId = $object->objectid; 527 } 528 $treeElement->action = $object->getType(); 529 $treeElement->icon = $object->getType(); 530 $treeElement->extraId = array(RequestParams::PARAM_LANGUAGE_ID => $object->getProject()->getDefaultLanguageId()); 531 532 $defaultName = $object->getDefaultName(); 533 534 if ($defaultName->description ) 535 $treeElement->description .= ' - ' . $defaultName->description; 536 else 537 $treeElement->description .= ' - ' . L::lang('NO_DESCRIPTION_AVAILABLE'); 538 539 $this->addTreeElement($treeElement); 540 } 541 } 542 } 543 544 545 public function link($id) 546 { 547 $link = new Link($id); 548 $link->load(); 549 550 $o = new BaseObject($link->linkedObjectId); 551 $o->load(); 552 553 if ( $o->hasRight( Permission::ACL_READ ) ) { 554 // Object is readable 555 556 $treeElement = new TreeElement(); 557 $treeElement->id = $o->objectid; 558 $treeElement->internalId = $o->objectid; 559 $treeElement->text = $o->getName(); 560 $treeElement->description = L::lang('' . $o->getType()) . ' ' . $id; 561 562 $defaultName = $o->getDefaultName(); 563 564 if ($defaultName->description ) 565 $treeElement->description .= ': ' . $defaultName->description; 566 else 567 $treeElement->description .= ' - ' . L::lang('NO_DESCRIPTION_AVAILABLE'); 568 569 $treeElement->action = $o->getType(); 570 $treeElement->icon = $o->getType(); 571 $treeElement->extraId = array(RequestParams::PARAM_LANGUAGE_ID => $_REQUEST[RequestParams::PARAM_LANGUAGE_ID], RequestParams::PARAM_MODEL_ID => $_REQUEST[RequestParams::PARAM_MODEL_ID]); 572 573 // Besonderheiten fuer bestimmte Objekttypen 574 575 if ($o->isPage) { 576 // Nur wenn die Seite beschreibbar ist, werden die 577 // Elemente im Baum angezeigt 578 if ($o->hasRight(Permission::ACL_WRITE)) 579 $treeElement->type = 'pageelements'; 580 } 581 $this->addTreeElement($treeElement); 582 } 583 584 } 585 586 587 public function alias($id) 588 { 589 $alias = new Alias($id); 590 $alias->load(); 591 592 $o = new BaseObject($alias->linkedObjectId); 593 $o->load(); 594 595 $treeElement = new TreeElement(); 596 $treeElement->id = $o->objectid; 597 $treeElement->internalId = $o->objectid; 598 $treeElement->text = $o->getName(); 599 $treeElement->description = L::lang('' . $o->getType()) . ' ' . $id; 600 601 $treeElement->action = $o->getType(); 602 $treeElement->icon = $o->getType(); 603 604 // Besonderheiten fuer bestimmte Objekttypen 605 if ($o->isPage) { 606 // Nur wenn die Seite beschreibbar ist, werden die 607 // Elemente im Baum angezeigt 608 if ($o->hasRight(Permission::ACL_WRITE)) 609 $treeElement->type = 'page'; 610 } 611 612 $this->addTreeElement($treeElement); 613 } 614 615 616 public function url($id) 617 { 618 // URLs have no sub-nodes. 619 // do nothing. 620 } 621 622 623 /** 624 * Laedt Elemente zu einem Ordner 625 */ 626 public function folder($id) 627 { 628 $f = new Folder($id); 629 $f->load(); 630 631 /** @var BaseObject $o */ 632 foreach ($f->getObjects() as $o) { 633 // Wenn keine Leseberechtigung 634 if (!$o->hasRight(Permission::ACL_READ)) 635 continue; 636 637 $treeElement = new TreeElement(); 638 $treeElement->id = $o->objectid; 639 $treeElement->internalId = $o->objectid; 640 $treeElement->text = $o->getDefaultName()->name; 641 $treeElement->description = L::lang('' . $o->getType()) . ' ' . $o->objectid; 642 643 $defaultName = $o->getDefaultName(); 644 645 if ( $defaultName->description ) 646 $treeElement->description .= ': ' . $defaultName->description; 647 else 648 $treeElement->description .= ' - ' . L::lang('NO_DESCRIPTION_AVAILABLE'); 649 650 $treeElement->action = $o->getType(); 651 $treeElement->icon = $o->getType(); 652 653 if ( in_array($o->getType(),['folder','link','page','alias'])) // openable? 654 $treeElement->type = $o->getType(); 655 656 $this->addTreeElement($treeElement); 657 } 658 } 659 660 661 public function templates($projectid) 662 { 663 $project = new Project($projectid); 664 665 foreach ($project->getTemplates() as $id => $name) { 666 $treeElement = new TreeElement(); 667 668 $t = new Template($id); 669 $t->load(); 670 $treeElement->text = $t->name; 671 $treeElement->id = $id; 672 $treeElement->icon = 'template'; 673 $treeElement->action = 'template'; 674 $treeElement->internalId = $id; 675 $treeElement->extraId = array(); 676 $treeElement->type = 'template'; 677 $treeElement->description = $t->name . ' (' . L::lang(Messages::TEMPLATE) . ' ' . $id . ')'; 678 $this->addTreeElement($treeElement); 679 } 680 } 681 682 683 public function template($id) 684 { 685 686 $t = new Template($id); 687 $t->load(); 688 689 // Anzeigen der Template-Elemente 690 // 691 foreach ($t->getElementIds() as $elementid) { 692 $e = new Element($elementid); 693 $e->load(); 694 695 // "Code"-Element nur fuer Administratoren 696 if ($e->type == 'code' && !$this->userIsAdmin) 697 continue; 698 699 $treeElement = new TreeElement(); 700 $treeElement->id = $elementid; 701 $treeElement->internalId = $elementid; 702 $treeElement->extraId = array(); 703 $treeElement->text = $e->label; 704 $treeElement->icon = 'el_' . $e->type; 705 $treeElement->action = 'element'; 706 707 if ($e->desc == '') 708 $desc = L::lang('NO_DESCRIPTION_AVAILABLE'); 709 else 710 $desc = $e->desc; 711 $treeElement->description = $e->name . ' (' . L::lang('EL_' . $e->type) . '): ' . Text::maxLength($desc, 40); 712 $this->addTreeElement($treeElement); 713 } 714 } 715 716 717 /** 718 * Sprachen 719 */ 720 public function languages($projectid) 721 { 722 // Sprachvarianten 723 // 724 $project = new Project($projectid); 725 726 foreach ($project->getLanguages() as $languageid => $name) { 727 $treeElement = new TreeElement(); 728 $treeElement->id = $languageid; 729 $treeElement->internalId = $languageid; 730 $treeElement->text = $name; 731 $treeElement->icon = 'language'; 732 $treeElement->action = 'language'; 733 $treeElement->description = ''; 734 $this->addTreeElement($treeElement); 735 } 736 } 737 738 739 // Projektvarianten 740 // 741 public function models($projectid) 742 { 743 744 $project = new Project($projectid); 745 746 foreach ($project->getModels() as $id => $name) { 747 $treeElement = new TreeElement(); 748 $treeElement->id = $id; 749 $treeElement->internalId = $id; 750 $treeElement->text = $name; 751 $treeElement->action = 'model'; 752 $treeElement->icon = 'model'; 753 $treeElement->description = ''; 754 $this->addTreeElement($treeElement); 755 } 756 } 757 758 759 /** 760 * Hinzufuegen eines Baum-Elementes 761 * @param TreeElement Hinzuzufuegendes Baumelement 762 */ 763 private function addTreeElement($treeElement) 764 { 765 $this->treeElements[] = $treeElement; 766 } 767 }
Downloadmodules/util/Tree.class.php
History Thu, 16 Feb 2023 01:04:38 +0100 Jan Dankert New: Tags for base objects. Mon, 13 Jun 2022 22:13:03 +0200 Jan Dankert Fix: Show icon for pageelement values Mon, 25 Apr 2022 23:12:32 +0200 Jan Dankert Fix: Only show objects which are readable. Fri, 15 Apr 2022 14:51:22 +0200 dankert Refactoring: User,Config and Database info is now stored in the Request, because so there is no session required for clients which are using Basic Authorization. Sun, 5 Dec 2021 20:33:24 +0100 dankert Cleanup: Removed unusable properties from class 'Value' and 'BaseObject'. Sun, 5 Dec 2021 15:33:29 +0100 dankert Cleanup: Removed unusable properties from class 'Value'. Thu, 4 Mar 2021 01:15:06 +0100 Jan Dankert Fix: Calculate correct parent groups of group. Mon, 4 Jan 2021 23:14:09 +0100 Jan Dankert New: Groups may contain subgroups. Users within a group inherit the permissions of all parent groups. Mon, 4 Jan 2021 19:03:18 +0100 Jan Dankert Refactoring: ACL class is renamed to Permission, because most RBAC/DMAC concepts are calling it a permission. Sun, 15 Nov 2020 22:27:21 +0100 Jan Dankert Fix: Navigaton nodes which are not able to open should NOT have an icon to open the node. Sun, 15 Nov 2020 00:26:57 +0100 Jan Dankert New: Aliases are now openable in the navigation tree. Mon, 9 Nov 2020 22:28:28 +0100 Jan Dankert Change: Group icon for group list. Tue, 29 Sep 2020 22:17:11 +0200 Jan Dankert Refactoring: Do not use global constants. Sun, 27 Sep 2020 04:09:05 +0200 Jan Dankert Refactoring: The tree functions should use normal templates as the other actions. Beware of the JS hell. Sat, 26 Sep 2020 04:03:53 +0200 Jan Dankert Refactoring: read language keys with a class. Wed, 23 Sep 2020 01:04:05 +0200 Jan Dankert Cleanup of deprecated methods and deprecated class attributes. Mon, 21 Sep 2020 23:44:23 +0200 Jan Dankert Fixing editing of values. Fri, 18 Sep 2020 23:04:13 +0200 Jan Dankert Refactoring: Renaming module "cms/publish" to "cms/generator" Mon, 17 Aug 2020 22:52:37 +0200 Jan Dankert Cleanup: Killing the old odd 'GLOBAL_' message prefixes. Mon, 13 Apr 2020 22:33:04 +0200 Jan Dankert New: An action for navigating to the user and group administration. Sat, 22 Feb 2020 23:58:02 +0100 Jan Dankert Refactoring: Namespacing for module 'util'. Wed, 13 Nov 2019 00:15:07 +0100 Jan Dankert Fix: Use element labels in the tree. Thu, 29 Aug 2019 23:58:41 +0200 Jan Dankert Refactoring: Auth-Module in der Konfiguration als Liste. Sat, 24 Aug 2019 01:30:30 +0200 Jan Dankert Nach der Abmeldung alle View neu laden. Thu, 6 Jun 2019 21:42:30 +0200 Jan Dankert Fix: Anzeige/Öffnen von Aliases in der Navigation. Thu, 30 May 2019 00:10:13 +0200 Jan Dankert New: Aliases integriert, jedoch noch nicht sprachspezifisch (folgt noch). Tue, 28 May 2019 22:03:17 +0200 Jan Dankert Refactoring: Acl-Konstanten als Klassenkonstanten. Sat, 18 May 2019 21:37:53 +0200 Jan Dankert Refactoring: Text::maxLength statt Text::maxLaenge Tue, 30 Apr 2019 22:49:48 +0200 Jan Dankert Aktuelles Objekt im Navigationsbaum markieren. Mon, 14 Jan 2019 21:28:55 +0100 Jan Dankert Fixes für Nicht-Administratoren. Sat, 22 Dec 2018 23:20:44 +0100 Jan Dankert Fix: Keine Fehlermeldung, wenn URLs in der Navigation aufgeklappt werden. Sat, 8 Dec 2018 01:16:11 +0100 Jan Dankert Aufklappen von Seitenelementen funktioniert jetzt endlich wieder. Man, ey. Sat, 8 Dec 2018 00:50:08 +0100 Jan Dankert Fix: Baumobjekte korrigiert. Sun, 2 Dec 2018 02:12:44 +0100 Jan Dankert Fix: Den Publisher korrekt setzen. Sat, 3 Nov 2018 00:39:32 +0100 Jan Dankert Input-Felder können jetzt ein Label enthalten, das ganze Template-Markup wird dadurch deutlich einfacher. Formularfelder per Flexbox layouten, das geht viel einfacher. Tue, 25 Sep 2018 21:27:24 +0200 Jan Dankert Beim Aufklappen von Seiten im Navigationsbaum lassen sich die Inhalte nun auch öffnen. Mon, 24 Sep 2018 22:51:08 +0200 Jan Dankert Liste von Varianten und Sprachen im Navigationsbaum korrigiert. Hier wird die InternalId benötigt. Ggf. kann das mit der Id zusammengelegt werden. Sun, 23 Sep 2018 22:26:00 +0200 Jan Dankert Die IndexAction soll beim Start des UI auch die Action und Id ermitteln. Damit die Id gesetzt werden kann, muss die Id über den Dispatcher in die Action gebracht werden. Dazu muss erst der Request gesetzt werden, bevor die weitere Verarbeitung geschieht, daher geschieht die fachliche Initialisierung der Actions jetzt (wieder) über eine init()-Methode, die vom Dispatcher aufgerufen wird. Wed, 19 Sep 2018 23:56:56 +0200 Jan Dankert Der Navigationsbaum soll initial durch den 1. HTTP-Request schon bereit gestellt werden. Per Javascript erfolgt nur noch das Auf- und Zublättern. Sat, 21 Jul 2018 01:11:17 +0200 Jan Dankert Projekte nur anzeigen, wenn dafür berechtigt. Sat, 21 Jul 2018 01:03:47 +0200 Jan Dankert Huuups, da hatte ich etwas viel gelöscht. Die Einstellungen sind jetzt wieder da. Und nur für Administratoren sichtbar. Sat, 21 Jul 2018 00:58:31 +0200 Jan Dankert Es gibt nur noch 1 Baum, daher die Klasse umbenannt.