예제 #1
0
 /**
  * Edit menu items used in media list
  *
  * @param Media $mediaobject
  *
  * @return string
  */
 public static function getMediaListMenu(Media $mediaobject)
 {
     $html = '';
     $menu = new Menu(I18N::translate('Edit details'), '#', 'lb-image_edit', array('onclick' => 'return window.open("addmedia.php?action=editmedia&pid=' . $mediaobject->getXref() . '", "_blank", edit_window_specs);'));
     $html .= '<ul class="makeMenu lb-menu">' . $menu->getMenuAsList() . '</ul>';
     $menu = new Menu(I18N::translate('Manage links'), '#', 'lb-image_link', array('onclick' => 'return false;'), array(new Menu(I18N::translate('Link this media object to an individual'), '#', '', array('onclick' => 'return ilinkitem("' . $mediaobject->getXref() . '","person");')), new Menu(I18N::translate('Link this media object to a family'), '#', '', array('onclick' => 'return ilinkitem("' . $mediaobject->getXref() . '","family");')), new Menu(I18N::translate('Link this media object to a source'), '#', '', array('onclick' => 'return ilinkitem("' . $mediaobject->getXref() . '","source");'))));
     $html .= '<ul class="makeMenu lb-menu">' . $menu->getMenuAsList() . '</ul>';
     $menu = new Menu(I18N::translate('View details'), $mediaobject->getHtmlUrl(), 'lb-image_view');
     $html .= '<ul class="makeMenu lb-menu">' . $menu->getMenuAsList() . '</ul>';
     return '<div class="lightbox-menu">' . $html . '</div>';
 }
예제 #2
0
 /**
  * Add markup to an item in the secondary menu.
  *
  * @param Menu $menu
  *
  * @return string
  */
 protected function formatSecondaryMenuItem(Menu $menu)
 {
     return $menu->getMenuAsList();
 }