From 4e3c4966f75bfa606278158c9714ea0485ba1471 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Fri, 3 Apr 2015 14:48:43 +0100 Subject: Fix #526 - gender specific pronouns, plus associated cleanup --- app/Module/ClippingsCartModule.php | 393 ++++++++++++++++++++++--------------- 1 file changed, 236 insertions(+), 157 deletions(-) (limited to 'app') diff --git a/app/Module/ClippingsCartModule.php b/app/Module/ClippingsCartModule.php index 2959e40dea..d0cab8d1d6 100644 --- a/app/Module/ClippingsCartModule.php +++ b/app/Module/ClippingsCartModule.php @@ -70,91 +70,241 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface, } if ($clip_ctrl->action == 'add') { - $person = GedcomRecord::getInstance($clip_ctrl->id, $WT_TREE); - echo '

' . $person->getFullName(), '

'; + $record = GedcomRecord::getInstance($clip_ctrl->id, $WT_TREE); if ($clip_ctrl->type === 'FAM') { ?> -
+ + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + +
- - -
+ +
+ + getFullName(); ?> +
+ + getFullName()); ?> +
+ + getFullName()); ?> +
+
-
+ type === 'INDI') { ?> -
+ + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - -

-      

-      

-      
+
+ +
+ +
+ +
+ +
+ +
+       + + +
+ +
+       + + +
+ +
+       + + +
+ +
-
+ type === 'SOUR') { ?> -
+ + + + - - - - + + + + + + + + + + + + + + + + +
- - -
+
+ +
+ +
+ +
+ +
-
+ cart[$WT_TREE->getTreeId()]) { if ($clip_ctrl->action != 'add') { - echo I18N::translate('The clippings cart allows you to take extracts (“clippings”) from this family tree and bundle them up into a single file for downloading and subsequent importing into your own genealogy program. The downloadable file is recorded in GEDCOM format.
'); ?>
- - - - - - - - -
- -
- - - - - - - - -
+ + + + + + + + + + + + +
+ +
+ + + + + + + +
- - - - - - - - - - -
- -
- - - - - - - - -
+ + + + + + + + + + + + + + +
+ +
+ + + + + + + +
@@ -318,7 +471,7 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface, $menu->addSubmenu($submenu); } if (!empty($controller->record) && $controller->record->canShow()) { - $submenu = new Menu(I18N::translate('Add to clippings cart'), 'module.php?mod=clippings&mod_action=index&action=add&id=' . $controller->record->getXref(), 'menu-clippingsadd'); + $submenu = new Menu(I18N::translate('Add to the clippings cart'), 'module.php?mod=clippings&mod_action=index&action=add&id=' . $controller->record->getXref(), 'menu-clippingsadd'); $menu->addSubmenu($submenu); } return $menu; @@ -474,80 +627,6 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface, return $out; } - /** - * @param Individual $person - * - * @return string - */ - public function askAddOptions(Individual $person) { - $MAX_PEDIGREE_GENERATIONS = $person->getTree()->getPreference('MAX_PEDIGREE_GENERATIONS'); - - $out = '

' . $person->getFullName() . '

'; - $out .= ''; - if ($person instanceof Family) { - $out .= '
- - - - - - - - - -
' . I18N::translate('Which other links from this family would you like to add?') . ' - - -
'. I18N::translate('Add just this family record.') . '
'. I18N::translate('Add parents’ records together with this family record.') . '
'. I18N::translate('Add parents’ and children’s records together with this family record.') . '
'. I18N::translate('Add parents’ and all descendants’ records together with this family record.') . '
-
'; - } elseif ($person instanceof Individual) { - $out .= '
- - - ' . I18N::translate('Which links from this individual would you also like to add?') . ' - - - - - -
'; - } else if ($person instanceof Source) { - $out .= '
- - - - - - -
' . I18N::translate('Which records linked to this source should be added?') . ' - - -
'. I18N::translate('Add just this source.') . '
'. I18N::translate('Add this source and families/individuals linked to it.') . '
-
-
'; - } else { - return $this->getSidebarContent(); - } - return $out; - } - /** * @param ClippingsCart $clip_ctrl * -- cgit v1.3