- Timestamp:
- 04/30/10 18:00:13 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/templates/_form.php
r1108 r1117 1 1 <?php use_helper('I18N','jQuery') ?> 2 2 3 <?php echo jq_form_remote_tag(array('url' => url_for('a_ blog_admin_update',$a_blog_post) , 'update' => 'a-admin-blog-post-form'), array('id'=>'a-admin-form', 'class' => 'blog')) ?>3 <?php echo jq_form_remote_tag(array('url' => url_for('a_event_admin_update',$a_event) , 'update' => 'a-admin-blog-post-form'), array('id'=>'a-admin-form', 'class' => 'blog')) ?> 4 4 5 5 <?php if (!$form->getObject()->isNew()): ?><input type="hidden" name="sf_method" value="PUT" /><?php endif; ?> … … 8 8 9 9 10 11 10 <?php // Title and Slug are hidden and handled with inputs in the editSuccess ?> 12 11 <div class="post-title post-slug option"> 13 12 <?php echo $form['title']->renderRow() ?> 14 <?php echo $form['slug']-> renderRow() ?>13 <?php echo $form['slug']->getWidget()->render('a_event[slug]', $a_event['slug']) ?> 15 14 <?php echo $form['slug']->renderError() ?> 16 15 </div> 17 16 17 18 18 <?php // Huge Publish Button and Publish Date ?> 19 19 <div class="published section"> 20 <a href="#" class="a-btn big a-publish-post <?php echo ($a_ blog_post['status'] == 'published')? 'published':'' ?>" onclick="return false;" id="a-blog-publish-button">20 <a href="#" class="a-btn big a-publish-post <?php echo ($a_event['status'] == 'published')? 'published':'' ?>" onclick="return false;" id="a-blog-publish-button"> 21 21 <span class="publish"><?php echo __('Publish', array(), 'apostrophe_blog') ?></span> 22 22 <span class="unpublish"><?php echo __('Unpublish', array(), 'apostrophe_blog') ?></span> 23 23 </a> 24 24 <div id="a-blog-post-update" class="a-btn big a-publish-post">Saved</div> 25 25 26 26 <div class="post-status option"> 27 27 <?php echo $form['status']->renderRow() ?> … … 31 31 32 32 <div class="post-published-at option"> 33 <?php echo $form['published_at']->render( ) ?>33 <?php echo $form['published_at']->render(array('onClose' => 'updateBlogMulti')) ?> 34 34 <?php echo $form['published_at']->renderError() ?> 35 36 <?php37 // Dan:38 // All of a sudden we have save and cancel buttons now.39 // So apparently when you click save it makes this change40 // If you click cancel it some how restores it to 'Publish Now' â It doesn't just simply hide this options pane41 ?>42 <ul class="a-controls published_at">43 <li><a href="#" onclick="checkAndSetPublish('<?php echo $blog_post_url ?>'); return false;" class="a-btn a-save"><?php echo __('Save', array(), 'apostrophe_blog') ?></a></li>44 <li><a href="#" onclick="checkAndSetPublish('<?php echo $blog_post_url ?>'); return false;" class="a-btn a-cancel"><?php echo __('Cancel', array(), 'apostrophe_blog') ?></a></li>45 </ul>46 35 </div> 47 36 </div> … … 56 45 <h4><?php echo __('Author', array(), 'apostrophe_blog') ?>: 57 46 <?php if ($sf_user->hasCredential('admin')): ?> 58 </h4> 47 </h4> 59 48 <div class="author_id option"> 60 49 <?php echo $form['author_id']->render() ?> 61 <?php echo $form['author_id']->renderError() ?> 50 <?php echo $form['author_id']->renderError() ?> 62 51 </div> 63 52 <?php else: ?> 64 <span><?php echo $a_ blog_post->Author ?></span></h4>53 <span><?php echo $a_event->Author ?></span></h4> 65 54 <?php endif ?> 66 55 … … 69 58 <div class="post-editors"> 70 59 71 <?php if (!count($a_ blog_post->Editors)): ?>60 <?php if (!count($a_event->Editors)): ?> 72 61 <a href="#" onclick="return false;" class="post-editors-toggle a-sidebar-toggle"><?php echo __('allow others to edit this post', array(), 'apostrophe_blog') ?></a> 73 62 <div class="post-editors-options option" id="editors-section"> 74 63 <?php else: ?> 75 64 <hr/> 76 <div class="post-editors-options option show-editors" id="editors-section"> 65 <div class="post-editors-options option show-editors" id="editors-section"> 77 66 <?php endif ?> 78 67 … … 80 69 <?php echo $form['editors_list']->render()?> 81 70 <?php echo $form['editors_list']->renderError() ?> 82 71 83 72 </div> 84 73 </div> … … 111 100 }); 112 101 </script> 113 <?php include_component('a BlogAdmin','tagList', array('a_blog_post' => $form->getObject())) ?>102 <?php include_component('aEventAdmin','tagList', array('a_event' => $form->getObject())) ?> 114 103 </div> 115 104 … … 132 121 <hr /> 133 122 <div class="comments section"> 134 <h4><a href="#" class="allow_comments_toggle <?php echo ($a_ blog_post['allow_comments'])? 'enabled' : 'disabled' ?>"><span class="enabled" title="<?php echo __('Click to disable comments', array(), 'apostrophe_blog') ?>"><?php echo __('Comments are enabled', array(), 'apostrophe_blog') ?></span><span class="disabled" title="<?php echo __('Click to enable comments', array(), 'apostrophe_blog') ?>"><?php echo __('Comments are disabled', array(), 'apostrophe_blog') ?></span></a></h4>123 <h4><a href="#" class="allow_comments_toggle <?php echo ($a_event['allow_comments'])? 'enabled' : 'disabled' ?>"><span class="enabled" title="<?php echo __('Click to disable comments', array(), 'apostrophe_blog') ?>"><?php echo __('Comments are enabled', array(), 'apostrophe_blog') ?></span><span class="disabled" title="<?php echo __('Click to enable comments', array(), 'apostrophe_blog') ?>"><?php echo __('Comments are disabled', array(), 'apostrophe_blog') ?></span></a></h4> 135 124 <div class="allow_comments option"> 136 125 <?php echo $form['allow_comments']->render() ?> 137 126 <?php echo $form['allow_comments']->renderError() ?> 138 127 </div> 139 128 140 129 </div> 141 130 <?php endif ?> 142 131 143 <script type="text/javascript" charset="utf-8"> 144 function updateBlogMulti() 145 { 146 updateBlogForm('<?php echo url_for('a_blog_admin_update',$a_blog_post) ?>'); 147 } 148 149 $(document).ready(function(){ 150 151 $('#a-admin-form').change(function(event) { 152 updateBlog(event); 153 }); 154 155 checkAndSetPublish('<?php echo $a_blog_post->status ?>','<?php echo url_for('a_blog_admin_update',$a_blog_post) ?>'); 156 157 $('.a-sidebar-toggle').click(function(){ 158 $(this).toggleClass('open').next().toggle(); 159 }) 160 161 aMultipleSelect('#categories-section', { 'choose-one': '<?php echo __('Choose Categories', array(), 'apostrophe_blog') ?>', 'add': '<?php echo __('+ New Category', array(), 'apostrophe_blog') ?>', 'onChange': updateBlogMulti}); 162 aMultipleSelect('#editors-section', { 'choose-one': '<?php echo __('Choose Editors', array(), 'apostrophe_blog') ?>','onChange': updateBlogMulti }); 163 164 }); 165 </script> 132 <?php include_partial('formScripts', array('a_event' => $a_event, 'form' => $form)) ?>

