Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Civilint views components files #482

Merged
merged 1 commit into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions modules/views/components/civicrm.campaign.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
*/

/**
* Build the $data array for CiviCampaign related tables
Expand Down Expand Up @@ -66,7 +66,7 @@ function _civicrm_campaign_data(&$data, $enabled) {
// Campaign's Name
$data['civicrm_campaign']['name'] = array(
'title' => t('Name'),
'help' => t('Campaign\'s name'),
'help' => t("Campaign's name"),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
Expand All @@ -85,7 +85,7 @@ function _civicrm_campaign_data(&$data, $enabled) {
// Campaign Title
$data['civicrm_campaign']['title'] = array(
'title' => t('Title'),
'help' => t('Campaing\'s title'),
'help' => t("Campaing's title"),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
Expand All @@ -104,7 +104,7 @@ function _civicrm_campaign_data(&$data, $enabled) {
//Campaign Description
$data['civicrm_campaign']['description'] = array(
'title' => t('Description'),
'help' => t('Campaing\'s description'),
'help' => t("Campaing's description"),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
Expand All @@ -113,7 +113,7 @@ function _civicrm_campaign_data(&$data, $enabled) {
//Mailing finish date
$data['civicrm_campaign']['start_date'] = array(
'title' => t('Start Date'),
'help' => t('The Campaign\'s Start Date'),
'help' => t("The Campaign's Start Date"),
'field' => array(
'handler' => 'civicrm_handler_field_datetime',
'click sortable' => TRUE,
Expand All @@ -138,7 +138,7 @@ function _civicrm_campaign_data(&$data, $enabled) {
//Mailing finish date
$data['civicrm_campaign']['end_date'] = array(
'title' => t('End Date'),
'help' => t('The Campaign\'s End Date'),
'help' => t("The Campaign's End Date"),
'field' => array(
'handler' => 'civicrm_handler_field_datetime',
'click sortable' => TRUE,
Expand Down Expand Up @@ -211,7 +211,7 @@ function _civicrm_campaign_data(&$data, $enabled) {
// Parent Campaign ID
$data['civicrm_campaign']['parent_id'] = array(
'title' => t('Parent Campaign ID'),
'help' => t('The ID of the campaign\'s parent campaign'),
'help' => t("The ID of the campaign's parent campaign"),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
Expand Down Expand Up @@ -249,7 +249,7 @@ function _civicrm_campaign_data(&$data, $enabled) {
// Campaign's General Goal
$data['civicrm_campaign']['goal_general'] = array(
'title' => t('General Goal'),
'help' => t('Campaing\'s general goal'),
'help' => t("Campaing's general goal"),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
Expand Down Expand Up @@ -289,7 +289,6 @@ function _civicrm_campaign_data(&$data, $enabled) {
// Add Support of Survey Fields.
$data['civicrm_survey']['table']['group'] = t('CiviCRM Surveys');


$data['civicrm_survey']['table']['base'] = array(
// Governs the whole mozilla
'field' => 'id',
Expand Down Expand Up @@ -341,8 +340,6 @@ function _civicrm_campaign_data(&$data, $enabled) {
),
);



//Activity Type
$data['civicrm_survey']['activity_type'] = array(
'title' => t('Activity Type'),
Expand Down Expand Up @@ -408,4 +405,3 @@ function _civicrm_campaign_data(&$data, $enabled) {
//$skipFields = array( );
civicrm_views_add_fields($fields, $data['civicrm_survey'], 'civicrm_survey');
}

30 changes: 14 additions & 16 deletions modules/views/components/civicrm.case.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
*/

/**
* Build the $data array for CiviCase related tables
* Includes the following tables
* civicrm_case
*/

