Skip to content

Commit

Permalink
Merge pull request #26516 from eileenmcnaughton/import_admin2
Browse files Browse the repository at this point in the history
Add All imports menu item for users with Administer Queues
  • Loading branch information
colemanw authored Jun 12, 2023
2 parents f113935 + 5b6def1 commit 88010ee
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 1 deletion.
74 changes: 73 additions & 1 deletion ext/civiimport/Managed/UserJobSearches.mgd.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
'params' => [
'version' => 4,
'values' => [
'name' => 'Imports',
'name' => 'all_imports',
'label' => 'Imports',
'form_values' => NULL,
'mapping_id' => NULL,
Expand Down Expand Up @@ -211,4 +211,76 @@
],
],
],
[
'name' => 'SavedSearch_Import_Templates_SearchDisplay_AllImports',
'entity' => 'SearchDisplay',
'cleanup' => 'always',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
'name' => 'all_imports',
'label' => E::ts('All Imports'),
'saved_search_id.name' => 'all_imports',
'type' => 'table',
'settings' => [
'description' => E::ts('All import jobs'),
'sort' => [],
'limit' => 50,
'pager' => [],
'placeholder' => 5,
'columns' => [
[
'type' => 'field',
'key' => 'id',
'dataType' => 'Integer',
'label' => E::ts('ID'),
'sortable' => TRUE,
],
[
'type' => 'field',
'key' => 'created_id.display_name',
'dataType' => 'String',
'label' => E::ts('Created By'),
'sortable' => TRUE,
],
[
'type' => 'field',
'key' => 'name',
'dataType' => 'String',
'label' => E::ts('Import Name'),
'sortable' => TRUE,
'link' => [
'path' => 'civicrm/import/contribution?reset=1&template_id=[id]',
'entity' => '',
'action' => '',
'join' => '',
'target' => '',
],
],
[
'type' => 'field',
'key' => 'created_date',
'dataType' => 'Timestamp',
'label' => E::ts('Created Date'),
'sortable' => TRUE,
],
[
'type' => 'field',
'key' => 'job_type:label',
'dataType' => 'String',
'label' => E::ts('Type'),
'sortable' => TRUE,
],
],
'actions' => TRUE,
'classes' => [
'table',
'table-striped',
],
],
'acl_bypass' => FALSE,
],
],
],
];
3 changes: 3 additions & 0 deletions ext/civiimport/ang/afsearchAllImports.aff.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div af-fieldset="">
<crm-search-display-table search-name="all_imports" display-name="all_imports"></crm-search-display-table>
</div>
23 changes: 23 additions & 0 deletions ext/civiimport/ang/afsearchAllImports.aff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"type": "search",
"requires": [],
"entity_type": null,
"join_entity": null,
"title": "All Imports",
"description": "",
"is_dashlet": false,
"is_public": false,
"is_token": false,
"contact_summary": null,
"summary_contact_type": null,
"icon": "fa-list-alt",
"server_route": "civicrm/imports/all-imports",
"permission": "administer queues",
"redirect": null,
"create_submission": false,
"navigation": {
"parent": "Reports",
"label": "All imports",
"weight": 17
}
}

0 comments on commit 88010ee

Please sign in to comment.