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_viewdoc
19
 
20
    Template for viewing a policy version document.
21
 
22
    Classes required for JS:
23
    -
24
 
25
    Data attributes required for JS:
26
    -
27
 
28
    Context variables required for this template:
29
    * policy - version document object.
30
 
31
    Example context (json):
32
    {
33
        "numpolicy": 1,
34
        "totalpolicies": 2,
35
        "policy": {
36
            "name": "Terms &amp; conditions",
37
            "summary": "Policy <u>summary</u>",
38
            "content": "Policy <em>content</em>"
39
        },
40
        "returnurl": "#",
41
        "editurl": "#",
42
        "accepturl": "#"
43
    }
44
}}
45
 
46
<a id="top"></a>
47
<div class="clearfix">
48
    <div class="float-left">
49
        <h2>{{{policy.name}}}</h2>
50
    </div>
51
    {{# numpolicy }}
52
        <div class="float-right">
53
            {{# str }} steppolicies, tool_policy,
54
                { "numpolicy": {{# quote }}{{numpolicy}}{{/quote }}, "totalpolicies": {{# quote }}{{totalpolicies}}{{/ quote }} }
55
            {{/ str }}
56
        </div>
57
    {{/ numpolicy }}
58
</div>
59
 
60
 
61
{{# numpolicy }}
62
    <div class="clearfix mt-2">
63
        <h3>{{# str }}readpolicy, tool_policy, {{{policy.name}}} {{/ str }}</h3>
64
    </div>
65
{{/ numpolicy }}
66
 
67
<hr>
68
 
69
<div class="policy_document mt-1">
70
    <div class="policy_document_summary clearfix mb-1">
71
        {{{policy.summary}}}
72
    </div>
73
    <div class="policy_document_content mt-2">
74
        {{{policy.content}}}
75
    </div>
76
</div>
77
 
78
<hr>
79
 
80
<div class="policy_buttons">
81
    {{#returnurl}}
82
        {{# numpolicy }}
83
            <a role="button" href="{{returnurl}}" class="btn btn-primary">{{#str}} next {{/str}}</a>
84
        {{/ numpolicy }}
85
        {{^ numpolicy }}
86
            <a role="button" href="{{returnurl}}" class="btn btn-primary">{{#str}} back {{/str}}</a>
87
        {{/ numpolicy }}
88
    {{/returnurl}}
89
    {{#editurl}}
90
        <a role="button" href="{{editurl}}" class="btn">{{#str}} edit {{/str}}</a>
91
    {{/editurl}}
92
    {{#accepturl}}
93
        <a role="button" href="{{accepturl}}" class="btn btn-primary">{{#str}} iagree, tool_policy, {{{policy.name}}} {{/str}}</a>
94
    {{/accepturl}}
95
    {{#declineurl}}
96
        <a role="button" href="{{declineurl}}" class="btn btn-link">{{#str}} idontagree, tool_policy, {{{policy.name}}} {{/str}}</a>
97
    {{/declineurl}}
98
 
99
    <div class="float-right">
100
        <a href="#top">
101
            {{# str }} backtotop, tool_policy {{/ str }}
102
            <i class="icon text-primary fa fa-caret-up" title="{{# str }} backtotop, tool_policy {{/ str }}" ></i>
103
        </a>
104
    </div>
105
</div>