Changeset 16459
- Timestamp:
- 03/20/09 06:31:29 (4 years ago)
- Files:
-
- plugins/sfSympalPlugin/trunk/config/sfSympalPluginConfiguration.class.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/lib/helper/SympalHelper.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/lib/model/doctrine/PluginMenuItem.class.php (modified) (2 diffs)
- plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/modules/sympal_menu/actions/components.class.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/modules/sympal_editor/actions/actions.class.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/modules/sympal_editor/templates/_tools.php (modified) (3 diffs)
- plugins/sfSympalPlugin/trunk/modules/sympal_entities/config/generator.yml (modified) (2 diffs)
- plugins/sfSympalPlugin/trunk/modules/sympal_entities/templates/editSuccess.php (modified) (1 diff)
- plugins/sfSympalPlugin/trunk/modules/sympal_entities/templates/new_typeSuccess.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfSympalPlugin/trunk/config/sfSympalPluginConfiguration.class.php
r16417 r16459 64 64 if (sfSympalTools::isEditMode()) 65 65 { 66 $entities = $menu->addNode(' Entities', '@sympal_entities');66 $entities = $menu->addNode('Content', '@sympal_entities'); 67 67 $entityTypes = Doctrine::getTable('EntityType')->findAll(); 68 $entities->addNode('Create New Entity', '@sympal_entities_new');68 $entities->addNode('Create New Content', '@sympal_entities_new'); 69 69 foreach ($entityTypes as $entityType) 70 70 { plugins/sfSympalPlugin/trunk/lib/helper/SympalHelper.php
r16354 r16459 1 1 <?php 2 2 3 function get_menu_item_breadcrumbs($menuItem )3 function get_menu_item_breadcrumbs($menuItem, $subItem = null) 4 4 { 5 return get_component('sympal_menu', 'breadcrumbs', array(' menuItem' => $menuItem));5 return get_component('sympal_menu', 'breadcrumbs', array('subItem' => $subItem, 'menuItem' => $menuItem)); 6 6 } 7 7 plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/lib/model/doctrine/PluginMenuItem.class.php
r16425 r16459 118 118 } 119 119 120 public function getBreadcrumbs($entity = null )120 public function getBreadcrumbs($entity = null, $subItem = null) 121 121 { 122 122 if (!$this->_breadcrumbs) … … 145 145 } 146 146 147 if ($this->getHasManyEntities() )147 if ($this->getHasManyEntities() && $entity) 148 148 { 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); 156 160 } 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()); 164 162 } 165 163 } plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalMenuPlugin/modules/sympal_menu/actions/components.class.php
r16450 r16459 5 5 public function executeBreadcrumbs() 6 6 { 7 $this->breadcrumbs = $this->menuItem->getBreadcrumbs($this->entity );7 $this->breadcrumbs = $this->menuItem->getBreadcrumbs($this->entity, $this->subItem); 8 8 } 9 9 plugins/sfSympalPlugin/trunk/modules/sympal_editor/actions/actions.class.php
r16417 r16459 20 20 $this->getUser()->setFlash('notice', 'Changed language successfully!'); 21 21 22 return $this->redirect( '@homepage');22 return $this->redirect($request->getReferer()); 23 23 } 24 24 plugins/sfSympalPlugin/trunk/modules/sympal_editor/templates/_tools.php
r16425 r16459 29 29 <div class="hd">Sympal Editor Panel</div> 30 30 <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> 36 32 37 33 <div class="sympal_icon_list"> 38 <h3> Editor Navigation</h3>34 <h3><?php echo $entity['Type']['name'] ?> Editor</h3> 39 35 40 36 <ul> 41 37 <?php if ($entity['locked_by']): ?> 42 38 <?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> 44 40 45 41 <?php if ($sf_request->getParameter('module') == 'sympal_entities'): ?> 46 <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit EntityInline', $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> 47 43 <?php else: ?> 48 <li><?php echo image_tag('/sf/sf_admin/images/edit.png').' '.link_to('Edit EntityBackend', '@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> 49 45 <?php endif; ?> 50 46 … … 53 49 <?php endif; ?> 54 50 <?php else: ?> 55 <li> Entityis 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> 56 52 <?php endif; ?> 57 53 <?php elseif (!$lock): ?> 58 54 <li><?php echo image_tag('/sfSympalPlugin/images/lock.gif').' '.link_to('Obtain Edit Lock', '@sympal_lock_entity?id='.$entity['id']) ?></li> 59 55 <?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> 66 59 <?php endif; ?> 67 60 … … 75 68 <?php endif; ?> 76 69 </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> 77 77 </div> 78 79 <?php if (sfSympalConfig::isI18nEnabled()): ?> 80 <h3>Change Language</h3> 81 <?php echo get_component('sympal_editor', 'language') ?> 82 <?php endif; ?> 78 83 </div> 79 84 </div> plugins/sfSympalPlugin/trunk/modules/sympal_entities/config/generator.yml
r16417 r16459 13 13 config: 14 14 actions: ~ 15 fields: ~ 15 fields: 16 site_id: 17 label: Site 18 entity_type_id: 19 label: Content Type 16 20 form: ~ 17 21 list: 18 title: Manage Entities22 title: Manage Content 19 23 display: [=title, Type, is_published, date_published] 20 24 object_actions: … … 33 37 action: view 34 38 new: 35 title: Create New Entity39 title: Create New Content plugins/sfSympalPlugin/trunk/modules/sympal_entities/templates/editSuccess.php
r16417 r16459 1 1 <?php use_helper('I18N', 'Date') ?> 2 2 <?php include_partial('sympal_entities/assets') ?> 3 4 <?php echo get_menu_item_breadcrumbs($entity->getMainMenuItem(), 'Edit') ?> 3 5 4 6 <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> 2 2 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 ofthat 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> 4 4 5 5 <ul>