comparison app/helpers/.svn/text-base/messages_helper.rb.svn-base @ 210:0579821a129a

Update to Redmine trunk rev 4802
author Chris Cannam
date Tue, 08 Feb 2011 13:51:46 +0000
parents 513646585e45
children
comparison
equal deleted inserted replaced
128:07fa8a8b56a8 210:0579821a129a
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software 15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 module MessagesHelper 18 module MessagesHelper
19
20 def link_to_message(message)
21 return '' unless message
22 link_to h(truncate(message.subject, :length => 60)), :controller => 'messages',
23 :action => 'show',
24 :board_id => message.board_id,
25 :id => message.root,
26 :r => (message.parent_id && message.id),
27 :anchor => (message.parent_id ? "message-#{message.id}" : nil)
28 end
29 end 19 end