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

Show
Ignore:
Timestamp:
07/27/10 13:49:40 (22 months ago)
Author:
johnnyoffline
Message:

cleaned _area.php and _globalTools.php - they both use the new .a-ui namespace. the markup is lighter and more organized

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/features/css/modules/a/templates/_globalTools.php

    r1703 r1859  
    77 
    88<div id="a-global-toolbar"> 
    9   <?php // All logged in users, including guests with no admin abilities, need access to the ?> 
    10   <?php // logout button. But if you have no legitimate admin roles, you shouldn't see the ?> 
    11   <?php // apostrophe or the global buttons ?> 
    129 
    13   <?php $buttons = aTools::getGlobalButtons() ?> 
    14   <?php $page = aTools::getCurrentPage() ?> 
    15   <?php $pageEdit = $page && $page->userHasPrivilege('edit') ?> 
    16   <?php $cmsAdmin = $sf_user->hasCredential('cms_admin') ?> 
     10        <ul class="a-ui a-controls"> 
    1711 
    18   <?php if ($cmsAdmin || count($buttons) || $pageEdit): ?> 
     12          <?php if ($cmsAdmin || count($buttons) || $pageEdit): ?> 
    1913 
    20         <?php // The Apostrophe ?> 
    21         <div class="a-global-toolbar-apostrophe"> 
    22                 <?php echo link_to(__('Apostrophe Now', null, 'apostrophe'),'@homepage', array('id' => 'the-apostrophe')) ?> 
    23                 <ul class="a-global-toolbar-buttons a-controls"> 
     14                        <li><?php echo link_to(__('Apostrophe Now', null, 'apostrophe'),'@homepage', array('id' => 'the-apostrophe')) ?></li> 
    2415 
    25                         <?php foreach ($buttons as $button): ?> 
    26                           <?php if ($button->getTargetEnginePage()): ?> 
    27                             <?php aRouteTools::pushTargetEnginePage($button->getTargetEnginePage()) ?> 
    28                           <?php endif ?> 
    29                           <li><?php echo link_to(__($button->getLabel(), null, 'apostrophe'), $button->getLink(), array('class' => 'a-btn icon ' . $button->getCssClass())) ?></li> 
    30                         <?php endforeach ?> 
     16                        <?php foreach ($buttons as $button): ?> 
     17                                <?php if ($button->getTargetEnginePage()): ?><?php aRouteTools::pushTargetEnginePage($button->getTargetEnginePage()) ?><?php endif ?> 
     18                                <li><?php echo link_to(__($button->getLabel(), null, 'apostrophe'), $button->getLink(), array('class' => 'a-btn icon ' . $button->getCssClass())) ?></li> 
     19                        <?php endforeach ?> 
    3120 
    32                         <?php if ($page && (!$page->admin) && $cmsAdmin && $pageEdit): ?>                        
    33                                         <li> 
    34                                                 <a href="#" onclick="return false;" class="a-btn icon a-page-settings" id="a-page-settings-button">Page Settings</a>                     
    35                                                 <div id="a-page-settings" class="a-page-settings-menu dropshadow"></div> 
    36                                         </li>                            
     21                        <?php if ($page && (!$page->admin) && $cmsAdmin && $pageEdit): ?>                        
     22                                <li> 
     23                                        <a href="#" onclick="return false;" class="a-btn icon a-page-settings" id="a-page-settings-button">Page Settings</a>                     
     24                                        <div id="a-page-settings" class="a-page-settings-menu dropshadow"></div> 
     25                                </li>                            
    3726 
    38                                         <?php // Remove the Add Page Button if we have reached our max depth, max peers, or if it is an engine page ?> 
    39                                         <?php $maxPageLevels = (sfConfig::get('app_a_max_page_levels'))? sfConfig::get('app_a_max_page_levels') : 0; ?><?php // Your Site Tree can only get so deep ?> 
    40                                         <?php $maxChildPages = (sfConfig::get('app_a_max_children_per_page'))? sfConfig::get('app_a_max_children_per_page') : 0; ?><?php // Your Site Tree can only get so wide ?> 
    41                                         <?php if (!(($maxPageLevels && ($page->getLevel() == $maxPageLevels)) || ($maxChildPages && (count($page->getChildren()) == $maxChildPages)) || strlen($page->getEngine()))): ?> 
    42                                                 <li><?php include_component('a', 'createPage', array('page' => $page, 'edit' => $page->userHasPrivilege('edit'))); ?></li> 
    43                                         <?php endif ?> 
     27                                <?php // Remove the Add Page Button if we have reached our max depth, max peers, or if it is an engine page ?> 
     28                                <?php $maxPageLevels = (sfConfig::get('app_a_max_page_levels'))? sfConfig::get('app_a_max_page_levels') : 0; ?><?php // Your Site Tree can only get so deep ?> 
     29                                <?php $maxChildPages = (sfConfig::get('app_a_max_children_per_page'))? sfConfig::get('app_a_max_children_per_page') : 0; ?><?php // Your Site Tree can only get so wide ?> 
     30                                <?php if (!(($maxPageLevels && ($page->getLevel() == $maxPageLevels)) || ($maxChildPages && (count($page->getChildren()) == $maxChildPages)) || strlen($page->getEngine()))): ?> 
     31                                        <li><?php include_component('a', 'createPage', array('page' => $page, 'edit' => $page->userHasPrivilege('edit'))); ?></li> 
     32                                <?php endif ?> 
    4433 
    45                                 <?php endif ?> 
    46                 </ul> 
    47         </div> 
     34                        <?php endif ?> 
     35                <?php endif ?> 
    4836 
    49         <?php endif ?> 
     37                <li class="a-login"> 
     38                        <?php include_partial("a/login") ?> 
     39                </li>            
    5040 
    51         <?php // Login / Logout ?> 
    52         <div class="a-global-toolbar-login a-login"> 
    53                 <?php include_partial("a/login") ?> 
    54         </div>           
     41        </ul> 
    5542  
    5643</div> 
     
    8168                        });      
    8269                }); 
    83                  
    8470        }); 
    8571</script>