{$_title = "[`Deal sources`]"} {function render_sources type=''} {$_sources = $sources[$type]|default:[]} {if !empty($_sources)} {else} {if $type === crmSourceModel::TYPE_EMAIL}

[`Set up an email address to receive messages and deal requests.`]

{/if} {if $type === crmSourceModel::TYPE_FORM}

[`Create a form and publish it on your website for visitors to easily initiate new deals.`]

{/if} {if $type === crmSourceModel::TYPE_IM}

[`Set up connection to instant messengers to receive deal requests and messages.`]

{/if} {/if} {/function} {function render_forms} {if !empty($forms)} {else}

[`Create a form and publish it on your website for visitors to easily initiate new deals.`]

{/if} {/function} {function render_plugin_source_links type=''} {foreach $plugins as $plugin} {if $type == $plugin.source.type}
  • {sprintf('[`Add %s source`]', $plugin.name|escape)}
  • {/if} {/foreach} {/function} {function if_no_plugins_of_type type='' if_html='' else_html=''} {$cnt = 0} {foreach $plugins as $plugin} {if $type == $plugin.source.type} {$cnt = $cnt + 1} {/if} {/foreach} {if $cnt > 0}{$if_html}{else}{$else_html}{/if} {/function}

    {$_title}