Hi,
I was working with your module. First of all, congratulations for it, it's a very good and usable module.
In the project we're working, we need to delete all terms before a new import is made, because our we thought that in the case the new file imported has terms deleted from the last import, they will already appear, and we don't want them to appear more in the application.
I'll implement a basic solution adding a submit function before the import ones to delete all terms for the vocabulary, but it would be great to have an option to delete all before import.
Also we need to give permissions to a role only for import, and we didn't want to give him the administer taxonomy perm, so we made a hook_menu_alter to modify the admin/content/taxonomy/csv_import access callback and access arguments, and add own perms, maybe is an idea to improve module permissions in the future. Sorry for my english, if you don't understand something, please let me know to try to explain it better.
Thanks in advance,
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | patch.txt | 1.42 KB | ericpalace |
Comments
Comment #1
Daniel_KM commentedHi,
Thank you for your congratulations.
I'm going to add a "delete option" in the vocabulary group of options. Currently, I use devel generate sub-module, part of Devel (which allows to generate items, but also to delete).
About permissions, there was a specific access right in an old previous release, but it appeared not very useful because Taxonomy csv is designed as a one time module: you use it then you uninstall it (see remarks about differences with Taxonomy builder api).
Nevertheless I can reintroduce it. I can commit your code if you publish it here or if you send it to me.
Sincerely,
Daniel Berthereau
Infodoc, Digital humanities & Knowledge management
Comment #2
Daniel_KM commentedHi,
I've just committed a patch to allow deletion of terms before an import for 6.x-5.x and 7.x-5.x dev releases.
For permissions, I wait your patch.
Sincerely,
Daniel Berthereau
Infodoc, Digital humanities & Knowledge management
Comment #3
Daniel_KM commentedComment #4
ericpalace commentedHi Daniel,
Thanks for you new release, I've updated the module right now in my project, and delete all the code that was doing this, jeje!
I'll post my patch when I've a little bit of time for this.
Many thanks another time!!!
Comment #5
ericpalace commentedHere you have the patch.
I added:
hook_menu_alter to modify the user_access of you menu options
hook_perm to add new perms for import and export
function to call from the import menu when access
function to call from the export menu when access
I hope it helps you!!! Anything please contact me!
Comment #6
Daniel_KM commentedHi,
Thanks for your patch. I'm going to commit it in the beginning of December.
Sincerely,
Daniel Berthereau
Infodoc & Knowledge management
Comment #7
Daniel_KM commentedHi,
I commited your patch. Note that I simplified it, because I don't need to alter my own menu...
Sincerely
Daniel Berthereau
Infodoc & Knowledge management