dokuwiki-plugin-data icon indicating copy to clipboard operation
dokuwiki-plugin-data copied to clipboard

Support for odt export in datatable and datalist

Open andyboeh opened this issue 9 years ago • 14 comments

We needed to export a big datatable to ODT and were quite surprised to find out that the data plugin currently doesn't support rendering to odt. This PR adds basic support for datatable and datalist (untested).

Before I continue fixing the remaining options in the helper's _formatData(), could somebody please comment on this?

andyboeh avatar Jul 13 '15 11:07 andyboeh

Nice idea, looks fine for me.

Klap-in avatar Jul 13 '15 21:07 Klap-in

Thanks. I tried to fix a few more options in _formatData, but this way I'm definitely losing the title attribute when rendering type 'tag'.

andyboeh avatar Jul 14 '15 08:07 andyboeh

@andyboeh this currently breaks tests. Can you please look into it?

splitbrain avatar Jul 15 '15 14:07 splitbrain

I just noticed that it doesn't only break tests, it even changes the behaviour of the _formatData function. The reason is that $R->internallink has an option returnonly, which is not present for $R->emaillink and $R->externallink. Now _formatData sometimes renders to $R->doc directly instead of returning the rendered code.

However, IMHO using the renderer's emaillink and externallink function is necessary to support different renderers. Would it be possible to add a returnonly option to emaillink and externallink?

andyboeh avatar Jul 15 '15 15:07 andyboeh

sure. open a PR

splitbrain avatar Jul 15 '15 15:07 splitbrain

This now needs splitbrain/dokuwiki/pull/1239 to be merged before the tests succeed.

andyboeh avatar Jul 15 '15 17:07 andyboeh

Does missing of the update provided by #1239 breaks existing, not yet updated, wikis? In that case a (temporary) fallback is required as well.

Klap-in avatar Jul 15 '15 20:07 Klap-in

Yes, I think it's going to break older wikis - I'll test that.

andyboeh avatar Jul 15 '15 22:07 andyboeh

Updated the documentation and added a check for the DokuWiki version. It runs either the old or the new formatting functionality, based on the Wiki version.

andyboeh avatar Jul 29 '15 12:07 andyboeh

Ich kehre zur�ck am 10.08.2015.

Ich werde Ihre Nachricht nach meiner R�ckkehr beantworten. Herzlichen Dank f�r ihr Verst�ndnis.

I will answer your message after returning.

Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht "Re: [dokuwiki-plugin-data] Support for odt export in datatable and datalist (#169)" gesendet am 29.07.2015 14:55:24.

Diese ist die einzige Benachrichtigung, die Sie empfangen werden, w�hrend diese Person abwesend ist.

stvoigt avatar Jul 29 '15 14:07 stvoigt

Regarding the failing test: I honestly believe that the output of the new _formatData function is valid (according to the HTML spec), although the output changes slightly (not visibly!).

andyboeh avatar Jul 30 '15 19:07 andyboeh

Ich kehre zur�ck am 10.08.2015.

Ich werde Ihre Nachricht nach meiner R�ckkehr beantworten. Herzlichen Dank f�r ihr Verst�ndnis.

I will answer your message after returning.

Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht "Re: [dokuwiki-plugin-data] Support for odt export in datatable and datalist (#169)" gesendet am 30.07.2015 21:45:50.

Diese ist die einzige Benachrichtigung, die Sie empfangen werden, w�hrend diese Person abwesend ist.

stvoigt avatar Jul 30 '15 20:07 stvoigt

This should fix the remaining tests. I had to change the output of the tag generation in _formatDataOld as well as URL extern generation. As an alternative, I could make the tests conditional, which was necessary for external link generation in _formatDataOld.

Before tests succeed, PR splitbrain/dokuwiki/pull/1275 needs to be merged. Afterwards, the date checks need to be updated (note to myself).

andyboeh avatar Jul 31 '15 06:07 andyboeh

Date checks should be up to date now and tests pass - any further comments?

andyboeh avatar Aug 31 '15 10:08 andyboeh