<?php

/**
 * @file
 * Views defaults for Commerce discount module.
 */

/**
 * Implements hook_views_default_views().
 */
function commerce_discount_views_default_views() {
  $views = array();

  $view = new view();
  $view->name = 'commerce_discount_overview';
  $view->description = 'Display a list of discounts for store admin.';
  $view->tag = 'default';
  $view->base_table = 'commerce_discount';
  $view->human_name = 'Discounts';
  $view->core = 7;
  $view->api_version = '3.0';
  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

  /* Display: Master */
  $handler = $view->new_display('default', 'Master', 'default');
  $handler->display->display_options['use_ajax'] = TRUE;
  $handler->display->display_options['use_more_always'] = FALSE;
  $handler->display->display_options['access']['type'] = 'none';
  $handler->display->display_options['cache']['type'] = 'none';
  $handler->display->display_options['query']['type'] = 'views_query';
  $handler->display->display_options['query']['options']['query_comment'] = FALSE;
  $handler->display->display_options['exposed_form']['type'] = 'basic';
  $handler->display->display_options['pager']['type'] = 'full';
  $handler->display->display_options['style_plugin'] = 'table';
  $handler->display->display_options['style_options']['columns'] = array(
    'label' => 'label',
    'type_1' => 'type_1',
    'type' => 'type',
    'status' => 'status',
    'commerce_discount_date' => 'commerce_discount_date',
    'commerce_discount_date_1' => 'commerce_discount_date_1',
    'operations_dropbutton' => 'operations_dropbutton',
  );
  $handler->display->display_options['style_options']['default'] = '-1';
  $handler->display->display_options['style_options']['info'] = array(
    'label' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'type_1' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'type' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'commerce_discount_usage' => array(
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'status' => array(
      'sortable' => 1,
      'default_sort_order' => 'desc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'commerce_discount_date' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'commerce_discount_date_1' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'operations_dropbutton' => array(
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
  );
  $handler->display->display_options['style_options']['empty_table'] = TRUE;

  /* No results behavior: Global: Text area */
  $handler->display->display_options['empty']['area']['id'] = 'area';
  $handler->display->display_options['empty']['area']['table'] = 'views';
  $handler->display->display_options['empty']['area']['field'] = 'area';
  $handler->display->display_options['empty']['area']['content'] = 'No discounts found.';

  /* Relationship: Entity Reference: Referenced Entity */
  $handler->display->display_options['relationships']['commerce_discount_offer_target_id']['id'] = 'commerce_discount_offer_target_id';
  $handler->display->display_options['relationships']['commerce_discount_offer_target_id']['table'] = 'field_data_commerce_discount_offer';
  $handler->display->display_options['relationships']['commerce_discount_offer_target_id']['field'] = 'commerce_discount_offer_target_id';
  $handler->display->display_options['relationships']['commerce_discount_offer_target_id']['required'] = TRUE;
  /* Field: Commerce Discount: Label */
  $handler->display->display_options['fields']['label']['id'] = 'label';
  $handler->display->display_options['fields']['label']['table'] = 'commerce_discount';
  $handler->display->display_options['fields']['label']['field'] = 'label';
  $handler->display->display_options['fields']['label']['label'] = 'Name';
  /* Field: Commerce Discount Offer: Type */
  $handler->display->display_options['fields']['type_1']['id'] = 'type_1';
  $handler->display->display_options['fields']['type_1']['table'] = 'commerce_discount_offer';
  $handler->display->display_options['fields']['type_1']['field'] = 'type';
  $handler->display->display_options['fields']['type_1']['relationship'] = 'commerce_discount_offer_target_id';
  $handler->display->display_options['fields']['type_1']['label'] = 'Offer';
  /* Field: Commerce Discount: Type */
  $handler->display->display_options['fields']['type']['id'] = 'type';
  $handler->display->display_options['fields']['type']['table'] = 'commerce_discount';
  $handler->display->display_options['fields']['type']['field'] = 'type';
  $handler->display->display_options['fields']['type']['alter']['alter_text'] = TRUE;
  $handler->display->display_options['fields']['type']['alter']['text'] = '<span>[type]</span>';
  /* Field: Commerce Discount: Analytics */
  $handler->display->display_options['fields']['commerce_discount_usage']['id'] = 'commerce_discount_usage';
  $handler->display->display_options['fields']['commerce_discount_usage']['table'] = 'commerce_discount';
  $handler->display->display_options['fields']['commerce_discount_usage']['field'] = 'commerce_discount_usage';
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['alter_text'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['make_link'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['absolute'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['external'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['replace_spaces'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['trim_whitespace'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['nl2br'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['word_boundary'] = 1;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['ellipsis'] = 1;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['more_link'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['strip_tags'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['trim'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['alter']['html'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['element_label_colon'] = 1;
  $handler->display->display_options['fields']['commerce_discount_usage']['element_default_classes'] = 1;
  $handler->display->display_options['fields']['commerce_discount_usage']['hide_empty'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['empty_zero'] = 0;
  $handler->display->display_options['fields']['commerce_discount_usage']['hide_alter_empty'] = 1;
  /* Field: Commerce Discount: Discount dates */
  $handler->display->display_options['fields']['commerce_discount_date']['id'] = 'commerce_discount_date';
  $handler->display->display_options['fields']['commerce_discount_date']['table'] = 'field_data_commerce_discount_date';
  $handler->display->display_options['fields']['commerce_discount_date']['field'] = 'commerce_discount_date';
  $handler->display->display_options['fields']['commerce_discount_date']['label'] = 'Start date';
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['alter_text'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['make_link'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['absolute'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['external'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['replace_spaces'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['trim_whitespace'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['nl2br'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['word_boundary'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['ellipsis'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['more_link'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['strip_tags'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['trim'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['alter']['html'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['element_label_colon'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date']['element_default_classes'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date']['hide_empty'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['empty_zero'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date']['hide_alter_empty'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date']['settings'] = array(
    'format_type' => 'short',
    'fromto' => 'value',
    'multiple_number' => '',
    'multiple_from' => '',
    'multiple_to' => '',
  );
  $handler->display->display_options['fields']['commerce_discount_date']['field_api_classes'] = 0;
  /* Field: Commerce Discount: Discount dates */
  $handler->display->display_options['fields']['commerce_discount_date_1']['id'] = 'commerce_discount_date_1';
  $handler->display->display_options['fields']['commerce_discount_date_1']['table'] = 'field_data_commerce_discount_date';
  $handler->display->display_options['fields']['commerce_discount_date_1']['field'] = 'commerce_discount_date';
  $handler->display->display_options['fields']['commerce_discount_date_1']['label'] = 'End date';
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['alter_text'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['make_link'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['absolute'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['external'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['replace_spaces'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['trim_whitespace'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['nl2br'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['word_boundary'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['ellipsis'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['more_link'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['strip_tags'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['trim'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['alter']['html'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['element_label_colon'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date_1']['element_default_classes'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date_1']['hide_empty'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['empty_zero'] = 0;
  $handler->display->display_options['fields']['commerce_discount_date_1']['hide_alter_empty'] = 1;
  $handler->display->display_options['fields']['commerce_discount_date_1']['settings'] = array(
    'format_type' => 'short',
    'fromto' => 'value2',
    'multiple_number' => '',
    'multiple_from' => '',
    'multiple_to' => '',
  );
  $handler->display->display_options['fields']['commerce_discount_date_1']['field_api_classes'] = 0;
  /* Field: Commerce Discount: Status */
  $handler->display->display_options['fields']['status']['id'] = 'status';
  $handler->display->display_options['fields']['status']['table'] = 'commerce_discount';
  $handler->display->display_options['fields']['status']['field'] = 'status';
  $handler->display->display_options['fields']['status']['type'] = 'active-disabled';
  $handler->display->display_options['fields']['status']['not'] = 0;
  /* Field: Commerce Discount: Operations */
  $handler->display->display_options['fields']['operations_dropbutton']['id'] = 'operations_dropbutton';
  $handler->display->display_options['fields']['operations_dropbutton']['table'] = 'commerce_discount';
  $handler->display->display_options['fields']['operations_dropbutton']['field'] = 'operations_dropbutton';
  /* Filter criterion: Commerce Discount: Label */
  $handler->display->display_options['filters']['label']['id'] = 'label';
  $handler->display->display_options['filters']['label']['table'] = 'commerce_discount';
  $handler->display->display_options['filters']['label']['field'] = 'label';
  $handler->display->display_options['filters']['label']['operator'] = 'contains';
  $handler->display->display_options['filters']['label']['group'] = 1;
  $handler->display->display_options['filters']['label']['exposed'] = TRUE;
  $handler->display->display_options['filters']['label']['expose']['operator_id'] = 'label_op';
  $handler->display->display_options['filters']['label']['expose']['label'] = 'Name';
  $handler->display->display_options['filters']['label']['expose']['operator'] = 'label_op';
  $handler->display->display_options['filters']['label']['expose']['identifier'] = 'label';
  /* Filter criterion: Commerce Discount Offer: Type */
  $handler->display->display_options['filters']['type_1']['id'] = 'type_1';
  $handler->display->display_options['filters']['type_1']['table'] = 'commerce_discount_offer';
  $handler->display->display_options['filters']['type_1']['field'] = 'type';
  $handler->display->display_options['filters']['type_1']['relationship'] = 'commerce_discount_offer_target_id';
  $handler->display->display_options['filters']['type_1']['group'] = 1;
  $handler->display->display_options['filters']['type_1']['exposed'] = TRUE;
  $handler->display->display_options['filters']['type_1']['expose']['operator_id'] = 'type_1_op';
  $handler->display->display_options['filters']['type_1']['expose']['label'] = 'Offer';
  $handler->display->display_options['filters']['type_1']['expose']['operator'] = 'type_1_op';
  $handler->display->display_options['filters']['type_1']['expose']['identifier'] = 'type_1';
  /* Filter criterion: Commerce Discount: Type */
  $handler->display->display_options['filters']['type']['id'] = 'type';
  $handler->display->display_options['filters']['type']['table'] = 'commerce_discount';
  $handler->display->display_options['filters']['type']['field'] = 'type';
  $handler->display->display_options['filters']['type']['group'] = 1;
  $handler->display->display_options['filters']['type']['exposed'] = TRUE;
  $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
  $handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
  $handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
  $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
  /* Filter criterion: Commerce Discount: Status */
  $handler->display->display_options['filters']['status']['id'] = 'status';
  $handler->display->display_options['filters']['status']['table'] = 'commerce_discount';
  $handler->display->display_options['filters']['status']['field'] = 'status';
  $handler->display->display_options['filters']['status']['value'] = 'All';
  $handler->display->display_options['filters']['status']['exposed'] = TRUE;
  $handler->display->display_options['filters']['status']['expose']['operator_id'] = '';
  $handler->display->display_options['filters']['status']['expose']['label'] = 'Active';
  $handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
  $handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
  $translatables['commerce_discount_overview'] = array(
    t('Master'),
    t('more'),
    t('Apply'),
    t('Reset'),
    t('Sort by'),
    t('Asc'),
    t('Desc'),
    t('Items per page'),
    t('- All -'),
    t('Offset'),
    t('« first'),
    t('‹ previous'),
    t('next ›'),
    t('last »'),
    t('No discounts found.'),
    t('Commerce Discount Offer entity referenced from commerce_discount_offer'),
    t('Name'),
    t('Offer'),
    t('Type'),
    t('<span>[type]</span>'),
    t('Status'),
    t('Operations'),
    t('Name'),
    t('Active'),
  );

  $views['commerce_discount_overview'] = $view;

  return $views;
}
