Monday, October 6, 2014

Last fiddlings on ticket docs/tickets/122.

The welfare.pcsw.Client model had an action button in its toolbar which opened the lino.modlib.excerpts.ExcerptsByOwner slave table. This button was disturbing because it shows only the excerpts which are directly owned (like “CV” and “eID content”) and is functionally represented by the lino.modlib.excerpts.ExcerptsByProject panel in the “History” tab.

Solution: Lino no longer adds this button automtically. If you want to make the excerpt history visible from a model, add yourself your preferred variant of this action.

The lino.modlib.excerpts.ExcerptsByProject table now inherits from lino.modlib.excerpts.ExcerptsByOwner and thus gets its get_slave_summary and slave_grid_format. Optimized this get_slave_summary to use Django’s naturaltime() function and to display a more intuitive text for every link.

The lino.modlib.excerpts.Certifiable.printed field now also uses Django’s naturaltime() function.

git pull in Eupen.

Editing document template of an excerpt

The edit_template action didn’t yet work correctly in cases with more than one template group: it considered only the first group. Result was that it told me that it must make a copy of the file into the local config directory, although such a copy already existed. The explanation was that it existed in config/excerpts and not in config/Confirmation.

It took me already quite some time to find the explanation:

  • The rt.find_config_file() and rt.find_template_config_files() functions are now accessible via lino.rt.
  • I started to change the diag command: it no longer writes a summary of the database content but a summary of local settings and environment.

Then I made some subtle changes the the EditTemplate action in order to make it testable and write a test case:

May 22nd 2014

Oops, the production server had lino.core.site.Site.the_demo_date non-empty. And the users noticed this at a place where it took me at least 15 minutes to understand that this was the only reason.