1 <h1
>Editing
&ldquo
;<?php
echo truncate($page->name
, 4); ?
>&rdquo
;</h1
>
3 <?php
echo Notifications
::read(); ?
>
5 <section
class="content">
7 <form method
="post" action
="<?php echo Url::current(); ?>" novalidate
>
10 <label
for="name">Name
:</label
>
11 <input id
="name" name
="name" value
="<?php echo Input::post('name', $page->name); ?>">
13 <em
>The name of your page
. This gets shown in the navigation
.</em
>
18 <input id
="title" name
="title" value
="<?php echo Input::post('title', $page->title); ?>">
20 <em
>The title of your page
, which gets shown in the
<code
><
;title
>
;</code
>.</em
>
24 <label
for="slug">Slug
:</label
>
25 <input id
="slug" autocomplete
="off" name
="slug" value
="<?php echo Input::post('slug', $page->slug); ?>">
27 <em
>The slug
for your
page (<code id
="output">slug
</code
>).</em
>
31 <label
for="content">Content
:</label
>
32 <textarea id
="content" name
="content"><?php
echo Input
::post('content', $page->content
); ?
></textarea
>
34 <em
>Your page
's content. Accepts valid HTML.</em>
38 <label>Status:</label>
39 <select id="status" name="status">
40 <?php foreach(array('draft
', 'archived
', 'published
') as $status): ?>
41 <?php $selected = (Input::post('status
', $page->status) == $status) ? 'selected
' : ''; ?>
42 <option value="<?php echo $status; ?>"<?php echo $selected; ?>>
43 <?php echo ucwords($status); ?>
48 <em>Do you want your page to be live (published), pending (draft), or hidden (archived)?</em>
54 <button name="save" type="submit">Save</button>
56 // Dont delete our posts page or home page
57 if(in_array($page->id, array(Config::get('metadata
.home_page
'), Config::get('metadata
.posts_page
'))) === false): ?>
58 <button name="delete" type="submit">Delete</button>
61 <a href="<?php echo admin_url('pages
'); ?>">Return to pages</a>
69 <em>Some useful links.</em>
71 <li><a href="<?php echo Url::make($page->slug); ?>">View this page on your site</a></li>
75 <script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.1/mootools-yui-compressed.js"></script>
76 <script>window.MooTools || document.write('<script src
="<?php echo theme_url('assets/js/mootools.js'); ?>"><\
/script
>');</script>
77 <script src="<?php echo theme_url('assets
/js
/helpers
.js
'); ?>"></script>
80 var slug = $('slug
'), output = $('output
');
82 // call the function to init the input text
83 formatSlug(slug, output);
86 slug.addEvent('keyup
', function() {formatSlug(slug, output)});