Permet d'ajouter de nouveaux articles
This commit is contained in:
20
views/edit.php
Normal file
20
views/edit.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<form action="<?= $_SERVER['REQUEST_URI'] ?>" method="post">
|
||||
<div class="field">
|
||||
<label class="label" for="title">Title</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" id="title" name="title" value="<?= $params['news']->getTitle() ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="content">Content</label>
|
||||
<div class="control">
|
||||
<textarea class="textarea" id="content" name="content" rows="10"><?= $params['news']->getContent() ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<button class="button is-link">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= $viewsArgs['title'] ?? 'Is it a blog?' ?></title>
|
||||
<title><?= $title ?? 'Is it a blog?' ?></title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php $params['title'] = 'NewsView'; ?>
|
||||
<?php $title = $params['news']->getTitle(); ?>
|
||||
<h1>News</h1>
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
@@ -8,7 +8,7 @@
|
||||
</header>
|
||||
<div class="card-content">
|
||||
<div class="content">
|
||||
<?= $params['news']->getContent() ?>...
|
||||
<?= $params['news']->getContent() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user