Add "how to add votes settings" into the plugin tutorial
In order to complete the Plugin_tutorial
It would be great to show how to add the settings in order to add new votes via the web interface in a per project basis.
For the moment this is shown only via the ruby console.
#2 Updated by Antoine Rodriguez about 6 years ago
It may be interesting if you show how to add and remove questions inside a project tab that is only shown to those who have the privilege to add/remove questions in that project.
(the only help found in this matter shows that we must overload redmine core files witch is not a pretty method due to the fact that it works only once per redmine)
#3 Updated by Jean-Philippe Lang about 6 years ago
Antoine Rodriguez wrote:
the only help found in this matter shows that we must overload redmine core files witch is not a pretty method due to the fact that it works only once per redmine
I don't get that. Adding crud actions for managing polls to the PollsController already present in the tutorial does not require to overload anything, does it?
#4 Updated by Antoine Rodriguez about 6 years ago
I think I'm not getting well then the structure of redmine (and ruby on rails) yet.
- the tutorial show how to realise an action from the view layer to the controler.
- the controler calls a method "increment" that impact the model layer. (here it's not really clear to me if it's a function of redmine or of ruby on rails. If it's the second option then where is the method that updates the database inside the model layer ? inside the inheritance of ActiveRecord::Base ? )
Being more specific :
- How to add various questions, some only shown in one project and others shown in another projects. Both managed by the project settings and roles.
- For the role part the tutorial is quite clear I agree.
- For adding a value I think that the same function typed in the ruby console will work "as it is" inside the model.
- For the settings menu part (for adding or removing questions to the project) : We have a small view of it in the tutorial. From what I've seen we can add a tab to the project but not on the project settings where it logicaly belongs because it's a management task.
- Again with the settings tab we must be able to show it or not depending on a privilege. However I don't think that privileges can be understood inside the init.rb file
- What are the tools that redmine offers us in order to distinguish one project from another ?
Again I'm terriby sorry if those questions looks stupid, I'm quite new in the redmine world.