def discuss(r, **attr):
    ' Custom Method to manage the discussion of a Problem or Solution '
    if r.component:
        resourcename = 'solution'
        id = r.component_id
    else:
        resourcename = 'problem'
        id = r.id
    rheader = problem_rheader(r)
    ckeditor = URL(c='static', f='ckeditor', args='ckeditor.js')
    s3.scripts.append(ckeditor)
    adapter = URL(c='static', f='ckeditor', args=['adapters', 'jquery.js'])
    s3.scripts.append(adapter)
    js = ''.join(('i18n.reply="', str(T('Reply')), '"\nvar img_path=S3.Ap.concat(\'/static/img/jCollapsible/\')\nvar ck_config={toolbar:[[\'Bold\',\'Italic\',\'-\',\'NumberedList\',\'BulletedList\',\'-\',\'Link\',\'Unlink\',\'-\',\'Smiley\',\'-\',\'Source\',\'Maximize\']],toolbarCanCollapse:false,removePlugins:\'elementspath\'}\nfunction comment_reply(id){\n $(\'#delphi_comment_solution_id__row\').hide()\n $(\'#delphi_comment_solution_id__row1\').hide()\n $(\'#comment-title\').html(i18n.reply)\n var ed = $(\'#delphi_comment_body\').ckeditorGet()\n ed.destroy()\n $(\'#delphi_comment_body\').ckeditor(ck_config)\n $(\'#comment-form\').insertAfter($(\'#comment-\'+id))\n $(\'#delphi_comment_parent\').val(id)\n var solution_id=$(\'#comment-\'+id).attr(\'solution_id\')\n if(undefined!=solution_id){\n  $(\'#delphi_comment_solution_id\').val(solution_id)\n }\n}'))
    s3.js_global.append(js)
    response.view = 'delphi/discuss.html'
    return dict(rheader=rheader, resourcename=resourcename, id=id)
Custom Method to manage the discussion of a Problem or Solution
def discuss(r, **attr):
    '  '
    if r.component:
        resourcename = 'solution'
        id = r.component_id
    else:
        resourcename = 'problem'
        id = r.id
    rheader = problem_rheader(r)
    ckeditor = URL(c='static', f='ckeditor', args='ckeditor.js')
    s3.scripts.append(ckeditor)
    adapter = URL(c='static', f='ckeditor', args=['adapters', 'jquery.js'])
    s3.scripts.append(adapter)
    js = .join(('i18n.reply="', str(T('Reply')), '"\nvar img_path=S3.Ap.concat(\'/static/img/jCollapsible/\')\nvar ck_config={toolbar:[[\'Bold\',\'Italic\',\'-\',\'NumberedList\',\'BulletedList\',\'-\',\'Link\',\'Unlink\',\'-\',\'Smiley\',\'-\',\'Source\',\'Maximize\']],toolbarCanCollapse:false,removePlugins:\'elementspath\'}\nfunction comment_reply(id){\n $(\'#delphi_comment_solution_id__row\').hide()\n $(\'#delphi_comment_solution_id__row1\').hide()\n $(\'#comment-title\').html(i18n.reply)\n var ed = $(\'#delphi_comment_body\').ckeditorGet()\n ed.destroy()\n $(\'#delphi_comment_body\').ckeditor(ck_config)\n $(\'#comment-form\').insertAfter($(\'#comment-\'+id))\n $(\'#delphi_comment_parent\').val(id)\n var solution_id=$(\'#comment-\'+id).attr(\'solution_id\')\n if(undefined!=solution_id){\n  $(\'#delphi_comment_solution_id\').val(solution_id)\n }\n}'))
    s3.js_global.append(js)
    response.view = 'delphi/discuss.html'
    return dict(rheader=rheader, resourcename=resourcename, id=id)