コード例 #1
0
    /**
     * Get the list of parameters for this form.
     * @return array List of parameters that this form requires.
     */
    public static function get_parameters()
    {
        $r = array_merge(iform_map_get_map_parameters(), iform_report_get_minimal_report_parameters(), array(array('name' => 'mapping_report_name', 'caption' => 'Report for map output', 'description' => 'Report used to obtain the output for the map. Should have the same parameters as the grid report but only needs to ' . 'return the occurrence id, geom and any shape formatting.', 'type' => 'report_helper::report_picker', 'group' => 'Report Settings', 'default' => 'library/occurrences/filterable_explore_list_mapping'), array('name' => 'mapping_report_name_lores', 'caption' => 'Report for lo res map output', 'description' => 'Report used to obtain the output for the map at low zoom levels.', 'type' => 'report_helper::report_picker', 'group' => 'Report Settings', 'default' => 'library/occurrences/filterable_explore_list_mapping_lores'), array('name' => 'record_details_report', 'caption' => 'Report for record details', 'description' => 'Report used to obtain the details of a record. See reports_for_prebuilt_forms/verification_3/record_data.xml for an example.', 'type' => 'report_helper::report_picker', 'group' => 'Report Settings', 'default' => 'reports_for_prebuilt_forms/verification_3/record_data'), array('name' => 'record_attrs_report', 'caption' => 'Report for record attributes', 'description' => 'Report used to obtain the custom attributes of a record. See reports_for_prebuilt_forms/verification_3/record_data_attributes.xml for an example.', 'type' => 'report_helper::report_picker', 'group' => 'Report Settings', 'default' => 'reports_for_prebuilt_forms/verification_3/record_data_attributes'), array('name' => 'columns_config', 'caption' => 'Columns Configuration', 'description' => 'Define a list of columns with various configuration options when you want to override the ' . 'default output of the report.', 'type' => 'jsonwidget', 'default' => '[]', 'schema' => '{
    "type":"seq",
    "title":"Columns List",
    "sequence":
    [
      {
        "type":"map",
        "title":"Column",
        "mapping": {
          "fieldname": {"type":"str","desc":"Name of the field to output in this column. Does not need to be specified when using the template option."},
          "display": {"type":"str","desc":"Caption of the column, which defaults to the fieldname if not specified."},
          "actions": {
            "type":"seq",
            "title":"Actions List",
            "sequence": [{
              "type":"map",
              "title":"Actions",
              "desc":"List of actions to make available for each row in the grid.",
              "mapping": {
                "caption": {"type":"str","desc":"Display caption for the action\'s link."},
                "visibility_field": {"type":"str","desc":"Optional name of a field in the data which contains true or false to define the visibility of this action."},
                "url": {"type":"str","desc":"A url that the action link will point to, unless overridden by JavaScript. The url can contain tokens which ' . 'will be subsituted for field values, e.g. for http://www.example.com/image/{id} the {id} is replaced with a field called id in the current row. ' . 'Can also use the subsitution {currentUrl} to link back to the current page, {rootFolder} to represent the folder on the server that the current PHP page is running from, and ' . '{imageFolder} for the image upload folder"},
                "urlParams": {
                  "type":"map",
                  "subtype":"str",
                  "desc":"List of parameters to append to the URL link, with field value replacements such as {id} begin replaced ' . 'by the value of the id field for the current row."
                },
                "class": {"type":"str","desc":"CSS class to attach to the action link."},
                "javascript": {"type":"str","desc":"JavaScript that will be run when the link is clicked. Can contain field value substitutions ' . 'such as {id} which is replaced by the value of the id field for the current row. Because the javascript may pass the field values as parameters to functions, ' . 'there are escaped versions of each of the replacements available for the javascript action type. Add -escape-quote or ' . '-escape-dblquote to the fieldname. For example this would be valid in the action javascript: foo(\\"{bar-escape-dblquote}\\"); ' . 'even if the field value contains a double quote which would have broken the syntax."}
              }
            }]
          },
          "visible": {"type":"bool","desc":"Should this column be shown? Hidden columns can still be used in templates or actions."},
          "template": {"type":"str","desc":"Allows you to create columns that contain dynamic content using a template, rather than just the output ' . 'of a field. The template text can contain fieldnames in braces, which will be replaced by the respective field values. ' . 'Note that template columns cannot be sorted by clicking grid headers." }
        }
      }
    ]
  }', 'group' => 'Report Settings', 'required' => false), array('name' => 'verifiers_mapping', 'caption' => 'Verifiers Mapping', 'description' => 'Provide either the ID of a single Indicia user to act as the verifier, or provide a comma separated list ' . 'of <drupal user id>=<indicia user id> pairs to define the mapping from Drupal to Indicia users. E.g. ' . '"1=2,2=3. If the Easy Login feature is enabled then this setting is ignored, as every Drupal user has their ' . 'own warehouse User ID.', 'type' => 'textarea', 'default' => 1), array('name' => 'email_subject_send_to_verifier', 'caption' => 'Send to Expert Email Subject', 'description' => 'Default subject for the send to expert email. Replacements allowed include %taxon% and %id%.', 'type' => 'string', 'default' => 'Record of %taxon% requires verification (ID:%id%)', 'group' => 'Verifier emails'), array('name' => 'email_body_send_to_verifier', 'caption' => 'Send to Expert Email Body', 'description' => 'Default body for the send to expert email. Replacements allowed include %taxon%, %id% and %record% which is replaced to give details of the record.', 'type' => 'textarea', 'default' => 'The following record requires verification. Please reply to this mail with the word Verified, Rejected or Query ' . 'in the email body, followed by any comments you have including the proposed re-identification if relevant on the next line.' . "\n\n%record%", 'group' => 'Verifier emails'), array('name' => 'email_subject_send_to_recorder', 'caption' => 'Send to Recorder Email Subject', 'description' => 'Default subject for the send to recorder email. Replacements allowed include %taxon% and %id%.', 'type' => 'string', 'default' => 'Record of %taxon% requires confirmation (ID:%id%)', 'group' => 'Recorder emails'), array('name' => 'email_body_send_to_recorder', 'caption' => 'Send to Recorder Email Body', 'description' => 'Default body for the send to recorder email. Replacements allowed include %taxon%, %id% and %record% which is replaced to give details of the record.', 'type' => 'textarea', 'default' => 'The following record requires confirmation. Please could you reply to this email stating how confident you are that the record is correct ' . 'and any other information you have which may help to confirm this.' . "\n\n%record%", 'group' => 'Recorder emails'), array('name' => 'auto_discard_rows', 'caption' => 'Automatically remove rows', 'description' => 'If checked, then when changing the status of a record the record is removed from the grid if it no ' . 'longer matches the grid filter.', 'type' => 'checkbox', 'default' => 'true', 'required' => false), array('name' => 'show_map', 'caption' => 'Show map of the currently selected records', 'description' => 'If checked, then a map of currently selected records is shown. This lets the verifier do things like visually spot outliers to check.', 'type' => 'checkbox', 'default' => 'true', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'indicia_species_layer_feature_type', 'caption' => 'Feature type for Indicia species layer', 'description' => 'Set to the name of a feature type on GeoServer that will be loaded to display the Indicia species data for the selected record. ' . 'Leave empty for no layer. Normally this should be set to a feature type that exposes the cache_occurrences view.', 'type' => 'text_input', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'indicia_species_layer_ds_filter_field', 'caption' => 'Filter method', 'description' => 'Method of filtering taxa to display the species layer.', 'type' => 'select', 'options' => array('taxon_meaning_id' => 'Meaning ID', 'taxon_external_key' => 'External Key'), 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'indicia_species_layer_filter_field', 'caption' => 'Field to filter on', 'description' => 'Set to the name of a field exposed by the feature type which can be used to filter for the species data to display. Examples include ' . 'taxon_external_key, taxon_meaning_id.', 'type' => 'text_input', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'indicia_species_layer_sld', 'caption' => 'SLD file from GeoServer for Indicia species layer', 'description' => 'Set to the name of an SLD file available on the GeoServer for the rendering of the Indicia species layer, or leave blank for default.', 'type' => 'text_input', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'additional_wms_species_layer_title', 'caption' => 'Additional WMS layer title', 'description' => 'Title of an additional species layer to load from a WMS service', 'type' => 'text_input', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'additional_wms_species_layer_url', 'caption' => 'Additional WMS layer URL', 'description' => 'URL of an additional species layer to load from a WMS service. {external_key} is replaced by the species external key.', 'type' => 'text_input', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'additional_wms_species_layer_settings', 'caption' => 'Additional WMS layer settings', 'description' => 'JSON settings object for an additional species layer to load from a WMS service. {external_key} is replaced by the species external key.', 'type' => 'textarea', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'additional_wms_species_layer_ol_settings', 'caption' => 'Additional WMS layer OpenLayers settings', 'description' => 'JSON settings object for the Open Layers settings object for an additional species layer to load from a WMS service.', 'type' => 'textarea', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'view_records_report_path', 'caption' => 'View records report path', 'description' => 'Path to page used to show a list of records, e.g. when clicking on the record counts on the Experience tab', 'type' => 'string', 'required' => 'false'), array('name' => 'clear_verification_task_notifications', 'caption' => 'Clear verification task notifications?', 'description' => 'Automatically clear any verification task notifications when the user opens the verification screen.', 'type' => 'boolean', 'group' => 'Notification Settings', 'default' => false, 'required' => 'false')));
        // Set default values for the report
        foreach ($r as &$param) {
            if ($param['name'] == 'report_name') {
                $param['default'] = 'library/occurrences/verification_list_3';
            } elseif ($param['name'] == 'param_presets') {
                $param['default'] = 'survey_id=
date_from=
date_to=
smpattrs=
occattrs=';
            } elseif ($param['name'] == 'param_defaults') {
                $param['default'] = 'id=
record_status=C
records=unverified
searchArea=
idlist=';
            }
        }
        return $r;
    }
コード例 #2
0
    /**
     * Get the list of parameters for this form.
     * @return array List of parameters that this form requires.
     */
    public static function get_parameters()
    {
        $r = array_merge(iform_map_get_map_parameters(), iform_report_get_minimal_report_parameters(), array(array('name' => 'mapping_report_name', 'caption' => 'Report for map output', 'description' => 'Report used to obtain the output for the map. Should have the same parameters as the grid report but only needs to ' . 'return the sample id, geom and any shape formatting.', 'type' => 'report_helper::report_picker', 'group' => 'Report Settings', 'default' => 'library/samples/filterable_explore_list_mapping'), array('name' => 'record_details_report', 'caption' => 'Report for record details', 'description' => 'Report used to obtain the details of a sample. See reports_for_prebuilt_forms/verification_3/record_data.xml for an example.', 'type' => 'report_helper::report_picker', 'group' => 'Report Settings', 'default' => 'reports_for_prebuilt_forms/verification_samples/record_data'), array('name' => 'record_attrs_report', 'caption' => 'Report for record attributes', 'description' => 'Report used to obtain the custom attributes of a record. See reports_for_prebuilt_forms/verification_3/record_data_attributes.xml for an example.', 'type' => 'report_helper::report_picker', 'group' => 'Report Settings', 'default' => 'reports_for_prebuilt_forms/verification_samples/record_data_attributes'), array('name' => 'columns_config', 'caption' => 'Columns Configuration', 'description' => 'Define a list of columns with various configuration options when you want to override the ' . 'default output of the report.', 'type' => 'jsonwidget', 'default' => '[]', 'schema' => '{
    "type":"seq",
    "title":"Columns List",
    "sequence":
    [
      {
        "type":"map",
        "title":"Column",
        "mapping": {
          "fieldname": {"type":"str","desc":"Name of the field to output in this column. Does not need to be specified when using the template option."},
          "display": {"type":"str","desc":"Caption of the column, which defaults to the fieldname if not specified."},
          "actions": {
            "type":"seq",
            "title":"Actions List",
            "sequence": [{
              "type":"map",
              "title":"Actions",
              "desc":"List of actions to make available for each row in the grid.",
              "mapping": {
                "caption": {"type":"str","desc":"Display caption for the action\'s link."},
                "visibility_field": {"type":"str","desc":"Optional name of a field in the data which contains true or false to define the visibility of this action."},
                "url": {"type":"str","desc":"A url that the action link will point to, unless overridden by JavaScript. The url can contain tokens which ' . 'will be subsituted for field values, e.g. for http://www.example.com/image/{id} the {id} is replaced with a field called id in the current row. ' . 'Can also use the subsitution {currentUrl} to link back to the current page, {rootFolder} to represent the folder on the server that the current PHP page is running from, and ' . '{imageFolder} for the image upload folder"},
                "urlParams": {
                  "type":"map",
                  "subtype":"str",
                  "desc":"List of parameters to append to the URL link, with field value replacements such as {id} begin replaced ' . 'by the value of the id field for the current row."
                },
                "class": {"type":"str","desc":"CSS class to attach to the action link."},
                "javascript": {"type":"str","desc":"JavaScript that will be run when the link is clicked. Can contain field value substitutions ' . 'such as {id} which is replaced by the value of the id field for the current row. Because the javascript may pass the field values as parameters to functions, ' . 'there are escaped versions of each of the replacements available for the javascript action type. Add -escape-quote or ' . '-escape-dblquote to the fieldname. For example this would be valid in the action javascript: foo(\\"{bar-escape-dblquote}\\"); ' . 'even if the field value contains a double quote which would have broken the syntax."}
              }
            }]
          },
          "visible": {"type":"bool","desc":"Should this column be shown? Hidden columns can still be used in templates or actions."},
          "template": {"type":"str","desc":"Allows you to create columns that contain dynamic content using a template, rather than just the output ' . 'of a field. The template text can contain fieldnames in braces, which will be replaced by the respective field values. ' . 'Note that template columns cannot be sorted by clicking grid headers." }
        }
      }
    ]
  }', 'group' => 'Report Settings', 'required' => false), array('name' => 'email_subject_send_to_verifier', 'caption' => 'Send to Expert Email Subject', 'description' => 'Default subject for the send to expert email. Replacements allowed include %id%.', 'type' => 'string', 'default' => 'Requesting your opinion on a sample (ID:%id%)', 'group' => 'Verifier emails'), array('name' => 'email_body_send_to_verifier', 'caption' => 'Send to Expert Email Body', 'description' => 'Default body for the send to expert email. Replacements allowed include %id% and %record% which is replaced to give details of the record.', 'type' => 'textarea', 'default' => 'We would appreciate your opinion on the following record. Please reply to this mail with "accepted", "not accepted" or "query" ' . 'in the email body, followed by any comments you have including the proposed re-identification if relevant on the next line.' . "\n\n%record%", 'group' => 'Verifier emails'), array('name' => 'email_subject_send_to_recorder', 'caption' => 'Send to Recorder Email Subject', 'description' => 'Default subject for the send query to recorder email. Replacements allowed include %id%.', 'type' => 'string', 'default' => 'Query on your sample (ID:%id%)', 'group' => 'Recorder emails'), array('name' => 'email_body_send_to_recorder', 'caption' => 'Send to Recorder Email Body', 'description' => 'Default body for the send to recorder email. Replacements allowed include %id% and %record% which is replaced to give details of the record.', 'type' => 'textarea', 'default' => 'The following record requires confirmation. Please could you reply to this email stating how confident you are that the record is correct ' . 'and any other information you have which may help to confirm this.' . "\n\n%record%", 'group' => 'Recorder emails'), array('name' => 'auto_discard_rows', 'caption' => 'Automatically remove rows', 'description' => 'If checked, then when changing the status of a record the record is removed from the grid if it no ' . 'longer matches the grid filter.', 'type' => 'checkbox', 'default' => 'true', 'required' => false), array('name' => 'indexed_location_type_ids', 'caption' => 'Indexed location type IDs', 'description' => 'Comma separated list of location type IDs for location layers that are available to search against.', 'type' => 'text_input', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'other_location_type_ids', 'caption' => 'Other location type IDs', 'description' => 'Comma separated list of location type IDs for location layers that are available to search against.', 'type' => 'text_input', 'required' => false, 'group' => 'Other Map Settings'), array('name' => 'clear_verification_task_notifications', 'caption' => 'Clear verification task notifications?', 'description' => 'Automatically clear any verification task notifications when the user opens the verification screen.', 'type' => 'boolean', 'group' => 'Notification Settings', 'default' => false, 'required' => 'false')));
        // Set default values for the report
        foreach ($r as &$param) {
            if ($param['name'] == 'report_name') {
                $param['default'] = 'library/samples/filterable_explore_list';
            } elseif ($param['name'] == 'param_presets') {
                $param['default'] = 'survey_id=
date_from=
date_to=
smpattrs=';
            } elseif ($param['name'] == 'param_defaults') {
                $param['default'] = 'id=
record_status=C
records=unverified
searchArea=
idlist=';
            }
        }
        return $r;
    }
コード例 #3
0
    /**
     * Get the list of parameters for this form.
     * @return array List of parameters that this form requires.
     * @todo: Implement this method
     */
    public static function get_parameters()
    {
        $r = array_merge(iform_map_get_map_parameters(), iform_report_get_minimal_report_parameters(), array(array('name' => 'downloadOwnDataOnly', 'caption' => 'Download own data only', 'description' => 'If ticked then the user is only allowed to download data when showing just their own data.', 'type' => 'checkbox', 'default' => false, 'required' => false), array('name' => 'includeEditLink', 'caption' => 'Include edit link', 'description' => 'Include an edit link for each row that was input by the current user', 'type' => 'checkbox', 'default' => true, 'required' => false), array('name' => 'includeEditLinkPath', 'caption' => 'Path to page used for edits', 'description' => 'The path to the page used for edits. This is just the site relative path, e.g. http://www.example.com/index.php?q=enter-records needs ' . 'to be input as just enter-records. The path is called with the id of the record in a parameter called occurrence_id.', 'type' => 'text_input', 'default' => '', 'required' => false), array('name' => 'columns_config', 'caption' => 'Columns Configuration', 'description' => 'Define a list of columns with various configuration options when you want to override the ' . 'default output of the report.', 'type' => 'jsonwidget', 'schema' => '{
  "type":"seq",
  "title":"Columns List",
  "sequence":
  [
    {
      "type":"map",
      "title":"Column",
      "mapping": {
        "fieldname": {"type":"str","desc":"Name of the field to output in this column. Does not need to be specified when using the template option."},
        "display": {"type":"str","desc":"Caption of the column, which defaults to the fieldname if not specified."},
        "actions": {
          "type":"seq",
          "title":"Actions List",
          "sequence": [{
            "type":"map",
            "title":"Actions",
            "desc":"List of actions to make available for each row in the grid.",
            "mapping": {
              "caption": {"type":"str","desc":"Display caption for the action\'s link."},
              "visibility_field": {"type":"str","desc":"Optional name of a field in the data which contains true or false to define the visibility of this action."},
              "img": {"type":"str","desc":"Set img to the path to an image to use an image for the action instead of a text caption - the caption ' . 'then becomes the image\'s title. The image path can contain {rootFolder} to be replaced by the root folder of the site, in this ' . 'case it excludes the path parameter used in Drupal when dirty URLs are used (since this is a direct link to a URL)."},
              "url": {"type":"str","desc":"A url that the action link will point to, unless overridden by JavaScript. The url can contain tokens which ' . 'will be subsituted for field values, e.g. for http://www.example.com/image/{id} the {id} is replaced with a field called id in the current row. ' . 'Can also use the subsitution {currentUrl} to link back to the current page, {rootFolder} to represent the folder on the server that the current PHP page is running from, and ' . '{imageFolder} for the image upload folder"},
              "urlParams": {
                "type":"map",
                "subtype":"str",
                "desc":"List of parameters to append to the URL link, with field value replacements such as {id} begin replaced ' . 'by the value of the id field for the current row."
              },
              "class": {"type":"str","desc":"CSS class to attach to the action link."},
              "javascript": {"type":"str","desc":"JavaScript that will be run when the link is clicked. Can contain field value substitutions ' . 'such as {id} which is replaced by the value of the id field for the current row. Because the javascript may pass the field values as parameters to functions, ' . 'there are escaped versions of each of the replacements available for the javascript action type. Add -escape-quote or ' . '-escape-dblquote to the fieldname. For example this would be valid in the action javascript: foo(\\"{bar-escape-dblquote}\\"); ' . 'even if the field value contains a double quote which would have broken the syntax."}
            }
          }]
        },
        "visible": {"type":"bool","desc":"Should this column be shown? Hidden columns can still be used in templates or actions."},
        "template": {"type":"txt","desc":"Allows you to create columns that contain dynamic content using a template, rather than just the output ' . 'of a field. The template text can contain fieldnames in braces, which will be replaced by the respective field values. ' . 'Note that template columns cannot be sorted by clicking grid headers." }
      }
    }
  ]
}', 'required' => false, 'group' => 'Report Settings')));
        // @todo Set the default report name
        foreach ($r as &$param) {
            if ($param['name'] === 'report_name') {
                $param['default'] = 'library/occurrences/explore_list';
                $param['description'] .= '<br/>The report used must meet a set of criteria to be used for this form, as illustrated by the library/occurrences/explore_list ' . 'report. The report should have the following columns:<br/>' . '<strong>belongs_to_user</strong> - a boolean indicating if the record belongs to (i.e. is editable by) the logged in user.<br/>' . '<strong>certainty</strong> - text output which identifies the certainty of the record if known. This is appended to the word ' . 'certainty to make a class which is attached to the row HTML, allowing you to use CSS to style the row output. E.g. if the report ' . 'outputs C in this column then the row HTML will have a class certaintyC.<br/>' . '<br/>The report should have the following parameters:<br/>' . '<strong>location_id</strong> - Warehouse ID of the user\'s preferred recording location passed automatically from the user\'s account. Only applied if own_locality is 1.<br/>' . '<strong>ownLocality</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the location identified by location_id.<br/>' . '<strong>taxon_groups</strong> Takes a comma separated list of taxon_group_ids as a string suitable for insertion into an SQL in (...) clause. ' . 'Will be passed the user\'s preferred species groups from their user account if the Easy Login feature is installed. Only applied if ownGroups is 1.<br/>' . '<strong>ownGroups</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the taxon groups identified by taxon_groups.<br/>' . '<strong>currentUser</strong> Warehouse User ID of the logged in user, used to filter records to their own data. Only applied if ownData is 1.<br/>' . '<strong>ownData</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the user\'s own records.';
            } elseif ($param['name'] === 'param_presets') {
                $param['default'] = "smpattrs=\noccattrs=\nlocation_id={profile_location}\ntaxon_groups={profile_taxon_groups}\ncurrentUser={profile_indicia_user_id}";
            } elseif ($param['name'] === 'param_defaults') {
                $param['default'] = "idlist=\nsearchArea=";
            } elseif ($param['name'] === 'standard_controls') {
                $param['default'] = "layerSwitcher\npanZoomBar";
            }
        }
        return $r;
    }
コード例 #4
0
 /**
  * Get the list of parameters for this form.
  * @return array List of parameters that this form requires.
  */
 public static function get_parameters()
 {
     $paramArray = array_merge(iform_map_get_map_parameters(), iform_report_get_minimal_report_parameters(), array(array('name' => 'first_year', 'caption' => 'First Year of Data', 'description' => 'Used to determine first year displayed in the year control. Final Year will be current year.', 'type' => 'int', 'group' => 'Controls'), array('name' => 'twinMaps', 'caption' => 'Twin Maps', 'description' => 'Display a second map, for data comparison.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Controls'), array('name' => 'advancedUI', 'caption' => 'Advanced UI', 'description' => 'Advanced User Interface: use a slider for date and dot size controls, and a graphical button. Relies on jQuery_ui.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Controls'), array('name' => 'dotSize', 'caption' => 'Dot Size', 'description' => 'Initial size in pixels of observation dots on map. Can be overriden by a control.', 'type' => 'select', 'options' => array('2' => '2', '3' => '3', '4' => '4', '5' => '5'), 'default' => '3', 'group' => 'Controls'), array('name' => 'numberOfDates', 'caption' => 'Number of Dates', 'description' => 'The maximum number of dates displayed on the X-axis. Used to prevent crowding. The minimum spacing is one date displayed per week. Date range is determined by the data.', 'type' => 'int', 'default' => 11, 'group' => 'Controls'), array('name' => 'frameRate', 'caption' => 'Animation Frame Rate', 'description' => 'Number of frames displayed per second.', 'type' => 'int', 'default' => 4, 'group' => 'Controls'), array('name' => 'triggerEvents', 'caption' => 'Event Definition', 'description' => 'JSON encode event definition: an array, one per event type, each with a "name" element, a "type" (either...), an "attr", and a "values"', 'type' => 'textarea', 'group' => 'Events')));
     $retVal = array();
     foreach ($paramArray as $param) {
         if (!in_array($param['name'], array('map_width', 'remember_pos', 'location_boundary_id', 'items_per_page', 'param_ignores', 'param_defaults'))) {
             $retVal[] = $param;
         }
     }
     return $retVal;
 }
コード例 #5
0
ファイル: report.php プロジェクト: BirenRathod/indicia-code
/**
 * Return a list of parameter definitions for a form that includes definition of a report.
 * @return array List of parameter definitions.
 */
function iform_report_get_report_parameters()
{
    return array_merge(iform_report_get_minimal_report_parameters(), array(array('name' => 'output', 'caption' => 'Output Mode', 'description' => 'Select what combination of the params form and report output will be output. This can be used to develop a single page ' . 'with several reports linked to the same parameters form, e.g. using the Drupal panels module.', 'type' => 'select', 'required' => true, 'options' => array('default' => 'Include a parameters form and output', 'form' => 'Parameters form only - the output will be displayed elsewhere.', 'output' => 'Output only - the params form will be output elsewhere.'), 'default' => 'default', 'group' => 'Report Settings'), array('name' => 'param_lookup_extras', 'caption' => 'Params Lookup Extras', 'description' => 'When a report parameter is a lookup, the option allows the setting of the extras that get sent to the warehouse to generate the list. ' . 'For example it would allow a restriction to be placed on the list of location type terms in a select, rather than showing the full set, ' . 'some of which may not be appropriate in this instance. Format is paraKey:extraField=values. The values can be comma separated list, ' . 'but when used with a report (rather than a direct table), the report must be able to handle it as a single string. Care should be ' . 'taken with string values - depending on the report, they may need to be delimited by single inverted commas.', 'type' => 'textarea', 'required' => false, 'group' => 'Report Settings'), array('name' => 'report_group', 'caption' => 'Report group', 'description' => 'When using several reports on a single page (e.g. <a href="http://code.google.com/p/indicia/wiki/DrupalDashboardReporting">dashboard reporting</a>) ' . 'you must ensure that all reports that share a set of input parameters have the same report group as the parameters report.', 'type' => 'text_input', 'default' => 'report', 'group' => 'Report Settings'), array('name' => 'remember_params_report_group', 'caption' => 'Remember report parameters group', 'description' => 'Enter any value in this parameter to allow the report to save its parameters for the next time the report is loaded. ' . 'The parameters are saved site wide, so if several reports share the same value and the same report group then the parameter ' . 'settings will be shared across the reports even if they are on different pages of the site. This functionality ' . 'requires cookies to be enabled on the browser.', 'type' => 'text_input', 'required' => false, 'default' => '', 'group' => 'Report Settings'), array('name' => 'params_in_map_toolbar', 'caption' => 'Params in map toolbar', 'description' => 'Should the report input parameters be inserted into a map toolbar instead of displaying a panel of input parameters at the top? ' . 'This is only useful when there is a map output onto the page which has a toolbar in the top or bottom position.', 'type' => 'checkbox', 'required' => false, 'group' => 'Report Settings'), array('name' => 'row_class', 'caption' => 'Row Class', 'description' => 'A CSS class to add to each row in the grid. Can include field value replacements in braces, e.g. {certainty} to construct ' . 'classes from field values, e.g. to colour rows in the grid according to the data.', 'type' => 'text_input', 'default' => '', 'required' => 'false', 'group' => 'Report Settings'), array('name' => 'refresh_timer', 'caption' => 'Automatic reload seconds', 'description' => 'Set this value to the number of seconds you want to elapse before the report will be automatically reloaded, useful for ' . 'displaying live data updates at BioBlitzes. Combine this with Page to reload to define a sequence of pages that load in turn.', 'type' => 'int', 'required' => false, 'group' => 'Page Refreshing'), array('name' => 'load_on_refresh', 'caption' => 'Page to reload', 'description' => 'Provide the full URL of a page to reload after the number of seconds indicated above.', 'type' => 'string', 'required' => false, 'group' => 'Page Refreshing')));
}