mirror of
https://github.com/flextype/flextype.git
synced 2025-08-29 16:00:15 +02:00
- Templates Controller/Views implementation
This commit is contained in:
@@ -111,7 +111,21 @@ class TemplatesController extends Controller
|
||||
|
||||
public function editProcess($request, $response, $args)
|
||||
{
|
||||
$type = $request->getParsedBody()['type_current'];
|
||||
|
||||
if ($type == 'partial') {
|
||||
$_type = '/templates/partials/';
|
||||
} else {
|
||||
$_type = '/templates/';
|
||||
}
|
||||
|
||||
if (Filesystem::write( PATH['themes'] . '/' . $this->registry->get('settings.theme') . $_type . $request->getParsedBody()['id'] . '.html', $request->getParsedBody()['data'])) {
|
||||
$this->flash->addMessage('success', __('admin_message_'.$type.'_saved'));
|
||||
} else {
|
||||
$this->flash->addMessage('error', __('admin_message_'.$type.'_was_not_saved'));
|
||||
}
|
||||
|
||||
return $response->withRedirect($this->container->get('router')->pathFor('admin.fieldsets.index'));
|
||||
}
|
||||
|
||||
public function rename($request, $response, $args)
|
||||
|
Reference in New Issue
Block a user