Hi Wang,
[snip]
I'm looking forward testing your work !
Now the plugin can work. However it's a little
complicate. If you want to
convert a office document
1. you first upload the document
2. copy the attachment name(because the name of document change after
upload)
3. edit the page and add the velocity code to use the importer plugin
4. save and view.
I think it should be more simple.
So do I :-)
There is 2 ways we can go about doing this : the page action way and the
application way.
1. Page action : we add an "import" action in the menu at the top of the
page (and maybe in the WYSIWYG editor as well). When clicking on the button,
the user is prompted to choose a compatible file on his machine, then he
clicks on "import" (with an interface similar to the one used for uploading
attachments). The .../bin/import/Main/... is called, and the content from
the file appended at the bottom of the existing page, with a #info('') macro
at the top saying something like "The following content has been imported to
the page :"
2. Application : we create an OfficeImport application with the following
components : a homepage where the user is prompted to import one or multiple
documents. The documents are then imported, each creting its own wiki page.
Once the importation is complete, the user is prompted to move the documents
to their new locations (using the Rename or the copy feature to implement
this)
The benefits of going the page way is that it's probably more intuitive for
users. However it means adding core changes = less flexibility in the long
run. And the action bar already has a lot of items ;-)
OTOH going the application way woud make the application easier to setup
(plugin + XAR), store all the pages in a dedicated place and make it
possible to import many documents at once and sort things out at a later
stage. However it makes it a bit longer to import a file to a given page and
might be less intuitive...
WDYT ?
Guillaume