{% extends "sprout-base-reports/_layouts/elementindex" %} {% set elementType = 'barrelstrength\\sproutbase\\app\\reports\\elements\\Report' %} {#{% import 'sprout-base/_includes/sproutcp' as sprout %}#} {% set title = "Reports"|t('sprout-base') %} {% if currentPluginHandle == 'sprout-reports' %} {% set selectedTab = 'reports' %} {% endif %} {% block actionButton %} {#@todo - where do we add a report edit permission to Sprout Integrations?#} {#Can we have each integration define a permission with the same name?#} {% if currentUser.can('sproutReports-editReports') %} {% if newReportOptions|length > 1 %}
{{ "Select the 'New Report' button in the top right to get started. Active Reports will be listed right here once they have been created."|t('sprout-base')|raw }}
#} {#{% endset %}#} {#{{ sprout.mediaBox({#} {#heading: "Create a custom report"|t('sprout-base'),#} {#body: boxBody,#} {#resourcePath: '@sproutbase/web/assets/sproutreports/dist/images/icon.svg'#} {#}) }}#} {#{% endif %}#} {#{% endblock %}#} {#{% block sidebar %}#} {#{% if currentPluginHandle == 'sprout-reports' %}#} {#{% set groups = craft.sproutReports.getReportGroups() %}#} {##} {#{% if currentUser.can('sproutReports-editReports') %}#} {##} {#{% endif %}#} {#{% endif %}#} {#{% endblock %}#} {#{% do view.registerAssetBundle("barrelstrength\\sproutbase\\web\\assets\\cp\\CpAsset") %}#} {#{% do view.registerAssetBundle("barrelstrength\\sproutbase\\web\\assets\\groups\\GroupsAsset") %}#} {#{% js %}#} {#new Craft.SproutBase.GroupsAdmin({#} {#groupsSelector: '#groups',#} {#newGroupButtonSelector: '#newgroupbtn',#} {#groupSettingsSelector: '#groupsettingsbtn',#} {#newGroupAction: 'sprout-base/reports/save-group',#} {#newGroupOnSuccessUrlBase: 'sprout-reports/reports',#} {#newGroupOnErrorMessage: Craft.t('sprout-base', 'Could not create the group:'),#} {#renameGroupAction: 'sprout-base/reports/save-group',#} {#renameGroupOnSuccessMessage: Craft.t('sprout-base', 'Group renamed.'),#} {#renameGroupOnErrorMessage: Craft.t('sprout-base', 'Could not rename the group:'),#} {#promptForGroupNameMessage: Craft.t('sprout-base', 'What do you want to name your group?'),#} {#deleteGroupAction: 'sprout-base/reports/delete-group',#} {#deleteGroupOnSuccessUrl: 'sprout-reports/reports',#} {#deleteGroupConfirmMessage: Craft.t('sprout-base', 'Are you sure you want to delete this group and all its reports?'),#} {#deleteGroupOnErrorMessage: Craft.t('sprout-base', 'Could not delete the group.'),#} {#});#} {#{% endjs %}#}