<div class="form-inline" ng-if=":: $ctrl.parent.canBeImage(col)">
  <label>
    <input type="checkbox" ng-click="$ctrl.parent.toggleImage(col)" >
    {{:: ts('Image') }}
  </label>
</div>
<div class="form-inline" ng-if=":: !$ctrl.parent.canBeImage(col)">
  <label>
    <input type="checkbox" ng-click="$ctrl.parent.toggleHtml(col)" >
    {{:: ts('Allow HTML') }}
  </label>
</div>
<div class="form-inline" ng-if="!col.rewrite && $ctrl.parent.getSuffixOptions(col)">
  <label for="crm-search-admin-edit-suffix-{{ $index }}">{{:: ts('Format') }}</label>
  <select id="crm-search-admin-edit-suffix-{{ $index }}" class="form-control" ng-model="$ctrl.parent.getSetSuffix($index)" ng-model-options="{getterSetter: true}" title="{{:: ts('Option Format') }}">
    <option value="">{{:: ts('Raw Value') }}</option>
    <option ng-repeat="(k, v) in $ctrl.parent.getSuffixOptions(col)" value="{{k}}">{{ v }}</option>
  </select>
</div>
<div class="form-inline" ng-if="$ctrl.parent.isDate(col.key)">
  <label for="crm-search-admin-edit-date-format-{{ $index }}">{{:: ts('Format') }}</label>
  <select id="crm-search-admin-edit-date-format-{{ $index }}" class="form-control" ng-model="col.format" title="{{:: ts('Date Format') }}">
    <option value="">{{:: ts('Date Format: Default') }}</option>
    <option ng-repeat="(k, v) in $ctrl.parent.dateFormats" value="{{k}}">{{ v }}</option>
  </select>
</div>
<div class="form-inline crm-search-admin-flex-row" >
  <label title="{{:: ts('Display as clickable link') }}" >
    <input type="checkbox" ng-checked="col.link" ng-click="$ctrl.parent.toggleLink(col)" >
    {{:: ts('Link') }}
  </label>
  <select class="form-control" ng-model="col.link.target" ng-if="col.link">
    <option value>{{:: ts('Open normally') }}</option>
    <option value="_blank">{{:: ts('New tab') }}</option>
    <option value="crm-popup">{{:: ts('Popup dialog') }}</option>
  </select>
  <crm-search-admin-link-select ng-if="col.link" link="col.link" on-change="$ctrl.parent.onChangeLink(col, newLink)" api-entity="$ctrl.apiEntity" api-params="$ctrl.apiParams" links="$ctrl.parent.getLinks(col.key)">
  </crm-search-admin-link-select>
</div>
<div class="form-inline crm-search-admin-flex-row">
  <label>
    <input type="checkbox" ng-checked="col.title" ng-click="col.title = col.title ? null : $ctrl.parent.getFieldLabel(col.key)" >
    {{:: ts('Tooltip') }}
  </label>
  <input type="text" class="form-control crm-flex-1" ng-model="col.title" ng-if="col.title" ng-model-options="{updateOn: 'blur'}" />
  <crm-search-admin-token-select ng-if="col.title" model="col" field="title" suffix=":label"></crm-search-admin-token-select>
</div>
<div class="form-inline crm-search-admin-flex-row">
  <label title="{{:: ts('Text to display if the field contents are empty.') }}">
    <input type="checkbox" ng-checked="col.empty_value" ng-click="$ctrl.parent.toggleEmptyVal(col)" >
    {{:: ts('Empty placeholder') }}
  </label>
  <a crm-ui-help="hs({id: 'empty', title: ts('Empty placeholder')})"></a>
  <textarea rows="2" class="form-control crm-flex-1" ng-if="col.empty_value" ng-model="col.empty_value" ng-model-options="{updateOn: 'blur'}"></textarea>
  <crm-search-admin-token-select ng-if="col.empty_value" model="col" field="empty_value" suffix=":label"></crm-search-admin-token-select>
</div>
<div class="form-inline crm-search-admin-flex-row">
  <label title="{{:: ts('Change the contents of this field, or combine multiple field values.') }}">
    <input type="checkbox" ng-checked="col.rewrite" ng-click="$ctrl.parent.toggleRewrite(col)" >
    {{:: ts('Rewrite Text') }}
  </label>
  <a crm-ui-help="hs({id: 'rewrite', title: ts('Rewrite Text')})"></a>
  <textarea rows="2" class="form-control crm-flex-1" ng-if="col.rewrite" ng-model="col.rewrite" ng-model-options="{updateOn: 'blur'}" ng-trim="false"></textarea>
  <crm-search-admin-token-select ng-if="col.rewrite" model="col" field="rewrite" suffix=":label"></crm-search-admin-token-select>
</div>
<div class="form-inline">
  <label ng-if="$ctrl.parent.canBeEditable(col)" title="{{:: ts('Users will be able to click to edit this field.') }}">
    <input type="checkbox" ng-checked="col.editable" ng-click="$ctrl.parent.toggleEditable(col)">
    {{:: ts('In-Place Edit') }}
  </label>
  <label ng-if="!$ctrl.parent.canBeEditable(col)" class="disabled" title="{{:: ts('Read-only or rewritten fields cannot be editable.') }}">
    <input type="checkbox" disabled>
    {{:: ts('In-Place Edit') }}
  </label>
</div>
<search-admin-icons item="col"></search-admin-icons>
<search-admin-css-rules label="{{:: ts('Style') }}" item="col" default="col.key"></search-admin-css-rules>
