Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 License
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
    @template tool_policy/page_viewalldoc
19
 
20
    Template for viewing all policy versions, one under another.
21
 
22
    Classes required for JS:
23
    -
24
 
25
    Data attributes required for JS:
26
    -
27
 
28
    Context variables required for this template:
29
    * returnurl - url to the previous page
30
    * policies - policy array
31
 
32
    Example context (json):
33
    {
34
        "returnurl": "#",
35
        "policies": [
36
            {
37
                "id": "2",
38
                "name": "Terms &amp; conditions",
39
                "summary": "Policy <u>summary</u>",
40
                "content": "Policy <em>content</em>",
41
                "policytypestr": "Site policy",
42
                "policyaudiencestr": "All users"
43
            },
44
            {
45
                "id": "5",
46
                "name": "Privacy",
47
                "summary": "We keep your information private",
48
                "content": "Very private",
49
                "policytypestr": "Privacy policy",
50
                "policyaudiencestr": "Authenticated users"
51
            }
52
        ]
53
    }
54
}}
55
 
56
{{#returnurl}}
57
<div class="text-right mb-1">
58
    <a href="{{returnurl}}">{{# str }} backtoprevious, tool_policy {{/ str }}</a>
59
</div>
60
{{/returnurl}}
61
 
62
<a id="top"></a>
63
<div id="policies_index">
64
<h1>{{# str }} listactivepolicies, tool_policy {{/ str }}</h1>
65
<table class="table">
66
    <thead>
67
    <tr>
68
        <th scope="col">{{# str }}policydocname, tool_policy {{/ str }}</th>
69
        <th scope="col">{{# str }}policydoctype, tool_policy {{/ str }}</th>
70
        <th scope="col">{{# str }}policydocaudience, tool_policy {{/ str }}</th>
71
    </tr>
72
    </thead>
73
    <tbody>
74
    {{#policies }}
75
        <tr>
76
            <td><a href="#policy-{{id}}">{{{name}}}</a></td>
77
            <td>{{{ policytypestr }}}</td>
78
            <td>{{{ policyaudiencestr }}}</td>
79
        </tr>
80
    {{/policies }}
81
    </tbody>
82
</table>
83
</div>
84
 
85
{{^policies }}
86
    {{# str }} noactivepolicies, tool_policy {{/ str }}
87
{{/policies }}
88
 
89
{{#policies }}
90
        <hr>
91
    <div class="policy_version mb-3">
92
        <div class="clearfix mt-2">
93
            <h2><a id="policy-{{id}}">{{{name}}}</a></h2>
94
        </div>
95
        <div class="policy_document_summary clearfix mb-1">
96
            <h3>{{# str }} policydocsummary, tool_policy {{/ str }}</h3>
97
            {{{summary}}}
98
        </div>
99
        <div class="policy_document_content mt-2">
100
            <h3>{{# str }} policydoccontent, tool_policy {{/ str }}</h3>
101
            {{{content}}}
102
        </div>
103
        <div class="float-right">
104
            <a href="#top">
105
                {{# str }} backtotop, tool_policy {{/ str }}
106
                <i class="icon text-primary fa fa-caret-up" title="{{# str }} backtotop, tool_policy {{/ str }}" ></i>
107
            </a>
108
        </div>
109
    </div>
110
 
111
{{/policies }}