View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|12174||Feature requests||Plugins||public||2017-03-07 16:29||2017-03-14 15:03|
|Summary||12174: A global beforeMenuRender|
|Description||In 2.6 : we have https://manual.limesurvey.org/BeforeAdminMenuRender for the top menu|
In 2.6X : we have https://manual.limesurvey.org/BeforeToolsMenuRender for the tool submenu
=> I think we need a global event, starting by some and add new menu after.
event : beforeMenuRender
- menu (survey/token/global/statitics)
- submenu (if set) : tools
- objectid (qid for question / gid for group)
- Maybe action (edit/view for question, edit/view for group)
|Additional Information||After we can remove beforeToolsMenuRender with API broker (then 4.0)|
|Tags||No tags attached.|
Just for your advice/idea here ?
I think i work on it for 2.7 or 3.0 : seems really needed. Maybe not for whole menu (each menu need a different input then own event) but .....
Alternative : construct an extension/menu but : this take really more time (and we don't have submenu event)
1. Do we want plugin devs to be able to put new menu entries anywhere, or should all plugin menus be put in a specific place?
2. Louis would scream about this idea, since he wants a menu system inspired from Joomla. Such a system would register menu entries in the database based on place holder number or such, and XML config. Personally, I feel like both systems - events or XML/database - have the same level of complexity.
3. It would probably be possible to use *one* event for all menus. The event listener must then check one of the input args to the event to know which menu is relevant for this specific event triggering. Edit: Oh, maybe that's what you're suggesting. ^^
For 1 : i really think allowing entry everywhere is a must have. If not : need : Token menu/Response menu/Statistics menu/Question view/Group view
For 2 : XML or event or DB : it's not the point. The point is 'did we need one' , and again : Yii extensions/modules is made in Yii event.
For 3 : yes, it's what i'm suggesting ...
OK, I agree with this design then.
Do we need it? Don't know. :) What's the use-case? Do we have any idea on what the plugin system should NOT be able to do? Well, it's the only way to extend LS, for now, so. :P
Use case : some example
- To be added in statistics menu : https://framagit.org/SondagePro-LimeSurvey-plugin/statsPivotTable and not in Survey/tool sub-menu
- To be added in statictics https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics and not replace statitics
- To be added in browse reponses and view response : https://framagit.org/SondagePro-LimeSurvey-plugin/recomputeExpression (actually an hack to add it in 2.6 version)
- Best in token management : https://framagit.org/SondagePro-LimeSurvey-plugin/sendMailAjax
- Best in token management : https://framagit.org/SondagePro-LimeSurvey-plugin/updateTokenByResponse
PS : we need 2 things
- A way to add menu item
- A way to call 'specic admin part' : for example : call token view except content.
" - A way to call 'specic admin part' : for example : call token view except content. "
How is this different than to render a side-body?
|sidebody add 'Survey menu' if surveyid is set, we need side body with 'token menu' or 'reponse menu' or .....|
Bah. Those menus should be removed anyway... Or at least be collapsed into one bigger drop-down menu.
But OK, I get your point.
You mean this 2 menu (for example) ????
I didn't get it and don't remind of any discussion to remove this specific menu, and what replacement must done
Yeah, but that's just me, there's no discussion about it. See my screenshot in the IRC of the Yahoo user settings web site.
You think the side-body event can be modified to configure which menu to show?
Yes, maybe : what 'layout' must be used.
nothing : global page
surveyid set : survey page
surveyid + page set : page dependent : page can be token/response/ for starting, adding statitics or question ....
But if we remove all if this in 6 month : i didn't work on it ....
|Hm, I don't know if we have any concrete plans for the admin interface at this point.|
|Personally, I'd prefer if LS 4 was Louis doing question object types, but that's only me.|
|Markus has expressed a wish to modify the admin interface. No idea if that will happen.|
|Maybe we should bring it up on the next team meeting, so we can guarantee some stability?|
Example of usage (private plugin, based on https://framagit.org/SondagePro-LimeSurvey-plugin/statsPivotTable)
Capture du 2017-03-14 15-00-13.png (140,430 bytes)
|2017-03-07 16:29||DenisChenu||New Issue|
|2017-03-07 16:31||DenisChenu||Assigned To||=> ollehar|
|2017-03-07 16:31||DenisChenu||Status||new => feedback|
|2017-03-07 16:31||DenisChenu||Note Added: 43190|
|2017-03-08 09:36||ollehar||Note Added: 43211|
|2017-03-08 09:37||ollehar||Note Added: 43212|
|2017-03-08 09:38||ollehar||Note Edited: 43212||View Revisions|
|2017-03-08 10:39||DenisChenu||Note Added: 43213|
|2017-03-08 10:39||DenisChenu||Status||feedback => assigned|
|2017-03-08 10:39||DenisChenu||Assigned To||ollehar =>|
|2017-03-08 10:39||DenisChenu||Status||assigned => new|
|2017-03-08 10:48||ollehar||Note Added: 43214|
|2017-03-08 11:03||DenisChenu||Note Added: 43216|
|2017-03-08 11:05||ollehar||Note Added: 43217|
|2017-03-08 11:12||DenisChenu||Note Added: 43218|
|2017-03-08 11:21||ollehar||Note Added: 43219|
|2017-03-08 11:24||DenisChenu||File Added: Capture du 2017-03-08 11-23-08.png|
|2017-03-08 11:24||DenisChenu||File Added: Capture du 2017-03-08 11-23-34.png|
|2017-03-08 11:24||DenisChenu||Note Added: 43221|
|2017-03-08 11:30||ollehar||Note Added: 43222|
|2017-03-08 11:33||DenisChenu||Note Added: 43223|
|2017-03-08 11:41||ollehar||Note Added: 43224|
|2017-03-08 11:41||ollehar||Note Added: 43225|
|2017-03-08 11:43||ollehar||Note Added: 43226|
|2017-03-08 12:28||ollehar||Note Added: 43227|
|2017-03-14 15:03||DenisChenu||File Added: Capture du 2017-03-14 15-00-13.png|
|2017-03-14 15:03||DenisChenu||Note Added: 43282|