SHOW:
|
|
- or go back to the newest paste.
| 1 | - | /** |
| 1 | + | |
| 2 | - | * @var \App\Components\IArticleMenuFactory |
| 2 | + | |
| 3 | - | * @inject |
| 3 | + | |
| 4 | - | */ |
| 4 | + | |
| 5 | - | |
| 5 | + | |
| 6 | - | public $articleMenuFactory; |
| 6 | + | <form n:name="addArticle"> |
| 7 | - | |
| 7 | + | <ul n:if="$form->errors"> |
| 8 | - | protected function createComponentArticleMenu() |
| 8 | + | <li n:foreach="$form->errors as $error">{$error}</li>
|
| 9 | - | {
|
| 9 | + | </ul> |
| 10 | - | $this->articleMenuFactory->create(); |
| 10 | + | |
| 11 | - | } |
| 11 | + | <table class="addMenuArt"> |
| 12 | <tr> | |
| 13 | - | Ruční vykreslení zatím s controlem (pokud tam uvedu tu mojí komponentu, tak na mě řve, že nebyla vytvořená) |
| 13 | + | <td>{label title /}</td>
|
| 14 | <td><input n:name="title"></td> | |
| 15 | - | {* Latte template *}
|
| 15 | + | |
| 16 | <td>{label published /}</td>
| |
| 17 | <td><input n:name="published"></td> | |
| 18 | ||
| 19 | <td>{control articleMenu}</td>
| |
| 20 | </tr> | |
| 21 | </table> | |
| 22 | - | {$presenter['addArticle']->render('begin')}
|
| 22 | + | |
| 23 | - | {if !empty($presenter['addArticle']->errors)}
|
| 23 | + | |
| 24 | - | <div> |
| 24 | + | <tr><td><textarea n:name="content"></textarea></td></tr> |
| 25 | - | {foreach $presenter['addArticle']->errors AS $error}
|
| 25 | + | |
| 26 | - | {$error}<br>
|
| 26 | + | |
| 27 | - | {/foreach}
|
| 27 | + | <div><input n:name="submit"></div> |
| 28 | - | </div> |
| 28 | + | </form> |
| 29 | - | {/if}
|
| 29 | + | |
| 30 | </div> | |
| 31 | - | <table class='addMenuArt'> |
| 31 | + | {/block} |