Development

Changeset 16459

You must first sign up to be able to contribute.

Changeset 16459

Show
Ignore:
Timestamp:
03/20/09 06:31:29 (4 years ago)
Author:
Jonathan.Wage
Message:

[1.0] sfSympalPlugin: Misc. fixes/enhancements

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfSympalPlugin/trunk/config/sfSympalPluginConfiguration.class.php

    r16417 r16459  
    6464    if (sfSympalTools::isEditMode()) 
    6565    { 
    66       $entities = $menu->addNode('Entities', '@sympal_entities'); 
     66      $entities = $menu->addNode('Content', '@sympal_entities'); 
    6767      $entityTypes = Doctrine::getTable('EntityType')->findAll(); 
    68       $entities->addNode('Create New Entity', '@sympal_entities_new'); 
     68      $entities->addNode('Create New Content', '@sympal_entities_new'); 
    6969      foreach ($entityTypes as $entityType) 
    7070      { 
  • plugins/sfSympalPlugin/trunk/lib/helper/SympalHelper.php

    r16354 r16459  
    11<?php 
    22 
    3 function get_menu_item_breadcrumbs($menuItem
     3function get_menu_item_breadcrumbs($menuItem, $subItem = null
    44{ 
    5   return get_component('sympal_menu', 'breadcrumbs', array('menuItem' => $menuItem)); 
     5  return get_component('sympal_menu', 'breadcrumbs', array('subItem' => $subItem, 'menuItem' => $menuItem)); 
    66} 
    77 
  • plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/lib/model/doctrine/PluginMenuItem.class.php

    r16425 r16459  
    118118  } 
    119119 
    120   public function getBreadcrumbs($entity = null
     120  public function getBreadcrumbs($entity = null, $subItem = null
    121121  { 
    122122    if (!$this->_breadcrumbs) 
     
    145145        } 
    146146 
    147         if ($this->getHasManyEntities()
     147        if ($this->getHasManyEntities() && $entity
    148148        { 
    149           if ($entity) 
    150           { 
    151             $this->_breadcrumbs->addNode($this->getLabel(), $this->getItemRoute()); 
    152             $this->_breadcrumbs->addNode($entity->getHeaderTitle()); 
    153           } else { 
    154             $this->_breadcrumbs->addNode($this->getLabel()); 
    155           } 
     149          $this->_breadcrumbs->addNode($this->getLabel(), $this->getItemRoute()); 
     150          $this->_breadcrumbs->addNode($entity->getHeaderTitle()); 
     151        } else if ($entity) { 
     152          $this->_breadcrumbs->addNode($this->getLabel(), $this->getItemRoute()); 
     153          $this->_breadcrumbs->addNode($entity->getHeaderTitle()); 
     154        } 
     155 
     156        if ($subItem) 
     157        { 
     158          $this->_breadcrumbs->addNode($this->getLabel(), $this->getItemRoute()); 
     159          $this->_breadcrumbs->addNode($subItem); 
    156160        } else { 
    157           if ($entity) 
    158           { 
    159             $this->_breadcrumbs->addNode($this->getLabel(), $this->getItemRoute()); 
    160             $this->_breadcrumbs->addNode($entity->getHeaderTitle()); 
    161           } else { 
    162             $this->_breadcrumbs->addNode($this->getLabel()); 
    163           } 
     161          $this->_breadcrumbs->addNode($this->getLabel()); 
    164162        } 
    165163      } 
  • plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/modules/sympal_menu/actions/components.class.php

    r16450 r16459  
    55  public function executeBreadcrumbs() 
    66  { 
    7     $this->breadcrumbs = $this->menuItem->getBreadcrumbs($this->entity); 
     7    $this->breadcrumbs = $this->menuItem->getBreadcrumbs($this->entity, $this->subItem); 
    88  } 
    99 
  • plugins/sfSympalPlugin/trunk/modules/sympal_editor/actions/actions.class.php

    r16417 r16459  
    2020    $this->getUser()->setFlash('notice', 'Changed language successfully!'); 
    2121 
    22     return $this->redirect('@homepage'); 
     22    return $this->redirect($request->getReferer()); 
    2323  } 
    2424 
  • plugins/sfSympalPlugin/trunk/modules/sympal_editor/templates/_tools.php

    r16425 r16459  
    2929    <div class="hd">Sympal Editor Panel</div> 
    3030    <div class="bd"> 
    31       <?php if (sfSympalConfig::isI18nEnabled()): ?> 
    32         <h3>Change Language</h3> 
    33         <?php echo get_component('sympal_editor', 'language') ?> 
    34         <hr /> 
    35       <?php endif; ?> 
     31      <p>You are currently viewing a <strong><?php echo $entity['Type']['name'] ?></strong> titled <strong><?php echo $entity ?>.</strong></p> 
    3632 
    3733      <div class="sympal_icon_list"> 
    38         <h3>Editor Navigation</h3> 
     34        <h3><?php echo $entity['Type']['name'] ?> Editor</h3> 
    3935 
    4036        <ul> 
    4137          <?php if ($entity['locked_by']): ?> 
    4238            <?php if ($entity['locked_by'] == $sf_user->getGuardUser()->getId()): ?> 
    43               <li><?php echo image_tag('/sfSympalPlugin/images/lock.gif').' '.link_to('Un-Lock to Finish', '@sympal_unlock_entity?id='.$entity['id']) ?></li> 
     39              <li><?php echo image_tag('/sfSympalPlugin/images/lock.gif').' '.link_to('Un-Lock '.$entity['Type']['name'], '@sympal_unlock_entity?id='.$entity['id']) ?></li> 
    4440 
    4541              <?php if ($sf_request->getParameter('module') == 'sympal_entities'): ?> 
    46                 <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit Entity Inline', $entity->getRoute()) ?></li> 
     42                <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit '.$entity['Type']['name'].' Inline', $entity->getRoute()) ?></li> 
    4743              <?php else: ?> 
    48                 <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit Entity Backend', '@sympal_entities_edit?id='.$entity['id']) ?></li> 
     44                <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit '.$entity['Type']['name'].' Backend', '@sympal_entities_edit?id='.$entity['id']) ?></li> 
    4945              <?php endif; ?> 
    5046 
     
    5349              <?php endif; ?>             
    5450            <?php else: ?> 
    55               <li>Entity is currently locked by "<?php echo $entity['LockedBy']['username'] ?>" and cannot be edited.</li> 
     51              <li><?php echo $entity['Type']['name'] ?> is currently locked by "<?php echo $entity['LockedBy']['username'] ?>" and cannot be edited.</li> 
    5652            <?php endif; ?> 
    5753          <?php elseif (!$lock): ?> 
    5854            <li><?php echo image_tag('/sfSympalPlugin/images/lock.gif').' '.link_to('Obtain Edit Lock', '@sympal_lock_entity?id='.$entity['id']) ?></li> 
    5955          <?php elseif ($lock): ?> 
    60             <li>You still have an edit lock open on the <strong><?php echo $lock['Type']['label'] ?></strong> titled "<strong><?php echo $lock->getHeaderTitle() ?></strong>".</li> 
    61             <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit '.$lock->getHeaderTitle(), $lock->getRoute()) ?></li> 
    62           <?php endif; ?> 
    63  
    64           <?php if ($entity->getTemplate()): ?> 
    65             <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit Entity Template', '@sympal_entity_templates_edit?id='.$entity->getTemplate()->getId()) ?></li> 
     56            <li>You still have an edit lock open on a <strong><?php echo $lock['Type']['name'] ?></strong> titled <strong><?php echo $lock->getHeaderTitle() ?></strong>.</li> 
     57            <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Un-Lock '.$lock['Type']['name'], '@sympal_unlock_entity?id='.$entity['id']) ?></li> 
     58            <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Go Back to '.$lock->getHeaderTitle(), $lock->getRoute()) ?></li> 
    6659          <?php endif; ?> 
    6760 
     
    7568          <?php endif; ?> 
    7669        </ul> 
     70 
     71        <h3><?php echo $entity['Type']['label'] ?> Content</h3> 
     72 
     73        <ul> 
     74          <li><?php echo image_tag('/sf/sf_admin/images/add.png').' '.link_to('Create', '@sympal_entities_create_type?type='.$entity['Type']['slug']) ?></li> 
     75          <li><?php echo image_tag('/sf/sf_admin/images/list.png').' '.link_to('List', '@sympal_entity_type_'.$entity['Type']['slug']) ?></li> 
     76        </ul> 
    7777      </div> 
     78 
     79      <?php if (sfSympalConfig::isI18nEnabled()): ?> 
     80        <h3>Change Language</h3> 
     81        <?php echo get_component('sympal_editor', 'language') ?> 
     82      <?php endif; ?> 
    7883    </div> 
    7984  </div> 
  • plugins/sfSympalPlugin/trunk/modules/sympal_entities/config/generator.yml

    r16417 r16459  
    1313    config: 
    1414      actions: ~ 
    15       fields:  ~ 
     15      fields: 
     16        site_id: 
     17          label: Site 
     18        entity_type_id: 
     19          label: Content Type 
    1620      form:    ~ 
    1721      list: 
    18         title: Manage Entities 
     22        title: Manage Content 
    1923        display: [=title, Type, is_published, date_published] 
    2024        object_actions: 
     
    3337            action: view 
    3438      new: 
    35         title: Create New Entity 
     39        title: Create New Content 
  • plugins/sfSympalPlugin/trunk/modules/sympal_entities/templates/editSuccess.php

    r16417 r16459  
    11<?php use_helper('I18N', 'Date') ?> 
    22<?php include_partial('sympal_entities/assets') ?> 
     3 
     4<?php echo get_menu_item_breadcrumbs($entity->getMainMenuItem(), 'Edit') ?> 
    35 
    46<div id="sf_admin_container"> 
  • plugins/sfSympalPlugin/trunk/modules/sympal_entities/templates/new_typeSuccess.php

    r16417 r16459  
    1 <h2>Create New Entity</h2> 
     1<h2>Create New Content</h2> 
    22 
    3 <p>Choose the type of entity you wish to create. Clicking each entity type will bring up the form to create a new entity record of that type.</p> 
     3<p>Choose the type of content you wish to create. Clicking each content type will bring up the form to create a new content for that type.</p> 
    44 
    55<ul>