b1540b7431dd355e44bedae67d2e170e63079369190fa6aecdddb4b4f1b976d2.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /* partials/messages.html.twig */
  3. class __TwigTemplate_4176cdc80217a3abaf3287565f9afc83831a355c360f9f9a826e4f6dace4a3c6 extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = false;
  9. $this->blocks = array(
  10. );
  11. }
  12. protected function doDisplay(array $context, array $blocks = array())
  13. {
  14. // line 1
  15. $context["type_mapping"] = array("info" => "success", "error" => "error", "warning" => "warning");
  16. // line 2
  17. $context["icon_mapping"] = array("info" => "checkmark", "error" => "wrong", "warning" => "information");
  18. // line 3
  19. echo "
  20. ";
  21. // line 4
  22. if ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "messages", array()), "all", array())) {
  23. // line 5
  24. echo " <div id=\"messages\">
  25. ";
  26. // line 6
  27. $context['_parent'] = $context;
  28. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "messages", array()), "fetch", array()));
  29. foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  30. // line 7
  31. echo "
  32. ";
  33. // line 8
  34. $context["scope"] = twig_escape_filter($this->env, $this->getAttribute($context["message"], "scope", array()));
  35. // line 9
  36. echo " ";
  37. $context["type"] = $this->getAttribute(($context["type_mapping"] ?? null), ($context["scope"] ?? null), array(), "array");
  38. // line 10
  39. echo " ";
  40. $context["icon"] = $this->getAttribute(($context["icon_mapping"] ?? null), ($context["scope"] ?? null), array(), "array");
  41. // line 11
  42. echo "
  43. <div class=\"toast toast-";
  44. // line 12
  45. echo ($context["type"] ?? null);
  46. echo " ";
  47. echo ($context["scope"] ?? null);
  48. echo "\">
  49. <i class=\"icon dripicons-";
  50. // line 13
  51. echo ($context["icon"] ?? null);
  52. echo "\"></i> ";
  53. echo $this->getAttribute($context["message"], "message", array());
  54. echo "
  55. </div>
  56. ";
  57. }
  58. $_parent = $context['_parent'];
  59. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
  60. $context = array_intersect_key($context, $_parent) + $_parent;
  61. // line 16
  62. echo " </div>
  63. ";
  64. }
  65. }
  66. public function getTemplateName()
  67. {
  68. return "partials/messages.html.twig";
  69. }
  70. public function isTraitable()
  71. {
  72. return false;
  73. }
  74. public function getDebugInfo()
  75. {
  76. return array ( 66 => 16, 55 => 13, 49 => 12, 46 => 11, 43 => 10, 40 => 9, 38 => 8, 35 => 7, 31 => 6, 28 => 5, 26 => 4, 23 => 3, 21 => 2, 19 => 1,);
  77. }
  78. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  79. public function getSource()
  80. {
  81. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  82. return $this->getSourceContext()->getCode();
  83. }
  84. public function getSourceContext()
  85. {
  86. return new Twig_Source("{% set type_mapping = {'info':'success', 'error': 'error', 'warning': 'warning'} %}
  87. {% set icon_mapping = {'info':'checkmark', 'error':'wrong', 'warning':'information'} %}
  88. {% if grav.messages.all %}
  89. <div id=\"messages\">
  90. {% for message in grav.messages.fetch %}
  91. {% set scope = message.scope|e %}
  92. {% set type = type_mapping[scope] %}
  93. {% set icon = icon_mapping[scope] %}
  94. <div class=\"toast toast-{{ type }} {{ scope }}\">
  95. <i class=\"icon dripicons-{{ icon }}\"></i> {{ message.message|raw }}
  96. </div>
  97. {% endfor %}
  98. </div>
  99. {% endif %}", "partials/messages.html.twig", "/mnt/data/Sites/r2c.net/user/themes/r2c/templates/partials/messages.html.twig");
  100. }
  101. }