Search
Project
General
Profile
Home
Projects
Help
Sign in
Register
Search
:
Redmine
All Projects
Redmine
Overview
Download
Activity
Roadmap
Issues
News
Wiki
Plugins
Forums
Repository
Download (887 Bytes)
RE: How to get a string from Proc.new
ยป init.rb
Yuki Kita
, 2010-04-05 02:16
require
'redmine'
RAILS_DEFAULT_LOGGER
.
info
'Menu Link plugin 0.0.1 for Redmine'
Redmine
::
Plugin
.
register
:menu_link
do
name
'Menu Link Plugin'
author
'Tide'
description
'A plugin which adds a link to the top menu of Redmine.'
version
'0.0.1'
settings
:default
=>
{
'link_item_text'
=>
'http://www.redmine.org'
,
'link_item_name'
=>
'Example Link'
,
'new_window'
=>
'0'
},
:partial
=>
'settings/menulink_settings'
end
if
Setting
.
plugin_menu_link
[
'new_window'
]
==
"0"
Redmine
::
Plugin
.
find
(
'menu_link'
).
menu
(
:top_menu
,
:link
,
"http://www.google.com"
,
:caption
=>
Proc
.
new
{
Setting
.
plugin_menu_link
[
'link_item_name'
]
})
else
Redmine
::
Plugin
.
find
(
'menu_link'
).
menu
(
:top_menu
,
:link
,
"http://www.google.com"
,
:caption
=>
Proc
.
new
{
Setting
.
plugin_menu_link
[
'link_item_name'
]
},
:html
=>
{
:target
=>
'_blank'
})
end
(1-1/1)
Loading...