To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 1117

Show
Ignore:
Timestamp:
04/30/10 18:00:13 (22 months ago)
Author:
johnnyoffline
Message:

moving more things over to events. this is getting hairy/\!

Location:
plugins/apostropheBlogPlugin/trunk/modules
Files:
4 added
7 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostropheBlogPlugin/trunk/modules/aEvent/lib/BaseaEventActions.class.php

    r860 r1117  
    149149        'format'      => 'rss', 
    150150        'title'       => sfConfig::get('app_aEvent_feed_title'), 
    151         'link'        => '@a_blog', 
     151        'link'        => '@a_event', 
    152152        'authorEmail' => sfConfig::get('app_aEvent_feed_author_email'), 
    153153        'authorName'  => sfConfig::get('app_aEvent_feed_author_name'), 
    154         'routeName'   => '@a_blog_post', 
     154        'routeName'   => '@a_event', 
    155155        'methods'     => array('description' => 'getFeedText') 
    156156      ) 
  • plugins/apostropheBlogPlugin/trunk/modules/aEvent/templates/_singleColumnTemplate.php

    r880 r1117  
    1 <?php a_area('body', array( 
     1<?php a_area('blog-body', array( 
    22  'editable' => false, 'toolbar' => 'basic', 'slug' => 'aBlog-'.$a_event['id'], 
    3   'allowed_types' => array('aRichText', 'aImage', 'aButton', 'aSlideshow', 'aVideo'), 
     3  'allowed_types' => array('aRichText', 'aSlideshow', 'aVideo', 'aPDF'), 
    44  'type_options' => array( 
    55    'aRichText' => array('tool' => 'Main'),    
    6     'aImage' => array('width' => 700, 'flexHeight' => true, 'resizeType' => 's'), 
    7     'aButton' => array('width' => 700, 'flexHeight' => true, 'resizeType' => 's'), 
    8     'aSlideshow' => array("width" => 700, "flexHeight" => true, 'resizeType' => 's', ) 
    9   )) 
    10 ) ?> 
     6    'aSlideshow' => array("width" => 680, "flexHeight" => true, 'resizeType' => 's', 'constraints' => array('minimum-width' => 680)), 
     7                'aVideo' => array('width' => 680),  
     8                'aPDF' => array('width' => 680, 'flexHeight' => true, 'resizeType' => 's'),                              
     9))) ?> 
  • plugins/apostropheBlogPlugin/trunk/modules/aEvent/templates/_singleColumnTemplate_rss.php

    r880 r1117  
    1 <?php echo link_to($aEvent['title'], 'a_event_post', $aEvent) ?> by <?php echo $aEvent->Author ?> 
     1<?php echo link_to($aEvent['title'], 'a_blog_post', $aEvent) ?> by <?php echo $aEvent->Author ?> 
    22<br/> 
    33<?php echo $aEvent['published_at'] ?> 
    44<br/><br/> 
    5 <?php foreach($aEvent->Page->getArea('body') as $slot): ?> 
     5<?php foreach($aEvent->Page->getArea('blog-body') as $slot): ?> 
    66<?php if(method_exists($slot, 'getSearchText')): ?> 
    77<?php echo $slot->getSearchText() ?> 
  • plugins/apostropheBlogPlugin/trunk/modules/aEvent/templates/_twoColumnTemplate.php

    r880 r1117  
    1 <div style="float:left;width:500px;padding-right:10px"> 
    2 <?php a_area('body', array( 
     1<?php a_area('blog-body', array( 
    32  'editable' => false, 'toolbar' => 'basic', 'slug' => 'aBlog-'.$a_event['id'], 
    4   'allowed_types' => array('aRichText', 'aImage', 'aButton', 'aSlideshow', 'aVideo'), 
     3  'allowed_types' => array('aRichText', 'aSlideshow', 'aVideo', 'aPDF'), 
    54  'type_options' => array( 
    65    'aRichText' => array('tool' => 'Main'),    
    7     'aImage' => array('width' => 500, 'flexHeight' => true, 'resizeType' => 's'), 
    8     'aButton' => array('width' => 500, 'flexHeight' => true, 'resizeType' => 's'), 
    9     'aSlideshow' => array("width" => 500, "flexHeight" => true, 'resizeType' => 's', ) 
    10   )) 
    11 ) ?> 
    12 </div> 
     6    'aSlideshow' => array("width" => 480, "flexHeight" => true, 'resizeType' => 's', 'constraints' => array('minimum-width' => 480)), 
     7                'aVideo' => array('width' => 480),  
     8                'aPDF' => array('width' => 480, 'flexHeight' => true, 'resizeType' => 's'),              
     9))) ?> 
    1310 
    14 <div style="float:left;width:200px;"> 
    15 <?php a_area('sidebar', array( 
     11<?php a_area('blog-sidebar', array( 
    1612  'editable' => false, 'toolbar' => 'basic', 'slug' => 'aBlog-'.$a_event['id'], 
    17   'allowed_types' => array('aRichText', 'aImage', 'aButton', 'aSlideshow', 'aVideo'), 
     13  'allowed_types' => array('aRichText', 'aSlideshow', 'aVideo', 'aPDF'), 
    1814  'type_options' => array( 
    1915    'aRichText' => array('tool' => 'Main'),    
    20     'aImage' => array('width' => 200, 'flexHeight' => true, 'resizeType' => 's'), 
    21     'aButton' => array('width' => 200, 'flexHeight' => true, 'resizeType' => 's'), 
    22     'aSlideshow' => array("width" => 200, "flexHeight" => true, 'resizeType' => 's', ) 
    23   )) 
    24 ) ?> 
    25 </div> 
     16    'aSlideshow' => array("width" => 180, "flexHeight" => true, 'resizeType' => 's', 'constraints' => array('minimum-width' => 180)), 
     17                'aVideo' => array('width' => 180),  
     18                'aPDF' => array('width' => 180, 'flexHeight' => true, 'resizeType' => 's'),                              
     19))) ?> 
  • plugins/apostropheBlogPlugin/trunk/modules/aEvent/templates/_twoColumnTemplate_rss.php

    r880 r1117  
    1 <?php echo link_to($aEvent['title'], 'a_event_post', $aEvent) ?> by <?php echo $aEvent->Author ?> 
     1<?php echo link_to($aEvent['title'], 'a_blog_post', $aEvent) ?> by <?php echo $aEvent->Author ?> 
    22<br/> 
    33<?php echo $aEvent['published_at'] ?> 
    44<br/><br/> 
    5 <?php foreach($aEvent->Page->getArea('body') as $slot): ?> 
     5<?php foreach($aEvent->Page->getArea('blog-body') as $slot): ?> 
    66<?php if(method_exists($slot, 'getSearchText')): ?> 
    77<?php echo $slot->getSearchText() ?> 
  • plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/templates/_form.php

    r1108 r1117  
    11<?php use_helper('I18N','jQuery') ?> 
    22 
    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')) ?> 
    44 
    55<?php if (!$form->getObject()->isNew()): ?><input type="hidden" name="sf_method" value="PUT" /><?php endif; ?> 
     
    88 
    99 
    10  
    1110<?php // Title and Slug are hidden and handled with inputs in the editSuccess ?> 
    1211<div class="post-title post-slug option"> 
    1312  <?php echo $form['title']->renderRow() ?> 
    14   <?php echo $form['slug']->renderRow() ?> 
     13  <?php echo $form['slug']->getWidget()->render('a_event[slug]', $a_event['slug']) ?> 
    1514  <?php echo $form['slug']->renderError() ?> 
    1615</div> 
    1716 
     17 
    1818<?php // Huge Publish Button and Publish Date ?> 
    1919<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"> 
    2121          <span class="publish"><?php echo __('Publish', array(), 'apostrophe_blog') ?></span> 
    2222          <span class="unpublish"><?php echo __('Unpublish', array(), 'apostrophe_blog') ?></span> 
    2323        </a> 
    2424        <div id="a-blog-post-update" class="a-btn big a-publish-post">Saved</div> 
    25  
     25         
    2626        <div class="post-status option"> 
    2727          <?php echo $form['status']->renderRow() ?> 
     
    3131 
    3232        <div class="post-published-at option"> 
    33           <?php echo $form['published_at']->render() ?> 
     33          <?php echo $form['published_at']->render(array('onClose' => 'updateBlogMulti')) ?> 
    3434          <?php echo $form['published_at']->renderError() ?> 
    35  
    36           <?php 
    37           // Dan: 
    38           // All of a sudden we have save and cancel buttons now. 
    39           // So apparently when you click save it makes this change 
    40           // If you click cancel it some how restores it to 'Publish Now' – It doesn't just simply hide this options pane 
    41           ?> 
    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> 
    4635        </div> 
    4736</div> 
     
    5645                <h4><?php echo __('Author', array(), 'apostrophe_blog') ?>: 
    5746                        <?php if ($sf_user->hasCredential('admin')): ?> 
    58                                 </h4> 
     47                                </h4>    
    5948                                <div class="author_id option"> 
    6049                                <?php echo $form['author_id']->render() ?> 
    61                                 <?php echo $form['author_id']->renderError() ?> 
     50                                <?php echo $form['author_id']->renderError() ?>                          
    6251                                </div> 
    6352                        <?php else: ?> 
    64                                 <span><?php echo $a_blog_post->Author ?></span></h4> 
     53                                <span><?php echo $a_event->Author ?></span></h4>         
    6554                        <?php endif ?> 
    6655 
     
    6958        <div class="post-editors"> 
    7059 
    71                 <?php if (!count($a_blog_post->Editors)): ?> 
     60                <?php if (!count($a_event->Editors)): ?> 
    7261                  <a href="#" onclick="return false;" class="post-editors-toggle a-sidebar-toggle"><?php echo __('allow others to edit this post', array(), 'apostrophe_blog') ?></a> 
    7362                <div class="post-editors-options option" id="editors-section"> 
    7463                <?php else: ?> 
    7564                        <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">                      
    7766                <?php endif ?> 
    7867 
     
    8069            <?php echo $form['editors_list']->render()?> 
    8170            <?php echo $form['editors_list']->renderError() ?> 
    82  
     71         
    8372          </div> 
    8473        </div> 
     
    111100          }); 
    112101        </script> 
    113         <?php include_component('aBlogAdmin','tagList', array('a_blog_post' => $form->getObject())) ?> 
     102        <?php include_component('aEventAdmin','tagList', array('a_event' => $form->getObject())) ?> 
    114103</div> 
    115104 
     
    132121<hr /> 
    133122<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>  
    135124        <div class="allow_comments option"> 
    136125        <?php echo $form['allow_comments']->render() ?> 
    137126        <?php echo $form['allow_comments']->renderError() ?> 
    138127        </div> 
    139  
     128         
    140129</div> 
    141130<?php endif ?> 
    142131 
    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)) ?> 
  • plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/templates/editSuccess.php

    r1116 r1117  
    4747                </div> 
    4848 
    49         <?php include_partial('aBlog/'.$a_event->getTemplate(), array('a_event' => $a_event)) ?> 
     49        <?php include_partial('aEvent/'.$a_event->getTemplate(), array('a_event' => $a_event)) ?> 
    5050 
    5151  </div>