AutorÃa | Ultima modificación | Ver Log |
{{!
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/>.
}}
{{!
@template filter_glossary/linked_glossary_entry
Renders the linked glossary entry.
Context variables required for this template:
* definition - The definition of the linked glossary entry.
* taglistdata - The data for the tag list related to the linked glossary entry.
* hasattachments - Whether the linked glossary entry has attachments.
* attachments - The data for the attachments related to the linked glossary entry.
Example context (json):
{
"definition": 1,
"taglistdata": {
"tags": [
{
"id": 1,
"name": "Cats",
"viewurl": "http://moodle.org/tag/index.php?tag=Cats",
"isstandard": true,
"flag": 0
}
],
"label": "Tags",
"tagscount": 1,
"overflow": false
},
"hasattachments": true,
"attachments": [
{
"filename": "example.jpg",
"fileurl": "www.example.com/example.jpg",
"icon": "f/image"
}
]
}
}}
<p>{{{definition}}}</p>
{{#taglistdata}}
<div class="mb-2">
{{> core_tag/taglist }}
</div>
{{/taglistdata}}
{{#hasattachments}}
<strong>{{#str}} attachments, filter_glossary {{/str}}:</strong>
<ul>
{{#attachments}}
<li>
{{#pix}} {{icon}}, core {{/pix}}
<a href="{{{fileurl}}}">
{{filename}}
</a>
</li>
{{/attachments}}
</ul>
{{/hasattachments}}