4 <?php
echo Notifications
::read(); ?
>
6 <section
class="content">
9 <li
><a href
="#post">Post
</a
></li
>
10 <li
><a href
="#customise">Customise
</a
></li
>
11 <li
><a href
="#fields">Custom Fields
</a
></li
>
12 <li
><a href
="#comments">Comments
</a
></li
>
15 <form method
="post" action
="<?php echo Url::current(); ?>" novalidate
>
16 <div data
-tab
="post" class="tab">
20 <label
for="title">Title
:</label
>
21 <input id
="title" name
="title" value
="<?php echo Input::post('title'); ?>">
23 <em
>Your post
&rsquo
;s title
.</em
>
27 <label
for="slug">Slug
:</label
>
28 <input id
="slug" autocomplete
="off" name
="slug" value
="<?php echo Input::post('slug'); ?>">
30 <em
>The slug
for your
post (<code id
="output">slug
</code
>).</em
>
34 <label
for="description">Description
:</label
>
35 <textarea id
="description" name
="description"><?php
echo Input
::post('description'); ?
></textarea
>
37 <em
>A brief outline of what your post is about
. Used in the post introduction
, RSS feed
, and <code
><
;meta name
="description" />
;</code
>.</em
>
41 <label
for="html">Content
:</label
>
42 <textarea id
="html" name
="html"><?php
echo Input
::post('html'); ?
></textarea
>
44 <em
>Your post
's main content. Enjoys a healthy dose of valid HTML.</em>
48 <label>Status:</label>
49 <select id="status" name="status">
50 <?php foreach(array('draft
', 'archived
', 'published
') as $status): ?>
51 <?php $selected = (Input::post('status
') == $status) ? ' selected
' : ''; ?>
52 <option value="<?php echo $status; ?>"<?php echo $selected; ?>>
53 <?php echo ucwords($status); ?>
58 <em>Statuses: live (published), pending (draft), or hidden (archived).</em>
62 <label for="comments">Allow Comments:</label>
63 <input id="comments" name="comments" type="checkbox" value="1"<?php if(Input::post('comments
')) echo ' checked
'; ?>>
64 <em>This will allow users to comment on your posts.</em>
69 <div data-tab="customise" class="tab">
72 <legend>Customise</legend>
73 <em>Here, you can customise your posts. This section is optional.</em>
76 <label for="css">Custom CSS:</label>
77 <textarea id="css" name="css"><?php echo Input::post('css
'); ?></textarea>
79 <em>Custom CSS. Will be wrapped in a <code><style></code> block.</em>
83 <label for="js">Custom JS:</label>
84 <textarea id="js" name="js"><?php echo Input::post('js
'); ?></textarea>
86 <em>Custom Javascript. Will be wrapped in a <code><script></code> block.</em>
91 <div data-tab="fields" class="tab">
94 <legend>Custom fields</legend>
95 <em>Create custom fields here.</em>
98 <!-- Re-Populate post data -->
99 <?php foreach(Input::post('field
', array()) as $data => $value): ?>
100 <?php list($key, $label) = explode(':', $data); ?>
102 <label><?php echo $label; ?></label>
103 <input name="field[<?php echo $key; ?>:<?php echo $label; ?>]" value="<?php echo $value; ?>">
109 <button id="create" type="button">Create a custom field</button>
113 <button type="submit">Create</button>
114 <a href="<?php echo admin_url('posts
'); ?>">Return to posts</a>
120 <script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.1/mootools-yui-compressed.js"></script>
121 <script>window.MooTools || document.write('<script src
="<?php echo theme_url('assets/js/mootools.js'); ?>"><\
/script
>');</script>
122 <script src="<?php echo theme_url('assets
/js
/helpers
.js
'); ?>"></script>
123 <script src="<?php echo theme_url('assets
/js
/popup
.js
'); ?>"></script>
124 <script src="<?php echo theme_url('assets
/js
/custom_fields
.js
'); ?>"></script>
125 <script src="<?php echo theme_url('assets
/js
/tabs
.js
'); ?>"></script>
128 var slug = $('slug
'), output = $('output
');
130 // call the function to init the input text
131 formatSlug(slug, output);
134 slug.addEvent('keyup
', function() {formatSlug(slug, output)});