https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292012-05-29T17:32:52ZRedmineRedmine - Feature #11041: Add "how to add votes settings" into the plugin tutorialhttps://www.redmine.org/issues/11041?journal_id=385342012-05-29T17:32:52ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Well, it's just standard Rails coding and not specific to Redmine plugins. Is it really worth?</p> Redmine - Feature #11041: Add "how to add votes settings" into the plugin tutorialhttps://www.redmine.org/issues/11041?journal_id=385482012-05-30T06:33:40ZAntoine Rodriguez
<ul></ul><p>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.</p>
<p>(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)</p> Redmine - Feature #11041: Add "how to add votes settings" into the plugin tutorialhttps://www.redmine.org/issues/11041?journal_id=385742012-05-30T18:22:37ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Antoine Rodriguez wrote:</p>
<blockquote>
<p>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</p>
</blockquote>
<p>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?</p> Redmine - Feature #11041: Add "how to add votes settings" into the plugin tutorialhttps://www.redmine.org/issues/11041?journal_id=386192012-06-01T10:05:39ZAntoine Rodriguez
<ul></ul><p>I think I'm not getting well then the structure of redmine (and ruby on rails) yet.</p>
<ul>
<li>the tutorial show how to realise an action from the view layer to the controler.</li>
<li>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 ? )</li>
</ul>
<p>Being more specific :<br />- 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.</p>
<ol>
<li>For the role part the tutorial is quite clear I agree.</li>
<li>For adding a value I think that the same function typed in the ruby console will work "as it is" inside the model.</li>
<li>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.</li>
<li>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</li>
<li>What are the tools that redmine offers us in order to distinguish one project from another ?</li>
</ol>
<p>Again I'm terriby sorry if those questions looks stupid, I'm quite new in the redmine world.</p>
<p>Best regards,</p>