| @@ 71-77 (lines=7) @@ | ||
| 68 | $cmsComponent->subTemplate = 'valuelists/form'; |
|
| 69 | $folder = $cmsComponent->storage->getValuelists()->getValuelistBySlug($request::$get[CmsConstants::GET_PARAMETER_SLUG]); |
|
| 70 | ||
| 71 | if (isset($request::$post[CmsConstants::POST_PARAMETER_TITLE], $request::$get[CmsConstants::GET_PARAMETER_SLUG])) { |
|
| 72 | $cmsComponent->storage->getValuelists()->saveValuelist($request::$get[CmsConstants::GET_PARAMETER_SLUG], $request::$post); |
|
| 73 | $docLink = $request::$subfolders . $cmsComponent->getParameter(CmsConstants::PARAMETER_CMS_PREFIX) . '/valuelists/edit?slug=' . $request::$get[CmsConstants::GET_PARAMETER_SLUG]; |
|
| 74 | $cmsComponent->storage->getActivityLog()->add('edited valuelist <a href="' . $docLink . '">' . $request::$post[CmsConstants::POST_PARAMETER_TITLE] . '</a>', 'pencil'); |
|
| 75 | header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsConstants::PARAMETER_CMS_PREFIX) . '/valuelists'); |
|
| 76 | exit; |
|
| 77 | } |
|
| 78 | ||
| 79 | $cmsComponent->setParameter(CmsConstants::PARAMETER_MAIN_NAV_CLASS, CmsConstants::PARAMETER_VALUELISTS); |
|
| 80 | $cmsComponent->setParameter(CmsConstants::PARAMETER_VALUELIST, $folder); |
|
| @@ 70-76 (lines=7) @@ | ||
| 67 | $cmsComponent->setParameter(CmsConstants::PARAMETER_MAIN_NAV_CLASS, CmsConstants::PARAMETER_DOCUMENTS); |
|
| 68 | $cmsComponent->setParameter(CmsConstants::PARAMETER_SMALLEST_IMAGE, $cmsComponent->storage->getImageSet()->getSmallestImageSet()->slug); |
|
| 69 | if (isset($request::$get[CmsConstants::PARAMETER_DOCUMENT_TYPE])) { |
|
| 70 | if (isset($request::$post[CmsConstants::POST_PARAMETER_TITLE], $request::$get[CmsConstants::PARAMETER_DOCUMENT_TYPE], $request::$get[CmsConstants::GET_PARAMETER_PATH])) { |
|
| 71 | $path = substr($cmsComponent->storage->getDocuments()->addDocument($request::$post), 1); |
|
| 72 | $docLink = $request::$subfolders . $cmsComponent->getParameter(CmsConstants::PARAMETER_CMS_PREFIX) . '/documents/edit-document?slug=' . $path; |
|
| 73 | $cmsComponent->storage->getActivityLog()->add('created document <a href="' . $docLink . '">' . $request::$post[CmsConstants::POST_PARAMETER_TITLE] . '</a> in path ' . $request::$get[CmsConstants::GET_PARAMETER_PATH], 'plus'); |
|
| 74 | header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsConstants::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 75 | exit; |
|
| 76 | } |
|
| 77 | $cmsComponent->setParameter(CmsConstants::PARAMETER_DOCUMENT_TYPE, $cmsComponent->storage->getDocumentTypes()->getDocumentTypeBySlug($request::$get[CmsConstants::PARAMETER_DOCUMENT_TYPE], true)); |
|
| 78 | $cmsComponent->setParameter(CmsConstants::PARAMETER_BRICKS, $cmsComponent->storage->getBricks()->getBricks()); |
|
| 79 | } else { |
|