function _civicrm_case_data(&$data, $enabled) {

/**
Expand Down Expand Up @@ -133,7 +132,7 @@ function _civicrm_case_data(&$data, $enabled) {
//CASE Start DATE
$data['civicrm_case']['start_date'] = array(
'title' => t('Start Date'),
'help' => t('The Case\'s Start Date'),
'help' => t("The Case's Start Date"),
'field' => array(
'handler' => 'civicrm_handler_field_datetime',
'click sortable' => TRUE,
Expand All @@ -160,7 +159,7 @@ function _civicrm_case_data(&$data, $enabled) {
//CASE END DATE
$data['civicrm_case']['end_date'] = array(
'title' => t('End Date'),
'help' => t('The Case\'s End Date'),
'help' => t("The Case's End Date"),
'field' => array(
'handler' => 'civicrm_handler_field_datetime',
'click sortable' => TRUE,
Expand Down Expand Up @@ -233,7 +232,7 @@ function _civicrm_case_data(&$data, $enabled) {
'field' => array(
'handler' => 'views_handler_field_boolean',
'click sortable' => TRUE,
),
),
'argument' => array(
'handler' => 'views_handler_argument',
),
Expand All @@ -245,7 +244,6 @@ function _civicrm_case_data(&$data, $enabled) {
),
);


//----------------------------------------------------------------
// CIVICRM Case Activities are here, base tabling it up.
//----------------------------------------------------------------
Expand Down Expand Up @@ -300,16 +298,16 @@ function _civicrm_case_data(&$data, $enabled) {
'help' => t('The numeric ID of the Case'),
'relationship' => array(
'base' => 'civicrm_case',
'field' => 'case_id',
'left_field' => 'id',
'field' => 'case_id',
'left_field' => 'id',
'handler' => 'views_handler_relationship',
'label' => t('CiviCRM Case, with custom fields'),
),
);

//Numeric Activity ID
$data['civicrm_case_activity']['activity_id'] = array(
'title' => t('Case Activity\'s Activity ID'),
'title' => t("Case Activity's Activity ID"),
'help' => t('The numeric ID of the Activity of the Case'),
'field' => array(
'handler' => 'views_handler_field_numeric',
Expand Down Expand Up @@ -401,16 +399,16 @@ function _civicrm_case_data(&$data, $enabled) {
'help' => t('The numeric ID of the Case'),
'relationship' => array(
'base' => 'civicrm_case',
'field' => 'case_id',
'left_field' => 'id',
'field' => 'case_id',
'left_field' => 'id',
'handler' => 'views_handler_relationship',
'label' => t('CiviCRM Case, with custom fields'),
),
);

//Numeric Contact ID
$data['civicrm_case_contact']['contact_id'] = array(
'title' => t('Case Contact\'s Contact ID'),
'title' => t("Case Contact's Contact ID"),
'help' => t('The numeric ID of the Contact of the Case'),
'field' => array(
'handler' => 'views_handler_field_numeric',
Expand Down Expand Up @@ -464,14 +462,14 @@ function _civicrm_case_data(&$data, $enabled) {
'real field' => 'title',
'help' => t('The Name of the Case Type'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument',
'handler' => 'views_handler_argument',
),
'sort' => array(
'handler' => 'views_handler_sort',
'handler' => 'views_handler_sort',
),
);
}
25 changes: 6 additions & 19 deletions modules/views/components/civicrm.contribute.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
*/

/**
* Build the $data array for CiviContribute related tables
Expand Down Expand Up @@ -60,7 +60,7 @@ function _civicrm_contribute_data(&$data, $enabled) {
);

//TABLE JOINS FOR CIVICRM CONTRIBUTIONS GO HERE!

$data['civicrm_contribution']['table']['join']['civicrm_contact'] = array(
'left_table' => 'civicrm_contact',
'left_field' => 'id',
Expand Down Expand Up @@ -187,8 +187,6 @@ function _civicrm_contribute_data(&$data, $enabled) {
),
);



//Contribution Receive Date
$data['civicrm_contribution']['receive_date'] = array(
'title' => t('Date Received'),
Expand Down Expand Up @@ -523,7 +521,7 @@ function _civicrm_contribute_data(&$data, $enabled) {
);
$data['civicrm_contribution']['check_number'] = array(
'title' => t('Check Number'),
'help' => t('Contribution\'s Check Number'),
'help' => t("Contribution's Check Number"),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
Expand Down Expand Up @@ -576,14 +574,10 @@ function _civicrm_contribute_data(&$data, $enabled) {
'label' => t('Contribution -> line-item'),
),
);

/*
* Soft Credits
*/

// Soft Credits
$data['civicrm_contribution_soft']['table']['group'] = t('CiviCRM Soft Credits');


//TABLE JOINS FOR CIVICRM CONTRIBUTIONS GO HERE!
$data['civicrm_contribution_soft']['table']['join']['civicrm_contribution'] = array(
'left_table' => 'civicrm_contribution',
Expand Down Expand Up @@ -698,15 +692,9 @@ function _civicrm_contribute_data(&$data, $enabled) {
),
);


/*
* Soft Credits
*/


// Soft Credits
$data['civicrm_contribution_recur']['table']['group'] = t('CiviCRM Recurring Contributions');


//TABLE JOINS FOR CIVICRM CONTRIBUTIONS GO HERE!
$data['civicrm_contribution_recur']['table']['join']['civicrm_contribution'] = array(
'left_table' => 'civicrm_contribution',
Expand Down Expand Up @@ -1007,7 +995,7 @@ function _civicrm_contribute_data(&$data, $enabled) {
$data['civicrm_contribution_recur']['contribution_status'] = array(
'title' => t('Contribution Status'),
'real field' => 'contribution_status_id',
'help' => t('The Contribution\'s Status'),
'help' => t("The Contribution's Status"),
'field' => array(
'handler' => 'civicrm_handler_field_pseudo_constant',
'click sortable' => TRUE,
Expand Down Expand Up @@ -1530,4 +1518,3 @@ function _civicrm_contribute_data(&$data, $enabled) {
),
);
}

Loading