|
40 | 40 | use Glpi\Application\View\TemplateRenderer; |
41 | 41 | use Glpi\Dashboard\Widget as GlpiDashboardWidget; |
42 | 42 | use GlpiPlugin\Carbon\Documentation; |
| 43 | +use GlpiPlugin\Carbon\Impact\Type; |
43 | 44 | use GlpiPlugin\Carbon\Report; |
44 | 45 | use GlpiPlugin\Carbon\Toolbox; |
45 | 46 | use Monitor; |
@@ -744,7 +745,7 @@ public static function displayMonthlyCarbonEmission(array $params = []): string |
744 | 745 | $last_month['series'][0]['unit'] |
745 | 746 | ); |
746 | 747 |
|
747 | | - $url = Documentation::getInfoLink('carbon_emission'); |
| 748 | + $url = Type::getCriteriaInfoLink('gwp'); |
748 | 749 | $tooltip = __('Evaluates the usage carbon emission in CO₂ equivalent during the last 2 months. %s More information %s', 'carbon'); |
749 | 750 | $tooltip = sprintf($tooltip, '<br /><a target="_blank" href="' . $url . '">', '</a>'); |
750 | 751 | $tooltip_html = Html::showToolTip($tooltip, [ |
@@ -810,7 +811,7 @@ public static function displayUsageCarbonEmissionYearToDate(array $params = []): |
810 | 811 | break; |
811 | 812 | } |
812 | 813 |
|
813 | | - $url = Documentation::getInfoLink('carbon_emission'); |
| 814 | + $url = Type::getCriteriaInfoLink('gwp'); |
814 | 815 | $tooltip = __('Evaluates the usage carbon emission in CO₂ equivalent during the last 12 elapsed months. %s More information %s', 'carbon'); |
815 | 816 | $tooltip = sprintf($tooltip, '<br /><a target="_blank" href="' . $url . '">', '</a>'); |
816 | 817 | $tooltip_html = Html::showToolTip($tooltip, [ |
@@ -845,12 +846,11 @@ public static function displayImpactCriteriaNumber(array $params = []): string |
845 | 846 | 'alt' => '', |
846 | 847 | 'color' => '', |
847 | 848 | 'icon' => '', |
848 | | - 'id' => 'plugin_carbon_embodied_primary_energy_' . mt_rand(), |
| 849 | + 'id' => 'plugin_carbon_impact_criteria_' . mt_rand(), |
849 | 850 | 'filters' => [], // TODO: Not implemented yet (is this useful ?) |
850 | 851 | ]; |
851 | 852 | $p = array_merge($default, $params); |
852 | 853 |
|
853 | | - $url = Documentation::getInfoLink('primary_energy_impact'); |
854 | 854 | $url = $p['doc_url']; |
855 | 855 | $tooltip = $p['tooltip']; |
856 | 856 | $tooltip .= '<br /><a target="_blank" href="' . $url . '">' |
@@ -892,7 +892,7 @@ public static function displayUsageAbioticDepletion(array $params = []): string |
892 | 892 | ]; |
893 | 893 | $p = array_merge($default, $params); |
894 | 894 |
|
895 | | - $url = Documentation::getInfoLink('abiotic_depletion_impact'); |
| 895 | + $url = Type::getCriteriaInfoLink('adp'); |
896 | 896 | $tooltip = __('Evaluates the consumption of non renewable resources in Antimony equivalent. %s More information %s', 'carbon'); |
897 | 897 | $tooltip = sprintf($tooltip, '<br /><a target="_blank" href="' . $url . '">', '</a>'); |
898 | 898 | $tooltip_html = Html::showToolTip($tooltip, [ |
|
0 commit comments