1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
4 |
it under the terms of the GNU General Public License as published by
|
|
|
5 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
6 |
(at your option) any later version.
|
|
|
7 |
Moodle is distributed in the hope that it will be useful,
|
|
|
8 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
9 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
10 |
GNU General Public License for more details.
|
|
|
11 |
You should have received a copy of the GNU General Public License
|
|
|
12 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
13 |
}}
|
|
|
14 |
{{!
|
|
|
15 |
@template mod_data/defaulttemplate_listtemplate
|
|
|
16 |
|
|
|
17 |
Default template for the list view page in the database activity.
|
|
|
18 |
|
|
|
19 |
Context variables required for this template:
|
|
|
20 |
* fields - The database fields to display
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"fields": [
|
|
|
25 |
{
|
|
|
26 |
"fieldname": "Field1",
|
|
|
27 |
"fieldcontent": "[[Field1]]"
|
|
|
28 |
},
|
|
|
29 |
{
|
|
|
30 |
"fieldname": "Field2",
|
|
|
31 |
"fieldcontent": "[[Field2]]"
|
|
|
32 |
}
|
|
|
33 |
]
|
|
|
34 |
}
|
|
|
35 |
}}
|
|
|
36 |
<div class="defaulttemplate-listentry my-5 p-5 card">
|
|
|
37 |
<div class="row my-6">
|
|
|
38 |
<div class="col-auto">##userpicture##</div>
|
|
|
39 |
<div class="col">
|
|
|
40 |
<div class="row h-100">
|
|
|
41 |
<div class="col-3 align-self-center">
|
|
|
42 |
##user##<br/><span class="data-timeinfo">##timeadded##</span>
|
|
|
43 |
</div>
|
|
|
44 |
<div class="col-4 col-md-6 text-right align-self-center data-timeinfo">
|
|
|
45 |
<span class="font-weight-bold ">{{#str}}datemodified, mod_data{{/str}} </span>##timemodified##
|
|
|
46 |
</div>
|
|
|
47 |
<div class="col-4 col-md-3 ml-auto align-self-center d-flex flex-row-reverse">
|
|
|
48 |
<div>##actionsmenu##</div>
|
|
|
49 |
<div class="ml-auto my-auto ##approvalstatusclass##">##approvalstatus##</div>
|
|
|
50 |
</div>
|
|
|
51 |
</div>
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|
|
|
54 |
<hr/>
|
|
|
55 |
|
|
|
56 |
<div class="defaulttemplate-list-body">
|
|
|
57 |
{{#fields}}
|
|
|
58 |
<div class="row my-3 align-items-start justify-content-start">
|
|
|
59 |
<div class="col-4 col-lg-3 font-weight-bold">{{fieldname}}</div>
|
|
|
60 |
<div class="col-8 col-lg-9 ml-n3">{{{fieldcontent}}}</div>
|
|
|
61 |
</div>
|
|
|
62 |
{{/fields}}
|
|
|
63 |
{{#tags}}
|
|
|
64 |
<div class="mb-4">
|
|
|
65 |
<span class="font-weight-bold">{{#str}}tags{{/str}}</span>
|
|
|
66 |
<p class="mt-2">{{.}}</p>
|
|
|
67 |
</div>
|
|
|
68 |
{{/tags}}
|
|
|
69 |
</div>
|
|
|
70 |
</div>
|