| 1 | efrain | 1 | {{!
 | 
        
           |  |  | 2 |     This file is part of Moodle - http://moodle.org/
 | 
        
           |  |  | 3 |   | 
        
           |  |  | 4 |     Moodle is free software: you can redistribute it and/or modify
 | 
        
           |  |  | 5 |     it under the terms of the GNU General Public License as published by
 | 
        
           |  |  | 6 |     the Free Software Foundation, either version 3 of the License, or
 | 
        
           |  |  | 7 |     (at your option) any later version.
 | 
        
           |  |  | 8 |   | 
        
           |  |  | 9 |     Moodle is distributed in the hope that it will be useful,
 | 
        
           |  |  | 10 |     but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
        
           |  |  | 11 |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
        
           |  |  | 12 |     GNU General Public License for more details.
 | 
        
           |  |  | 13 |   | 
        
           |  |  | 14 |     You should have received a copy of the GNU General Public Licensebllsdsadfasfd
 | 
        
           |  |  | 15 |     along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 | 
        
           |  |  | 16 | }}
 | 
        
           |  |  | 17 | {{!
 | 
        
           |  |  | 18 |     @template block_recentlyaccesseditems/view-cards
 | 
        
           |  |  | 19 |   | 
        
           |  |  | 20 |     This template renders the items cards of the Recently accessed items block.
 | 
        
           |  |  | 21 |   | 
        
           |  |  | 22 |     Example context (json):
 | 
        
           |  |  | 23 |     {
 | 
        
           |  |  | 24 |         "items": [
 | 
        
           |  |  | 25 |             {
 | 
        
           |  |  | 26 |                 "cmid": 64,
 | 
        
           |  |  | 27 |                 "courseid": 2,
 | 
        
           |  |  | 28 |                 "coursename": "Course",
 | 
        
           |  |  | 29 |                 "courseviewurl": "https://moodlesite/course/view.php?id=2",
 | 
        
           |  |  | 30 |                 "icon": "<img class=\"icon\" alt=\"Forum\" title=\"Forum\" src=\"http://moodlesite/theme/image.php/boost/forum/1539858121/icon\" />",
 | 
        
           |  |  | 31 |                 "name": "Assignment due 1",
 | 
        
           |  |  | 32 |                 "id": 17,
 | 
        
           |  |  | 33 |                 "modname": "Forum",
 | 
        
           |  |  | 34 |                 "name": "Forum",
 | 
        
           |  |  | 35 |                 "timeaccess": 1539848498,
 | 
        
           |  |  | 36 |                 "userid": 2,
 | 
        
           |  |  | 37 |                 "viewurl": "http://moodlesite/mod/forum?id=64",
 | 
        
           |  |  | 38 |                 "purpose": "assessment"
 | 
        
           |  |  | 39 |             }
 | 
        
           |  |  | 40 |         ]
 | 
        
           |  |  | 41 |     }
 | 
        
           |  |  | 42 | }}
 | 
        
           |  |  | 43 |   | 
        
           |  |  | 44 | <div data-region="items-list" role="list">
 | 
        
           |  |  | 45 |     {{#items}}
 | 
        
           | 11 | efrain | 46 |         <div class="card mb-1" role="listitem">
 | 
        
           |  |  | 47 |             <a href="{{{viewurl}}}" title="{{{name}}}">
 | 
        
           | 1 | efrain | 48 |                 <div class="card-body p-2 m-1">
 | 
        
           |  |  | 49 |                     <div class="d-flex text-truncate">
 | 
        
           |  |  | 50 |                         <div class="d-flex align-self-center activityiconcontainer">
 | 
        
           |  |  | 51 |                             {{{icon}}}
 | 
        
           |  |  | 52 |                         </div>
 | 
        
           |  |  | 53 |                         <div class="w-100 line-height-3 text-truncate ml-2">
 | 
        
           |  |  | 54 |                             <h6 class="mb-0 text-truncate"><span class="clickable">{{{name}}}</span></h6>
 | 
        
           |  |  | 55 |                             <small class="text-truncate mb-0">{{{coursename}}}</small>
 | 
        
           |  |  | 56 |                         </div>
 | 
        
           |  |  | 57 |                     </div>
 | 
        
           |  |  | 58 |                 </div>
 | 
        
           |  |  | 59 |             </a>
 | 
        
           |  |  | 60 |         </div>
 | 
        
           |  |  | 61 |     {{/items}}
 | 
        
           |  |  | 62 | </div>
 | 
        
           |  |  | 63 | {{#hasmoreitems}}
 | 
        
           |  |  | 64 |     <div data-region="more-items-button-container" class="mt-2 px-1">
 | 
        
           |  |  | 65 |         <button type="button" class="btn btn-secondary btn-sm" data-action="more-items">
 | 
        
           |  |  | 66 |             {{#str}}moreitems, block_recentlyaccesseditems {{/str}}
 | 
        
           |  |  | 67 |         </button>
 | 
        
           |  |  | 68 |     </div>
 | 
        
           |  |  | 69 | {{/hasmoreitems}}
 |