'modified_id.display_name',
'created_date',
'modified_date',
+ 'expires_date',
'has_base',
'base_module:label',
'local_modified_date',
'DATE(created_date) AS date_created',
'DATE(modified_date) AS date_modified',
+ 'DATE(expires_date) AS expires',
'GROUP_CONCAT(display.name ORDER BY display.id) AS display_name',
'GROUP_CONCAT(display.label ORDER BY display.id) AS display_label',
'GROUP_CONCAT(display.type:icon ORDER BY display.id) AS display_icon',
})
);
}
+ ctrl.display.settings.columns.push(
+ searchMeta.fieldToColumn('expires_date', {
+ label: ts('Expires'),
+ title: '[expires_date]',
+ rewrite: '[expires]'
+ })
+ );
ctrl.display.settings.columns.push({
type: 'include',
alignment: 'text-right',
<li>
<textarea class="form-control" placeholder="{{:: ts('Description (shown above default display)') }}" ng-model="$ctrl.savedSearch.description"></textarea>
</li>
+<li>
+ <div class="form-inline" title="{{:: ts('Search Expiry Date') }}">
+ <div class="form-group">
+ <label class="sr-only" for="expires_date">{{:: ts('Search Expiry Date') }}</label>
+ <div class="input-group">
+ <div class="input-group-addon"><i class="crm-i fa-calendar-times-o"></i></div>
+ <input id="expires_date" class="form-control" crm-ui-datepicker="{time: true}" ng-model="$ctrl.savedSearch.expires_date" placeholder="Expires">
+ </div>
+ </div>
+ </div>
+</li>
<li>
<crm-search-admin-tags tag-ids="$ctrl.savedSearch.tag_id" class="btn-group btn-group-sm"></crm-search-admin-tags>
</li>
width: 275px;
}
+/* Style expires_date date/time width */
+#bootstrap-theme.crm-search #expires_date + input,
+#bootstrap-theme.crm-search #expires_date + input + input {
+ width: calc(100% - 30px);
+}
+/* Hide time field if date & time are both empty */
+#bootstrap-theme.crm-search #expires_date + input:placeholder-shown + input:placeholder-shown {
+ display: none;
+}
+
#bootstrap-theme.crm-search div.form-control.disabled,
#bootstrap-theme.crm-search div.form-control.disabled * {
cursor: not-allowed;