{% extends "sprout-base-reports/_layouts/base" %} {% import "_includes/forms" as forms %} {% if not currentUser.can('sproutReports-editDataSources') %} {% redirect 'sprout-reports' %} {% endif %} {% set title = "Data Sources"|t('sprout-reports') %} {% set groups = craft.sproutReports.getReportGroups() %} {% set selectedSubnavItem = 'datasources' %} {% if groupId is defined %} {% if groups[groupId] is not defined %} {% exit 404 %} {% endif %} {% set reports = craft.sproutReports.getReportsByGroupId(groupId) %} {% else %} {% set reports = craft.sproutReports.getReports() %} {% endif %} {% block content %}
| {{ "Data Source"|t('sprout-reports') }} | {{ "Description"|t('sprout-reports') }} | {{ "Plugin"|t('sprout-reports') }} | {{ "Total Reports"|t('sprout-reports') }} | {{ "Allow New?"|t('sprout-reports') }} {{ "Allow users to create a new Report from this Data Source from the New Report dropdown. If disabled, any existing Reports using this Data Source will still be visible to all users in the list of Reports. Users with the 'Edit Data Sources' permission can always create a new Report from this page. "|t('sproutreports') }} | |
|---|---|---|---|---|---|
| {{ dataSource.getName() }} | {{ dataSource.getDescription() }} | {{ dataSource.getPlugin().name }} | {{ dataSource.getReportCount() }} | {% set allowNew = dataSource.allowNew() %} {{ forms.lightswitchField({ id: dataSource.dataSourceId, on: allowNew, name: 'allowNew', small: true }) }} | {{ "New Report"|t('sprout-reports') }} |