Module viewCRUD ( for Drupal 7 )
This module allows you to add a item menu in a menu to manage your contents by content type.
It offers a useful UI for the end user to manage your content without using the administration UI of the core.
For each content type you select in the configuration of this module, a view is generated.
In this view : Title, edit link and delete link are displayed. In addition, a "Add" tab allows to to a create a new content.
In the creation form of the node, a "List" tab allow you to come back to the view.
By this way, the management of your content is very intuitive for a webmaster.
Link to the project page : http://drupal.org/sandbox/pcorfmat/1721238
Link to git repository : git clone http://git.drupal.org/sandbox/pcorfmat/1721238.git viewcrud
Comments
Comment #1
gellweiler commentedI have enabled your module and tested it out, it seems to work, but I can't really see the purpose of it, as we can do all this via the usual menu. If you think the way the usual menu handles this is not intuitive consider opening an issue in the core issue queue.
Your code is really bad documented, you barely use comments. For example only a few functions have functions comments at all. This is not only a nightmare for all developers that take a look at your code, but is also strictly against Drupal coding standards. Please check your code against this automatic validation tool and do what it tells you, if you want to continue your work.
By the way, you should implement hook_uninstall in the install file and not in the module file.
I've changed the status from needs review to needs works, because it's unreasonable to let somebody to take a look on your code in this condition. And I can't see a use case for this module.
Best regards,
Gellweiler
Comment #2
sudoware commentedThank for your remarks.
I created this module because, in any of the drupal site I have created, I used this code.
The objective was not to replace the usual menu handle. I just want to offer a menu focused on a set of content type to manage. Lots of my clients used this interface without need of any training of Drupal usual menu handles.
But the most important is the generation of the view and the use of the tabs in the view. These views are automatically created and then can be edited if you want customization.
I also watched several tutorials on "tab in views" with the same interface.
Just two click and you have your menu, your view for the content type you want. For me, it a real saving time.
With the usual menu handle you don't need the view module. With my module, you need it. It why I think opening an issue in the core issue queue is not needed.
Sorry for the documentation, It my first contribution and I did not work enought this aspect. I will check my code and change the implementation of the hook_uninstall.
Best regards
Comment #3
sudoware commentedI corrected the module code by using PHP_CodeSniffer.
The code is now documented and follows the Drupal coding standards.
In addition of my previous comment, I just want to focus that this module allow the creation of tabs "List" and "Add" in a view and in the node form without the need of writing a custom module. It's not possible with the usual menu.
Best regards
Comment #4
AmbikaFR commentedhi sudoware,
Very nice module idea :)
I ve made a manual review of your code. Here are my minor suggestions/remarks :
- In module file, i suggest to remove viewcrud_variable_get which is not very useful. You can directly use variable_get function. The default value can be define only one time with a global variable for example.
- If i check a content type, and save the form in settings, the view is created. Then, if i uncheck a content type, the view is not deleted. You can get the view with views_get_view and then make call of delete function, in views main class.
http://drupalcontrib.org/api/drupal/contributions%21views%21views.module...
http://api.drupal.org/api/views/includes!view.inc/function/view%3A%3Adel...
- You don't need a require_once instruction for your viewcrud.admin.inc file. You can add a 'file' entry in your 'admin/config/viewcrud' definition to your viewcrud.admin.inc file.
Comment #5
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.