Closed (fixed)
Project:
Coffee
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 Feb 2012 at 12:24 UTC
Updated:
28 Mar 2014 at 12:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kalman.hosszu commentedI created the patch.
I create separate commits to distinct the development parts. You can add it by using:
Cheers,
Kálmán
Comment #2
michaelmol commentedI like the idea to select the menus to include in Coffee.
I would prefer an option to select the menus per role, although there is a access check on each item. This will speed up the initial search.
For example;
So that the role anonymous only search in navigation.
And a content editor can also search in the management menu.
Comment #3
kalman.hosszu commentedHi,
It would be a default settings and a per role settings. The user's who is in more role, the menus would be merged.
What's your opinion? Could I help you in the development?
Best,
Kálmán
Comment #4
michaelmol commentedThe patch fails when applying it to the 7.x-1.x branch.
You can help development by creating patches and suggest feature request.
When maartenverbaarschot and i decide to accept new co-maintainers we will let you know.
Comment #5
michaelmol commentedComment #6
michaelmol commentedComment #7
kalman.hosszu commentedThere was a conflict on hook file because the patch created before you added the ordering so we modified the same line.
The conflict is resolved, the new patch attached.
Kálmán
Comment #8
michaelmol commentedYour patch results in an error when reaching the admin/config/administration/coffee page (at least in d7.12 minimal, not tested elsewhere).
Besides that make use of the DBTNG http://api.drupal.org/api/drupal/includes%21database%21database.inc/grou... instead of using db_query.
To make a list of menus make use of Drupal functions like: http://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_get_n...
Comment #9
kalman.hosszu commentedHi,
In static queries we should use db_query, for example I copied the query from the core menu module. The problem was that the "menu" module is not enabled during minimal Drupal installation.
The menu_get_names() function returns only with the menus machine names so I think we should use menu_get_menus() core function, but it's in "menu" module too, so I added the "menu" module to the dependencies array in info file.
The modifications what I created:
Comment #10
kalman.hosszu commentedSorry, wrong file attached before.
Check this one.
Kálmán
Comment #11
michaelmol commentedgetting close in
coffee_admin_page() you still make use of the query instead of menu_get_menus()
Comment #12
kalman.hosszu commentedI cloned the repository with
And downloaded the patch atteched in #10 and added the command:
git am menu-supporting-1435460-10.patchand everything works fine, the coffee_admin_page() function use menu_get_menus().
Any problem?
Comment #13
heylookalive commentedThis has now been done in the dev 2.x branch. There are new permissions and we now have a settings form, all works happily.