Commit fde96e00 authored by Mathieu Lutfy's avatar Mathieu Lutfy Committed by Aegir user

Update extendedreports ext

parent ee525db0
......@@ -4,7 +4,6 @@
* Class CRM_Extendedreport_Form_Report_ActivityExtended
*/
class CRM_Extendedreport_Form_Report_ActivityEditable extends CRM_Extendedreport_Form_Report_ExtendedReport {
//todo move def to getActivityColumns
/**
* @var array
*/
......@@ -26,13 +25,10 @@ class CRM_Extendedreport_Form_Report_ActivityEditable extends CRM_Extendedreport
* Class constructor.
*/
public function __construct() {
$this->_columns = $this->getColumns('Activity', array('fields_defaults' => array('activity_type_id', 'details', 'subject')))
+ $this->getColumns('Contact', array('prefix' => 'target_'));
$this->_columns['civicrm_activity']['fields']['id'] = array(
'title' => 'id',
'required' => TRUE,
'type' => CRM_Utils_Type::T_INT,
);
$this->_columns = $this->getColumns('Activity', ['fields_defaults' => ['activity_type_id', 'details', 'subject']])
+ $this->getColumns('Contact', ['prefix' => 'target_']);
$this->_columns['civicrm_activity']['metadata']['activity_id']['required'] = TRUE;
$this->_columns['civicrm_activity']['metadata']['activity_id']['no_display'] = TRUE;
parent::__construct();
}
......
......@@ -11,37 +11,25 @@ class CRM_Extendedreport_Form_Report_ActivityPivot extends CRM_Extendedreport_Fo
protected $_aggregatesIncludeNULL = TRUE;
protected $_aggregatesAddTotal = TRUE;
protected $_rollup = 'WITH ROLLUP';
public $_drilldownReport = array();
protected $_potentialCriteria = array();
public $_drilldownReport = [];
protected $_potentialCriteria = [];
protected $_noFields = TRUE;
/**
* Class constructor.
*/
public function __construct() {
$this->_customGroupExtended['civicrm_activity'] = array(
'extends' => array('Activity'),
$this->_customGroupExtended['civicrm_activity'] = [
'extends' => ['Activity'],
'filters' => TRUE,
'title' => ts('Activity'),
);
];
$this->_columns = $this->getColumns('Activity', array(
$this->_columns = $this->getColumns('Activity', [
'fields' => FALSE,
)
]
)// + $this->getColumns('Contact', array())
;
$this->_aggregateRowFields = array(
'activity:activity_activity_type_id' => 'Activity Type',
'activity:activity_status_id' => 'Activity Status',
'activity:activity_result' => 'Activity Result',
'activity:activity_subject' => 'Activity Subject',
// 'civicrm_contact_civireport:gender_id' => 'Gender',
);
$this->_aggregateColumnHeaderFields = array(
'activity:activity_activity_type_id' => 'Activity Type',
'activity:activity_status_id' => 'Activity Status',
);
parent::__construct();
}
......@@ -51,6 +39,6 @@ class CRM_Extendedreport_Form_Report_ActivityPivot extends CRM_Extendedreport_Fo
* @return array
*/
public function fromClauses() {
return array();
return [];
}
}
......@@ -32,6 +32,8 @@ class CRM_Extendedreport_Form_Report_Campaign_CampaignProgressReport extends CRM
'is_group_bys' => TRUE,
'is_order_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
'options' => $this->_getOptions('Contribution', 'financial_type_id'),
],
'total_amount' => [
......@@ -44,6 +46,8 @@ class CRM_Extendedreport_Form_Report_Campaign_CampaignProgressReport extends CRM
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
],
'paid_amount' => [
'title' => ts('Amount received'),
......@@ -55,6 +59,8 @@ class CRM_Extendedreport_Form_Report_Campaign_CampaignProgressReport extends CRM
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
],
'balance_amount' => [
'title' => ts('Amount outstanding'),
......@@ -66,6 +72,8 @@ class CRM_Extendedreport_Form_Report_Campaign_CampaignProgressReport extends CRM
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
],
'is_pledge' => [
'title' => ts('Type'),
......@@ -88,6 +96,8 @@ class CRM_Extendedreport_Form_Report_Campaign_CampaignProgressReport extends CRM
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
],
'effective_date' => [
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
......@@ -99,6 +109,8 @@ class CRM_Extendedreport_Form_Report_Campaign_CampaignProgressReport extends CRM
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
],
];
......
......@@ -44,13 +44,6 @@ class CRM_Extendedreport_Form_Report_Case_ActivityPivot extends CRM_Extendedrepo
$this->_columns['civicrm_contact']['fields']['gender_id']['no_display'] = TRUE;
$this->_columns['civicrm_contact']['fields']['gender_id']['title'] = 'Gender';
$this->_aggregateRowFields = array(
'case_civireport:id' => 'Case',
'civicrm_contact_civireport:gender_id' => 'Gender',
);
$this->_aggregateColumnHeaderFields = array(
'civicrm_contact_civireport:gender_id' => 'Gender',
);
$this->_tagFilter = TRUE;
$this->_groupFilter = TRUE;
parent::__construct();
......
......@@ -40,27 +40,20 @@ class CRM_Extendedreport_Form_Report_Case_CasePivot extends CRM_Extendedreport_F
$this->_columns['civicrm_case']['filters']['case_civireport_is_deleted']['default'] = 0;
$this->_columns['civicrm_case']['metadata']['case_civireport_id'] = array_merge(
['is_fields' => FALSE, 'is_filters' => FALSE, 'is_group_bys' => FALSE, 'is_order_bys' => FALSE, 'is_join_filters' => FALSE],
['is_fields' => FALSE, 'is_filters' => FALSE, 'is_group_bys' => FALSE, 'is_order_bys' => FALSE, 'is_join_filters' => FALSE, 'is_aggregate_columns' => FALSE],
$this->_columns['civicrm_case']['fields']['case_civireport_id']
);
$this->_columns['civicrm_case']['metadata']['case_civireport_status_id'] = array_merge(
['is_fields' => FALSE, 'is_filters' => FALSE, 'is_group_bys' => FALSE, 'is_order_bys' => FALSE, 'is_join_filters' => FALSE],
['is_fields' => FALSE, 'is_filters' => FALSE, 'is_group_bys' => FALSE, 'is_order_bys' => FALSE, 'is_join_filters' => FALSE,
'is_aggregate_columns' => TRUE],
$this->_columns['civicrm_case']['fields']['case_civireport_status_id']
);
$this->_columns['civicrm_case']['metadata']['case_civireport_is_deleted'] = array_merge(
['is_fields' => FALSE, 'is_filters' => FALSE, 'is_group_bys' => FALSE, 'is_order_bys' => FALSE, 'is_join_filters' => FALSE],
['is_fields' => FALSE, 'is_filters' => FALSE, 'is_group_bys' => FALSE, 'is_order_bys' => FALSE, 'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE],
$this->_columns['civicrm_case']['filters']['case_civireport_is_deleted']
);
$this->_aggregateRowFields = array(
'case_civireport:id' => 'Case',
'case_civireport:status_id' => 'Case Status',
'civicrm_contact:gender_id' => 'Gender',
);
$this->_aggregateColumnHeaderFields = array(
'civicrm_contact:gender_id' => 'Gender',
'case_civireport:status_id' => 'Case Status',
);
$this->_tagFilter = TRUE;
$this->_groupFilter = TRUE;
parent::__construct();
......
......@@ -61,13 +61,6 @@ class CRM_Extendedreport_Form_Report_Case_CaseWithActivityPivot extends CRM_Exte
$this->_columns['civicrm_contact']['fields']['gender_id']['no_display'] = TRUE;
$this->_columns['civicrm_contact']['fields']['gender_id']['title'] = 'Gender';
$this->_aggregateRowFields = array(
'case_civireport:id' => 'Case',
'civicrm_contact_civireport:gender_id' => 'Gender',
);
$this->_aggregateColumnHeaderFields = array(
'civicrm_contact_civireport:gender_id' => 'Gender',
);
$this->_tagFilter = TRUE;
$this->_groupFilter = TRUE;
parent::__construct();
......
......@@ -27,93 +27,71 @@ class CRM_Extendedreport_Form_Report_Contact_AddressHistory extends CRM_Extended
*
* @var array
*/
protected $mergedContacts = array();
protected $mergedContacts = [];
public function __construct() {
$this->_columns = $this->getColumns('Address', array(
$addressColumns = $this->getColumns('Address', [
'fields' => TRUE,
'order_by' => FALSE,
'order_bys' => FALSE,
//'fields_defaults' => array('address_name', 'street_address', 'supplemental_address_1', 'supplemental_address_2', 'city', 'state_province_id', 'country_id', 'postal_code', 'county_id'),
'fields_defaults' => array('display_address'),
)
);
'fields_defaults' => ['display_address'],
]
)['civicrm_address']['metadata'];
$this->_columns['log_civicrm_address'] = $this->_columns['civicrm_address'];
unset($this->_columns['civicrm_address']);
$logMetaData = array(
'id' => array(
$logMetaData = array_merge($addressColumns, [
'id' => [
'name' => 'id',
'title' => ts('Address ID'),
'type' => CRM_Utils_Type::T_INT,
'is_fields' => TRUE,
'no_display' => TRUE,
),
'contact_id' => array(
],
'contact_id' => [
'name' => 'contact_id',
'title' => ts('Contact ID'),
'type' => CRM_Utils_Type::T_INT,
'is_fields' => TRUE,
'is_filters' => TRUE,
),
'log_date' => array(
'is_contact_filter' => TRUE,
],
'log_date' => [
'name' => 'log_date',
'title' => ts('Change Date'),
'type' => CRM_Utils_Type::T_TIMESTAMP,
'is_fields' => TRUE,
'default' => 1,
),
'log_conn_id' => array(
],
'log_conn_id' => [
'name' => 'log_conn_id',
'title' => ts('Connection'),
'type' => CRM_Utils_Type::T_STRING,
'is_fields' => TRUE,
'default' => 1,
),
'log_user_id' => array(
],
'log_user_id' => [
'name' => 'log_user_id',
'title' => ts('Changed By'),
'type' => CRM_Utils_Type::T_INT,
'is_fields' => TRUE,
'default' => 1,
),
'log_action' => array(
'is_contact_filter' => TRUE,
],
'log_action' => [
'name' => 'log_action',
'title' => ts('Change action'),
'type' => CRM_Utils_Type::T_STRING,
'is_fields' => TRUE,
'default' => 1,
),
);
],
]);
foreach ($logMetaData as $index => $field) {
foreach (['filters', 'join_filters', 'group_bys', 'order_bys'] as $type) {
$logMetaData[$index]['is_' . $type] = FALSE;
}
$logMetaData[$index]['dbAlias'] = $this->_columns['log_civicrm_address']['alias'] . '.' . $field['name'];
$logMetaData[$index]['alias'] = $this->_columns['log_civicrm_address']['alias'] . '_' . $field['name'];
}
$this->_columns['log_civicrm_address']['metadata'] += $logMetaData;
$this->_columns['log_civicrm_address']['fields'] += $logMetaData;
$this->_columns['log_civicrm_address']['filters']['contact_id'] = $logMetaData['contact_id'];
$this->_columns = $this->buildColumns($logMetaData, 'log_civicrm_address', NULL, 'address',
['fields_defaults' => ['address_display', 'log_action', 'log_user_id', 'log_conn_id', 'log_date']],
['order_by' => FALSE, 'no_field_disambiguation' => TRUE]
);
$activityTypes = civicrm_api3('Activity', 'getoptions', array('field' => 'activity_type_id'));
$activityTypes = civicrm_api3('Activity', 'getoptions', ['field' => 'activity_type_id']);
$this->activityTypeID = array_search('Contact Deleted by Merge', $activityTypes['values']);
parent::__construct();
}
/**
public function alterDisplay(&$rows) {
parent::alterDisplay($rows);
// Process rows in reverse order.
$oldestUnprocessedRowIndex = (count($rows) - 1);
while ($oldestUnprocessedRowIndex > -1) {
$row = &$rows[$oldestUnprocessedRowIndex];
$oldestUnprocessedRowIndex--;
}
return $rows;
}*/
/**
* Build order by clause.
*/
......@@ -136,26 +114,32 @@ class CRM_Extendedreport_Form_Report_Contact_AddressHistory extends CRM_Extended
* @return null|string
*/
public function whereClause(&$field, $op, $value, $min, $max) {
if ($field['name'] === 'contact_id' && $value) {
$this->contactID = (int) $value;
$mergedContactIDs = $this->getContactsMergedIntoThisOne($this->contactID);
$clause = parent::whereClause($field, 'in', array_merge(array($this->contactID), $mergedContactIDs), $min, $max);
return $clause;
}
if ($field['name'] === 'contact_id' && $value) {
$this->contactID = (int) $value;
$mergedContactIDs = $this->getContactsMergedIntoThisOne($this->contactID);
$clause = parent::whereClause($field, 'in', array_merge([$this->contactID], $mergedContactIDs), $min, $max);
return $clause;
}
}
/**
* Get all the contacts previously merged into the selected contact.
*
* @param int $contactID
* @return int
*
* @return array
*/
protected function getContactsMergedIntoThisOne($contactID) {
// @todo get api joins working properly.
$result = civicrm_api3('Activity', 'get', array(
$result = civicrm_api3('Activity', 'get', [
'assignee_contact_id' => $contactID,
'return' => 'id',
'activity_type_id' => $this->activityTypeID,
'api.ActivityContact.get' => array('record_type_id' => 'Activity Targets', 'return' => 'contact_id')
));
'api.ActivityContact.get' => [
'record_type_id' => 'Activity Targets',
'return' => 'contact_id',
],
]);
if ($result['count']) {
foreach ($result['values'] as $resultRow) {
if (!empty($resultRow['api.ActivityContact.get'])) {
......
......@@ -6,35 +6,35 @@
class CRM_Extendedreport_Form_Report_Contact_Basiccontact extends CRM_Extendedreport_Form_Report_ExtendedReport {
protected $_baseTable = 'civicrm_contact';
protected $skipACL = FALSE;
protected $_joinFilters = array('address_from_contact' => array('civicrm_address' => 'is_primary = 1 '));
protected $_joinFilters = ['address_from_contact' => ['civicrm_address' => 'is_primary = 1 ']];
/**
* Class constructor.
*/
public function __construct() {
$this->_templates = array(
$this->_templates = [
'default' => 'default template',
'PhoneBank' => 'Phone Bank template - Phone.tpl',
);
$this->_columns = $this->getColumns('Contact', array(
];
$this->_columns = $this->getColumns('Contact', [
'fields' => TRUE,
'order_by' => FALSE,
)
]
) +
$this->getColumns('Address', array(
$this->getColumns('Address', [
'fields' => TRUE,
'order_by' => FALSE,
)
]
) +
$this->getColumns('Email', array(
$this->getColumns('Email', [
'fields' => TRUE,
'order_by' => FALSE,
)
]
) +
$this->getColumns('LatestActivity', array(
'filters' => FALSE,
'fields' => array('activity_type' => array('title' => 'Latest Activity')),
)) +
$this->getColumns('LatestActivity', [
'filters' => FALSE,
'fields' => ['activity_type' => ['title' => 'Latest Activity']],
]) +
$this->getColumns('Tag') +
$this->getColumns('Phone');
$this->_columns['civicrm_contact']['fields']['id']['required'] = TRUE;
......@@ -47,13 +47,13 @@ class CRM_Extendedreport_Form_Report_Contact_Basiccontact extends CRM_Extendedre
* @return array
*/
function fromClauses() {
return array(
return [
'address_from_contact',
'email_from_contact',
'phone_from_contact',
'latestactivity_from_contact',
'entitytag_from_contact',
);
];
}
function groupBy() {
......
......@@ -18,18 +18,12 @@ class CRM_Extendedreport_Form_Report_Contact_Extendedcontact extends CRM_Extende
* Class constructor.
*/
public function __construct() {
$this->_columns = $this->getColumns('Contact', array(
$this->_columns = $this->getColumns('Contact', [
'fields' => FALSE,
'order_by' => FALSE,
)
]
);
$this->_columns['civicrm_contact']['fields']['id']['required'] = TRUE;
$this->_aggregateColumnHeaderFields = array(
'civicrm_contact:gender_id' => 'Gender',
);
$this->_aggregateRowFields = array(
'civicrm_contact:gender_id' => 'Gender',
);
parent::__construct();
}
}
......@@ -32,18 +32,8 @@ class CRM_Extendedreport_Form_Report_Contribute_ContributionPivot extends CRM_Ex
'fields' => FALSE,
)) + $this->_columns = $this->getColumns('Address', array(
'fields' => FALSE,
'aggregate_rows' => TRUE,
));
$this->_aggregateRowFields = array(
'contribution:contribution_campaign_id' => 'Campaign',
'address:address_county_id' => 'County',
'address:address_city' => 'City',
'contribution:contribution_financial_type_id' => 'Financial Type',
);
$this->_aggregateColumnHeaderFields = array(
'contribution:contribution_financial_type_id' => 'Financial Type',
'contribution:contribution_campaign_id' => 'Campaign',
);
parent::__construct();
}
......
......@@ -89,6 +89,8 @@ class CRM_Extendedreport_Form_Report_Contribute_DetailExtended extends CRM_Exten
'is_fields' => FALSE,
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
'type' => CRM_Utils_Type::T_INT,
'alias' => 'cordinality_cordinality'
]],
......
......@@ -59,6 +59,8 @@ class CRM_Extendedreport_Form_Report_Contribute_LoggingSummary extends CRM_Exten
'type' => CRM_Utils_Type::T_INT,
'is_fields' => TRUE,
'no_display' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
);
$this->_columns['civicrm_contribution']['fields']['log_date'] = array(
......@@ -66,6 +68,8 @@ class CRM_Extendedreport_Form_Report_Contribute_LoggingSummary extends CRM_Exten
'required' => TRUE,
'type' => CRM_Utils_Type::T_TIME,
'title' => ts('Change Date'),
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
);
$this->_columns['civicrm_contribution']['fields']['log_conn_id'] = array(
'no_display' => FALSE,
......@@ -78,6 +82,8 @@ class CRM_Extendedreport_Form_Report_Contribute_LoggingSummary extends CRM_Exten
'default' => TRUE,
'title' => ts('Action'),
'type' => CRM_Utils_Type::T_STRING,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
);
$this->_columns['civicrm_contribution']['filters']['log_action'] = array(
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
......
......@@ -44,13 +44,6 @@ class CRM_Extendedreport_Form_Report_Event_EventPivot extends CRM_Extendedreport
$this->_columns['civicrm_event']['fields']['id']['alter_display'] = 'alterEventID';
$this->_columns['civicrm_event']['fields']['id']['title'] = 'Event';
$this->_aggregateRowFields = array(
'event:id' => 'Event',
);
$this->_aggregateColumnHeaderFields = array(
'participant:status_id' => ts('Participant Status'),
);
$this->_groupFilter = TRUE;
parent::__construct();
}
......
......@@ -34,15 +34,6 @@ class CRM_Extendedreport_Form_Report_Member_MembershipPivot extends CRM_Extended
)
);
$this->_columns['civicrm_membership']['fields']['id']['required'] = TRUE;
$this->_aggregateRowFields = array(
'membership:membership_membership_type_id' => 'Membership Type',
'membership:membership_membership_status_id' => 'Membership Status',
);
$this->_aggregateColumnHeaderFields = array(
'membership:membership_membership_type_id' => 'Membership Type',
'membership:membership_membership_status_id' => 'Membership Status',
);
parent::__construct();
}
......
......@@ -48,6 +48,8 @@ class CRM_Extendedreport_Form_Report_Pledge_Btbns extends CRM_Extendedreport_For
WHERE pledge.start_date >= ('\$to') AND pledge.is_test = 0) ",
'is_filters' => TRUE,
'is_join_filters' => TRUE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
'is_fields' => FALSE,
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
......
......@@ -38,6 +38,8 @@ class CRM_Extendedreport_Form_Report_Pledge_Detail extends CRM_Extendedreport_Fo
'is_order_bys' => FALSE,
'is_group_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
'alias' => 'pledge_balance_amount'
];
$this->_columns['civicrm_contribution']['group_title'] = E::ts('Report Date');
......@@ -51,6 +53,8 @@ class CRM_Extendedreport_Form_Report_Pledge_Detail extends CRM_Extendedreport_Fo
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_join_filters' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
'operations' => ['to' => E::ts('Date')],
'alias' => 'contribution_effective_date',
);
......
......@@ -72,6 +72,8 @@ class CRM_Extendedreport_Form_Report_Pledge_Lybuns extends CRM_Extendedreport_Fo
'is_fields' => FALSE,
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
];
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
......
......@@ -69,6 +69,8 @@ class CRM_Extendedreport_Form_Report_Pledge_Lybunt extends CRM_Extendedreport_Fo
'default' => date('Y'),
'is_filters' => TRUE,
'is_join_filters' => TRUE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
'is_fields' => FALSE,
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
......
......@@ -37,6 +37,8 @@ class CRM_Extendedreport_Form_Report_Pledge_PaidAndCommitted extends CRM_Extende
'is_join_filters' => FALSE,
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
]
],
'civicrm_pledge_payment');
......@@ -52,6 +54,8 @@ class CRM_Extendedreport_Form_Report_Pledge_PaidAndCommitted extends CRM_Extende
'is_join_filters' => FALSE,
'is_group_bys' => TRUE,
'is_order_bys' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
);
$this->_columns['civicrm_pledge']['fields']['balance_amount'] = array(
......
......@@ -70,6 +70,8 @@ class CRM_Extendedreport_Form_Report_Pledge_Sybuns extends CRM_Extendedreport_Fo
'is_fields' => FALSE,
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
];
$this->_tagFilter = TRUE;
parent::__construct();
......
......@@ -68,6 +68,8 @@ class CRM_Extendedreport_Form_Report_Pledge_Sybunt extends CRM_Extendedreport_Fo
'default' => date('Y'),
'is_filters' => TRUE,
'is_join_filters' => TRUE,
'is_aggregate_columns' => FALSE,
'is_aggregate_rows' => FALSE,
'is_fields' => FALSE,
'is_group_bys' => FALSE,
'is_order_bys' => FALSE,
......
......@@ -48,8 +48,8 @@
<div class="floatleft" ng-if="selectedOrderBy">
<h2>{{ ts('Selected field') }}</h2>
<div class="ex-report-block" ng-model=selectedOrderBy>
<h3 class="fieldTitle" extendedreport-editable ng-model="selectedOrderBy.title">{{selectedField.title}}</h3>
<div extendedreport-editable ng-model="selectedField.order">{{selectedField.order}}</div>
<h3 class="fieldTitle" extendedreport-editable ng-model="selectedOrderBy.title">{{selectedOrderBy.title}}</h3>
<div ng-model="selectedOrderBy.order">{{selectedOrderBy.order}}</div>
<div>Fallback field:</div>
<select ng-model="selectedOrderBy.field_on_null_usage">
<option value="on_null">{{ ts('On null value') }}</option>
......@@ -72,25 +72,26 @@
<div class="floatleft">
<h2>{{ ts('Selected fields') }}</h2>
<div class="floatright" ng-if="selectedField">
<h3>{{ ts('Selected field') }}</h3>
<div class="ex-report-block" ng-model=selectedField>
<em class="fieldTitle" extendedreport-editable ng-model="selectedField.title">{{selectedField.title}}</em>
<div>Fallback field:</div>
<select ng-model="selectedField.field_on_null_usage">
<option value="on_null">{{ ts('On null value') }}</option>
<option value="on_empty">{{ ts('On null or empty value') }}</option>
</select>
<div ui-sortable="sortableFieldOptions" class="fields-container" ng-model=selectedField.field_on_null>
<div class="fieldItem" ng-repeat="fieldItem in selectedField.field_on_null">{{fieldItem.title}}</div>
</div>
</div>
</div>
<div ui-sortable="sortableFieldOptions" class="fields-container screen floatleft" ng-model="reportFields">