Skip to content

Commit

Permalink
update with newer variation on Aura.View
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed May 27, 2014
1 parent 399c19c commit 4e89221
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
12 changes: 6 additions & 6 deletions example-code/Blog/Responder/views/_form.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?= $this->ul()->items($blog->getMessages())->get(); ?>
<?= $this->ul()->items($this->_blog->getMessages()) ?>

<?= $this->form(array(
'method' => $method,
'action' => $action,
'method' => $this->_method,
'action' => $this->_action,
)); ?>
<table>
<tr>
Expand All @@ -11,7 +11,7 @@
$this->input(array(
'type' => 'text',
'name' => 'blog[title]',
'value' => $blog->title,
'value' => $this->_blog->title,
));
?></td>
</tr>
Expand All @@ -21,15 +21,15 @@
$this->input(array(
'type' => 'textarea',
'name' => 'blog[body]',
'value' => $blog->body,
'value' => $this->_blog->body,
));
?></td>
</tr>
<tr>
<td colspan="2"><?=
$this->input(array(
'type' => 'submit',
'value' => $submit,
'value' => $this->_submit,
));
?></td>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions example-code/Blog/Responder/views/_intro.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php use Aura\Html\Escaper as e; ?>

<div class="blog-intro">
<h2><?= e::h($blog->title) ?></h2>
<p class="byline"><?= e::h($blog->author) ?></p>
<?= e::h($blog->intro) ?>
<p><?= $this->a("/blog/read/{$blog->id}", 'Read More ...'); ?></p>
<h2><?= e::h($this->_blog->title) ?></h2>
<p class="byline"><?= e::h($this->_blog->author) ?></p>
<?= e::h($this->_blog->intro) ?>
<p><?= $this->a("/blog/read/{$this->_blog->id}", 'Read More ...'); ?></p>
</div>
8 changes: 4 additions & 4 deletions example-code/Blog/Responder/views/add.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h3>Add New Blog Post</h3>

<?= $this->render('_form', array(
'method' => 'POST',
'action' => '/blog/add',
'submit' => 'Create',
'blog' => $this->blog,
'_method' => 'POST',
'_action' => '/blog/add',
'_submit' => 'Create',
'_blog' => $this->blog,
)); ?>
4 changes: 3 additions & 1 deletion example-code/Blog/Responder/views/browse.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php foreach ($this->collection as $blog) {
echo $this->render('_intro', array('blog' => $blog));
echo $this->render('_intro', array(
'_blog' => $blog,
));
} ?>
8 changes: 4 additions & 4 deletions example-code/Blog/Responder/views/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<?= $this->ul()->items($this->blog->getMessages())->get(); ?>

<?= $this->render('_form', array(
'method' => 'PATCH',
'action' => '/blog/edit',
'submit' => 'Update',
'blog' => $this->blog,
'_method' => 'PATCH',
'_action' => '/blog/edit',
'_submit' => 'Update',
'_blog' => $this->blog,
)); ?>

0 comments on commit 4e89221

Please sign in to comment.