{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{#hasrecentforums}}
<table class="table generaltable">
  <thead class="h-semibold-6">
    <tr>
      <th class="header">{{#str}}discussion, forum{{/str}}</th>
      <th class="header">{{#str}}activity, moodle{{/str}}</th>
      <th class="header">{{#str}}users, moodle{{/str}}</th>
      <th class="header">{{#str}}replies, forum{{/str}}</th>
      <th class="header text-nowrap">{{#str}}lastpost, forum{{/str}}</th>
      <th class="header">{{#str}}lastpostdate, local_edwiserpagebuilder{{/str}}</th>
    </tr>
  </thead>
  <tbody>
    {{# recentforums }}
    <tr>
      <td>
        <a href="{{# content }}{{ discussurl }}?d={{ discussion }}#p{{ id }}{{/ content }}"
          style="text-decoration: none;">{{ content.subject }}
        </a>
      </td>
      <td>
        <a href="{{ forumurl }}?id={{ cmid }}" style="text-decoration: none;">
          {{{coursefullname}}} / {{{forumname}}}
        </a>
      </td>
      <td>
        {{# recentuser}}
        <a href="{{ userurl }}?id={{ id }}" style="text-decoration: none;">
          {{{profilepicture}}}
        </a>
        {{/ recentuser}}
      </td>
      <td>{{ replies }}</td>
      <td>
        <span class="">{{#user}}{{firstname}} {{lastname}}{{/user}}</span>
      </td>
      <td>{{posttime}} </td>
    </tr>
    {{/ recentforums }}
  </tbody>
</table>
{{/hasrecentforums}}
{{^hasrecentforums}}
<div class="widget-content tab-content">
  <div class="d-flex flex-column justify-content-center align-items-center no-data-wrapper mx-auto">
    <span > <img class="epb-img-icon" src="{{{nodataimg}}}"  width="60" height="60"> </span>
    <div class="no-data-msg">
      {{#str}}norecentforums, local_edwiserpagebuilder{{/str}}
    </div>
  </div>
</div>
{{/hasrecentforums}}
