Server IP : 68.65.122.142  /  Your IP : 3.147.242.119
Web Server : LiteSpeed
System : Linux server167.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : glenirhm ( 1318)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/glenirhm/lscache/../lms.myglenbow.ca/old/search/templates/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/glenirhm/lscache/..//lms.myglenbow.ca/old/search/templates/result.mustache
{{!
    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 core_search/result

    Template which shows a search result.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Context variables required for this template:
    * courseurl
    * coursefullname
    * title
    * docurl
    * contexturl

    Optional context variables for this template:
    * content
    * userurl
    * userfullname
    * description1
    * description2
    * filename
    * multiplefiles
    * filenames

    Example context (json):
    {
        "courseurl": "https://example.com/course/view.php?id=2",
        "coursefullname": "Example course",
        "title": "Example title",
        "docurl": "https://example.com/mod/example/view.php?id=4",
        "content": "I am content",
        "contexturl": "https://example.com/mod/example/view.php?id=2",
        "userurl": "https://example.com/user/profile.php?id=3",
        "userfullname": "Example User Full Name",
        "multiplefiles": true,
        "filenames":
        [
            "file1.txt",
            "file2.txt"
        ]
    }
}}
<div class="result">
    <h4 class="result-title">
        {{#icon}}<img class="icon" alt="" src="{{{icon}}}">{{/icon}}<a href="{{{docurl}}}">{{{title}}}</a>
    </h4>
    {{#content}}
        <div class="result-content">{{{content}}}</div>
    {{/content}}
    {{#description1}}
        <div class="result-content">{{{description1}}}</div>
    {{/description1}}
    {{#description2}}
        <div class="result-content">{{{description2}}}</div>
    {{/description2}}
    {{#filename}}
        <div class="result-content-filename">
            {{#str}}matchingfile, search, {{{filename}}}{{/str}}
        </div>
    {{/filename}}
    {{#multiplefiles}}
        <div class="result-content-filenames">
            {{#str}}matchingfiles, search{{/str}}<br>
            <ul class="list">
            {{#filenames}}
                <li><span class="filename">{{.}}</span></li>
            {{/filenames}}
            </ul>
        </div>
    {{/multiplefiles}}
    <div class="result-context-info">
        <a href="{{{contexturl}}}">{{#str}}viewresultincontext, search{{/str}}</a> -
        <a href="{{{courseurl}}}">{{#str}}incourse, search, {{{coursefullname}}}{{/str}}</a>
        {{#userfullname}}
            - <a href="{{{userurl}}}">{{#str}}byname, moodle, {{{userfullname}}}{{/str}}</a>
        {{/userfullname}}
    </div>
</div>