Project

General

Profile

Custom plugin and menu link editable with settings

Added by n4sher n4sher almost 8 years ago

Hi,
I am quite new to redmine and ruby as well, and i am trying to create my plugin.
I have troubles for modifying the link of an item menu with plugin's settings.
I have followed the plugin tutorial.

Here is a my code

file init.rb

Redmine::Plugin.register :button do

..
settings :default => {'empty' => true}, :partial => 'settings/button_settings'
menu :application_menu, 'button', Setting.plugin_button['button_adress'] , :caption => 'button'

end


file plugins\button\app\views\settings\_button_settings.html.erb

<table>

<tbody>

<tr>
<th>Button adress</th>

<td>

<input type="text" id="settings_button_adress"
value="<%= settings['button_adress'] %>"
name="settings[button_adress]" >

</td>

</tr>

</tbody>

</table>

"Setting.plugin_button['button_adress']" is causing the redmine server to crash on start.

I am running Redmine 3.2.1 on apache 2 (windows 7).
What am i doing wrong?
Thank you for your help.