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

Show
Ignore:
Timestamp:
09/09/10 17:11:12 (21 months ago)
Author:
johnnyoffline
Message:

1. Moved aIE6() to apostrophe.IE6()
2. Moved aAccordion() to apostrophe.accordion()
3. Integrated accordion into page settings

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/trunk/modules/a/templates/settingsSuccess.php

    r2160 r2171  
    2929        <?php echo $form->renderGlobalErrors() ?> 
    3030 
    31         <div class="a-options-section"> 
     31        <div class="a-options-section open"> 
    3232                <h3>Title &amp; Permalink</h3> 
    3333                <div class="a-form-row a-page-title"> 
     
    4444                <?php if (isset($form['slug'])): ?> 
    4545                  <div class="a-form-row a-page-slug"> 
    46                                 <h4><?php echo $form['slug']->renderLabel(__('Permalink', array(), 'apostrophe')) ?></h4> 
     46                                <h4><?php echo $form['slug']->renderLabel('http://'.$_SERVER['HTTP_HOST']) ?></h4> 
    4747                                <div class="a-form-field"> 
    4848                        <?php echo $form['slug'] ?> 
     
    5050                    <?php echo $form['slug']->renderError() ?> 
    5151                  </div> 
    52                 <?php elseif (0): ?> 
    53                         <?php // If It's the ho ?> 
    5452                <?php endif ?> 
    5553 
     
    5856        <hr/> 
    5957         
    60         <div class="a-options-section"> 
     58        <div class="a-options-section a-accordion"> 
    6159                 
    6260                <h3>Options</h3> 
    6361                 
    64                 <div class="a-form-row engine a-page-type"> 
    65                         <h4><?php echo $form['engine']->renderLabel(__('Page Type', array(), 'apostrophe')) ?></h4> 
    66                         <div class="a-form-field"> 
    67                         <?php echo $form['engine']->render(array('onChange' => 'aUpdateEngineAndTemplate()')) ?> 
     62                <div class="a-accordion-content"> 
     63                         
     64                        <div class="a-form-row engine a-page-type"> 
     65                                <h4><?php echo $form['engine']->renderLabel(__('Page Type', array(), 'apostrophe')) ?></h4> 
     66                                <div class="a-form-field"> 
     67                                <?php echo $form['engine']->render(array('onChange' => 'aUpdateEngineAndTemplate()')) ?> 
     68                                </div> 
     69                          <?php echo $form['engine']->renderError() ?> 
    6870                        </div> 
    69                   <?php echo $form['engine']->renderError() ?> 
     71 
     72                        <div class="a-form-row a-edit-page-template"> 
     73                                <h4><?php echo $form['template']->renderLabel(__('Page Template', array(), 'apostrophe')) ?></h4> 
     74                                <div class="a-form-field"> 
     75                                <?php echo $form['template'] ?> 
     76                                </div> 
     77                          <?php echo $form['template']->renderError() ?> 
     78                        </div> 
     79 
     80                  <?php if (isset($engineSettingsPartial)): ?> 
     81                        <div class="a-form-row a-engine-page-settings" id="a_settings_engine_settings"> 
     82                            <?php include_partial($engineSettingsPartial, array('form' => $engineForm)) ?> 
     83                        </div> 
     84                <?php endif ?> 
     85 
     86                        <div class="a-form-row status"> 
     87                          <h4><label><?php echo __('Page Status', null, 'apostrophe') ?></label></h4> 
     88                        <div class="a-page-settings-status"> 
     89                                        <?php echo $form['archived'] ?> 
     90                                        <?php if(isset($form['cascade_archived'])): ?> 
     91                                                <?php echo $form['cascade_archived'] ?> <?php echo __('Cascade status changes to children', null, 'apostrophe') ?> 
     92                                        <?php endif ?>  
     93                                </div> 
     94                        </div>                   
     95 
     96                        <div class="a-form-row privacy"> 
     97                          <h4><label><?php echo __('Page Privacy', null, 'apostrophe') ?></label></h4> 
     98                                <div class="a-page-settings-status"> 
     99                                <?php echo $form['view_is_secure'] ?> 
     100                                        <?php if(isset($form['cascade_view_is_secure'])): ?> 
     101                                                <?php echo $form['cascade_view_is_secure'] ?> <?php echo __('Cascade privacy changes to children', null, 'apostrophe') ?> 
     102                                        <?php endif ?>  
     103                                </div> 
     104                        </div> 
     105 
    70106                </div> 
    71  
    72                 <div class="a-form-row a-edit-page-template"> 
    73                         <h4><?php echo $form['template']->renderLabel(__('Page Template', array(), 'apostrophe')) ?></h4> 
    74                         <div class="a-form-field"> 
    75                         <?php echo $form['template'] ?> 
    76                         </div> 
    77                   <?php echo $form['template']->renderError() ?> 
    78                 </div> 
    79  
    80           <?php if (isset($engineSettingsPartial)): ?> 
    81                 <div id="a_settings_engine_settings"> 
    82                     <?php include_partial($engineSettingsPartial, array('form' => $engineForm)) ?> 
    83                 </div> 
    84         <?php endif ?> 
    85  
    86                 <div class="a-form-row status"> 
    87                   <h4><label><?php echo __('Page Status', null, 'apostrophe') ?></label></h4> 
    88                         <div class="a-page-settings-status"> 
    89                             <?php echo $form['archived'] ?> 
    90           <?php if(isset($form['cascade_archived'])): ?> 
    91             <?php // If you want your <em> back here, do it in the translation file ?> 
    92             <?php echo $form['cascade_archived'] ?> <?php echo __('Cascade status changes to children', null, 'apostrophe') ?> 
    93           <?php endif ?>  
    94                                 </div> 
    95                 </div>                   
    96  
    97                 <div class="a-form-row privacy"> 
    98                   <h4><label><?php echo __('Page Privacy', null, 'apostrophe') ?></label></h4> 
    99                         <div class="a-page-settings-status"> 
    100                                         <?php echo $form['view_is_secure'] ?> 
    101                                         <?php if(isset($form['cascade_view_is_secure'])): ?> 
    102               <?php echo $form['cascade_view_is_secure'] ?> <?php echo __('Cascade privacy changes to children', null, 'apostrophe') ?> 
    103           <?php endif ?>  
    104                                 </div> 
    105                 </div> 
    106  
    107107        </div> 
    108108 
    109109        <hr/> 
    110110 
    111         <div class="a-options-section"> 
     111        <div class="a-options-section a-accordion"> 
    112112 
    113113                <h3>Tags &amp; Metadata</h3> 
    114114 
    115                 <div class="a-form-row keywords"> 
    116                         <div class="a-form-field"> 
    117                                 <?php echo $form['tags'] ?> 
     115                <div class="a-accordion-content">                        
     116                         
     117                        <div class="a-form-row keywords"> 
     118                                <div class="a-form-field"> 
     119                                        <?php echo $form['tags'] ?> 
     120                                </div> 
     121                                <?php echo $form['tags']->renderError() ?> 
     122                                <?php a_js_call('aInlineTaggableWidget(?, ?)', '.tags-input', array('popular-tags' => $popularTags, 'existing-tags' => $existingTags, 'typeahead-url' => url_for('taggableComplete/complete'), 'tagsLabel' => 'Page Tags')) ?> 
    118123                        </div> 
    119                         <?php echo $form['tags']->renderError() ?> 
    120                         <?php a_js_call('aInlineTaggableWidget(?, ?)', '.tags-input', array('popular-tags' => $popularTags, 'existing-tags' => $existingTags, 'typeahead-url' => url_for('taggableComplete/complete'), 'tagsLabel' => 'Page Tags')) ?> 
     124 
     125                        <div class="a-form-row meta-description"> 
     126                                <h4 class="a-block"><?php echo $form['meta_description']->renderLabel(__('Meta Description', array(), 'apostrophe')) ?></h4> 
     127                                <div class="a-form-field"> 
     128                                        <?php echo $form['meta_description'] ?> 
     129                                </div> 
     130                                <?php echo $form['meta_description']->renderError() ?> 
     131                        </div> 
     132                         
    121133                </div> 
    122  
    123                 <div class="a-form-row meta-description"> 
    124                         <h4 class="a-block"><?php echo $form['meta_description']->renderLabel(__('Meta Description', array(), 'apostrophe')) ?></h4> 
    125                         <div class="a-form-field"> 
    126                                 <?php echo $form['meta_description'] ?> 
    127                         </div> 
    128                         <?php echo $form['meta_description']->renderError() ?> 
    129                 </div> 
    130                  
    131134        </div> 
    132135 
    133136        <hr/> 
    134137         
    135         <div class="a-options-section"> 
     138        <div class="a-options-section a-accordion"> 
    136139    <?php include_partial('a/allPrivileges', array('form' => $form, 'inherited' => $inherited, 'admin' => $admin)) ?> 
    137140        </div> 
     
    153156</form> 
    154157<?php a_js_call('apostrophe.updateEngineAndTemplate(?)', array('url' => url_for('a/engineSettings'), 'id' => $page->id)) ?> 
     158<?php a_js_call('apostrophe.accordion(?)', array('accordion_toggle' => '.a-options-section:not(".open") h3')) ?> 
     159 
    155160<?php // All AJAX actions that use a_js_call must do this since they have no layout to do it for them ?> 
    156  
    157161<script src="/sfJqueryReloadedPlugin/js/plugins/jquery.autocomplete.js"></script> 
    158162<script src="/sfDoctrineActAsTaggablePlugin/js/pkTagahead.js"></script>