We've had a number of bugs around patron name fields.. * Requests for additional fields * Requests for changes in display order * Requests for improved duplicate finding * Requests for improved table sorting I intend to collect opinions here and try to come up with a solution that suits more options.
In bug 21978 comment 9 Christopher Brannon suggests >What if we could just get away from the name structures, and have 5 or 6 generic >name fields (i.e. Name1, Name2, Name3 etc.), and we can label them in the editor >for whatever purpose we need, and on screens they appear in the order that they >are used. For example, Name1 is used as Surname, Name2 is First Name, Name3 is >Middle Name, and so on. Sort will always sort in order of the fields (Name1 >first, Name2 next, and so on), and would display similar to how they appear now: > >In results: >Name1, Name2 [Name3] [Name4] [Name5] [Name6] > >On patron account: >Name2 [Name3] [Name4] [Name5] [Name6] Name1 > I think this approach could work well, but it needs a little thought as to how it would work with de-duplicating and sorting and we may still need to implement display templating on top as currently you can call the patron-title include with various options for different displays in different places. I wonder if we could refine our display to a couple of more formal options.. 'short' and 'long' form perhaps.. right now we have various combinations of options in the template.. like including title or not, othernames, inverse ordering, cardnumber, linking.. etc etc
patron-title.inc currently allows for the following output formats * surname (othernames) * <span class="patron-title">title</span> surname, firstname (othernames) * <span class="patron-title">title</span> firtname (othernames) surname * title surname, firstname (othernames) * title firstname (othernames) surname * surname (othernames) (cardnumber) * <span class="patron-title">title</span> surname, firstname (othernames) (cardnumber) * <span class="patron-title">title</span> firtname (othernames) surname (cardnumber) * title surname, firstname (othernames) (cardnumber) * title firstname (othernames) surname (cardnumber) * cardnumber * <span>A patron from library [% Branches.GetName( patron.branchcode ) | html -%]</span>
*** Bug 24710 has been marked as a duplicate of this bug. ***
There was a try at doing this by surrounding name fields by spans, bug 24710, in the template includes, but it became clear that wasn't an option as the no_html option on the includes, used for title elements, precludes us from using said spans.