mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-16 00:18:41 +00:00
Minor functioinality improvements
This commit is contained in:
parent
db1ad88b74
commit
8fb3e3edc2
|
|
@ -152,7 +152,12 @@ class ApiController extends Controller
|
||||||
$newsArticle = $this->createNewsArticleFromRequest($request);
|
$newsArticle = $this->createNewsArticleFromRequest($request);
|
||||||
|
|
||||||
NewsArticleMapper::create($newsArticle);
|
NewsArticleMapper::create($newsArticle);
|
||||||
$response->set($request->getUri()->__toString(), $newsArticle->jsonSerialize());
|
$response->set($request->getUri()->__toString(), [
|
||||||
|
'status' => NotificationLevel::OK,
|
||||||
|
'title' => 'News',
|
||||||
|
'message' => 'News article successfully created.',
|
||||||
|
'response' => $newsArticle->jsonSerialize()
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="box wf-100">
|
<div class="box wf-100">
|
||||||
<?= $this->getData('editor')->getData('text')->render('iNews'); ?>
|
<?= $this->getData('editor')->getData('text')->render('iNews', 'plain', 'docForm'); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<div class="col-xs-12 col-md-3">
|
<div class="col-xs-12 col-md-3">
|
||||||
<section class="box wf-100">
|
<section class="box wf-100">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<form id="docForm" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/news?{?}&csrf={$CSRF}'); ?>">
|
<form id="docForm" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/news?{?}&csrf={$CSRF}'); ?>">
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
<tr><td colspan="2"><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
<tr><td colspan="2"><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||||
<tr><td colspan="2"><select name="status" id="iStatus">
|
<tr><td colspan="2"><select name="status" id="iStatus">
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<section class="box wf-100">
|
<section class="box wf-100">
|
||||||
<header><h1><?= $this->printHtml($news->getTitle()); ?></h1></header>
|
<header><h1><?= $this->printHtml($news->getTitle()); ?></h1></header>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<article>
|
<article><?= $news->getContent(); ?></article>
|
||||||
<?= $this->printHtml($news->getContent()); ?>
|
|
||||||
</article>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user