<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="master.html" />

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" py:if="False"/>
    <title>New Article</title>
    <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/_pluggable/smallpress/css/style.css')}" />
    <script type="text/javascript" src="${tg.url('/_pluggable/smallpress/ckeditor/ckeditor.js')}"></script>
</head>

<body>
    <div id="smallpress_new_article" class="smallpress">
        <a href="${h.plug_url('smallpress', '/manage/'+blog)}">back to management</a>
        <h1>Edit Article</h1>
        ${form.display(value=value, action=action)}
        <div id="smallpress_attachments">
            <div id="smallpress_attachments_title">
                <span>Attachments</span><em>Drag previews inside the editor to add images</em>
            </div>
            <div>
                ${upload_form.display(value=dict(article=article.uid))}
            </div>
        </div>
    </div>
    <script type="text/javascript">
        CKEDITOR.config.width = 700;
        CKEDITOR.config.height = 400;
        CKEDITOR.config.toolbar_Smallpress = [
                    { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
                    { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
                    { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
                    { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
                    { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
                    { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
                    { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
                    { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
                    { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
                    { name: 'colors', items : [ 'TextColor','BGColor' ] },
                    { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
                ];
        CKEDITOR.config.toolbar = 'Smallpress';
        CKEDITOR.replace('article_content');
    </script>
</body>
</html>
