Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
FatFreeCRM
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nathan Broadbent  
View profile  
 More options Dec 14 2011, 2:53 am
From: Nathan Broadbent <nathan....@gmail.com>
Date: Wed, 14 Dec 2011 15:53:01 +0800
Local: Wed, Dec 14 2011 2:53 am
Subject: Re: FatFreeCRM

Hi Chris,

Fat Free CRM supports a simple 'hooks' architecture that allows plugins to
add things to views. I'm sorry it's not very well documented, but I'll try
to give you an example. (As a side-note, I'd recommend renaming your plugin
soon to something like 'crm_products', so I'll use crm_products as an
example :) )
Here's a demo of how to extend the opportunities/show.html.haml template
from a plugin:

1. Create a file in your plugin directory, at
'lib/crm_products/products_view_hooks.rb'

2. Open the file you just created, and add the following code:

    class ProductViewHooks < FatFreeCRM::Callback::Base
        insert_after :show_opportunity_bottom do |view, context|
          view.render :partial => "/opportunities/quotes", :locals => {:f
=> context[:f]}
        end
    end

:show_opportunity_bottom is the hook that is available in
opportunities/show.html.haml

3. In your plugin directory, edit 'lib/crm_products.rb', and add the
following line:

    require 'crm_products/products_view_hooks'

4. Finally, create a view partial in your plugin directory, at
'app/views/opportunities/quotes.html.haml'. Edit this file, and add your
additional section.

Hope that helps!

Regards,
Nathan B

On Tue, Dec 13, 2011 at 10:42 AM, Chris Pelon <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Kenworthy  
View profile  
 More options Dec 14 2011, 9:44 pm
From: Steve Kenworthy <stevey...@gmail.com>
Date: Thu, 15 Dec 2011 10:44:58 +0800
Local: Wed, Dec 14 2011 9:44 pm
Subject: Re: [fat-free-crm-users:659] Re: FatFreeCRM

The docs here might also help a bit more too.

https://github.com/fatfreecrm/fat_free_crm/wiki/Callback-hooks

steve

On Wed, Dec 14, 2011 at 3:53 PM, Nathan Broadbent <nathan....@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »