{$wrapper_id = uniqid('crm-contact-segment-list-edit-wrapper-')} {$segment.icon = $segment.icon|default:'contact'} {$segment.type = $segment.type|default:crmSegmentModel::TYPE_CATEGORY} {$icons_array = [ "folder" => "", "search" => "", "user" => "", "blog" => "", "notebook" => "", "lock" => "", "lock-unlocked" => "", "broom" => "version()}#clean\">", "star" => "", "livejournal" => "", "contact" => "", "lightning" => "", "light-bulb" => "", "pictures" => "", "reports" => "", "books" => "", "marker" => "", "lens" => "version()}#lens\">", "alarm-clock" => "version()}#alarm\">", "animal-monkey" => "version()}#monkey\">", "anchor" => "", "bean" => "version()}#coffee-beans\">", "car" => "", "disk" => "", "cookie" => "", "burn" => "", "clapperboard" => "version()}#clapper\">", "bug" => "", "clock" => "", "cup" => "", "home" => "", "fruit" => "", "luggage" => "", "guitar" => "", "smiley" => "", "sport-soccer" => "", "target" => "", "medal" => "", "phone" => "", "store" => "", "basket" => "", "pencil" => "", "lifebuoy" => "", "screen" => "", "noname" => "" ]}

{strip} {if $segment.id > 0} [`Edit segment`] {else} [`Create segment`] {/if} {/strip}

[`Name`]
{if $segment.id <= 0} {if $segment.type === crmSegmentModel::TYPE_CATEGORY}
{else} {/if} {/if}
[`Access`]
{if $segment.id > 0}
{if $segment.type === crmSegmentModel::TYPE_SEARCH}

[`This list is the search result:`] {$segment.search_info.title} {if $segment.contact_id && $segment.contact_id !== '0'}
[`Created by`] {$segment.contact.name|escape}, {$segment.create_datetime|wa_date:'humandatetime'} {/if}

{elseif ($segment.type === 'category')} {if $segment.system_id}

[`This list is based on a category transferred from the standard version of the Contacts app.`] {sprintf('[`Contact entries in this category are created and updated automatically by the %s app.`]', $segment.app_name|default:'')}

{elseif $segment.app_id}

{sprintf('[`This list is based on a category created in the %s app.`]', $segment.app_name|default:'')} {sprintf('[`To change settings or delete this category use appropriate tools of the %s app.`]', $segment.app_name|default:'')}

{else} [`This list consists of selected contacts. To add/remove contacts use “Actions with selected” menu.`]
[`Created by`] {$segment.contact.name|escape}, {$segment.create_datetime|wa_date:'humandatetime'} {/if} {/if}
{/if}
{if $segment.id > 0} {else} {/if} {* Default close link, need in all cases except one, see below comment *} [`Cancel`] {* This link special treated in double-dialog case, see CRMContactsOperationAddToSegments class *}
{* Delete segment link, see CRMContactSegmentEdit *} {if $segment.id > 0} [`Delete segment`] {/if}