$def with (keys, top_books_from_author, formdata=None) $var title: $_("Merge Authors")

$_("Merge Authors")

$if not keys: $# TODO: improve this message. This error comes when no author keys are passed as url parameters.
$_("No authors selected.")
$if formdata: $if not formdata.master:
$_("Please select a primary author record.")
$if len(formdata.selected) == 0:
$_("Please select some authors to merge.")
  1. $_('Select a "primary" record that best represents the author -')
  2. $_('Select author records which should be merged with the primary') -
  3. $_('Press MERGE AUTHORS.')

$_('You must select a primary record to point the duplicates toward.')

$:_('Are you sure you want to merge these records?')

$_('Primary')
$_('Merge')
$_('Authors')
 
$if keys: $ master = formdata and formdata.master or keys[0] $else: $ master = None $for k in keys: $ a = get_document('/authors/' + k) $ top = top_books_from_author(k)
$:radio_input(checked=(k==master), name='master', value=k)
    $for doc in top['books']:
  • $doc.title $ungettext('1 edition', '%(count)d editions', doc.edition_count, count=doc.edition_count), $if doc.get('first_publish_year'): $doc.first_publish_year

   $_('Cancel')