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
<div class="rui-book-wrapper wrapper-fw">
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
                <span class="badge-sq badge-light">
54
                    <svg class="mr-2" width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
55
                        <path d="M12.75 4.75H7.75C6.64543 4.75 5.75 5.64543 5.75 6.75V17.25C5.75 18.3546 6.64543 19.25 7.75 19.25H16.25C17.3546 19.25 18.25 18.3546 18.25 17.25V10.25M12.75 4.75V8.25C12.75 9.35457 13.6454 10.25 14.75 10.25H18.25M12.75 4.75L18.25 10.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
56
                        <path d="M8.75 15.75H15.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
57
                        <path d="M8.75 12.75H11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
58
                    </svg>
59
                    {{# str }} steppolicies, tool_policy,
60
                        { "numpolicy": {{# quote }}{{numpolicy}}{{/quote }}, "totalpolicies": {{# quote }}{{totalpolicies}}{{/ quote }} }
61
                    {{/ str }}
62
                </span>
63
            </div>
64
        {{/ numpolicy }}
65
    </div>
66
 
67
 
68
    {{# numpolicy }}
69
        <div class="clearfix mt-2">
70
            <h3>{{# str }}readpolicy, tool_policy, {{{policy.name}}} {{/ str }}</h3>
71
        </div>
72
    {{/ numpolicy }}
73
 
74
    <hr>
75
 
76
    <div class="policy_document mt-1">
77
        <div class="policy_document_summary clearfix mb-1">
78
            {{{policy.summary}}}
79
        </div>
80
        <div class="policy_document_content mt-2">
81
            {{{policy.content}}}
82
        </div>
83
    </div>
84
 
85
    <hr>
86
 
87
    <div class="policy_buttons">
88
        {{#returnurl}}
89
            {{# numpolicy }}
90
                <a role="button" href="{{returnurl}}" class="btn btn-success">
91
                    <span class="mr-2">{{#str}} next {{/str}}</span>
92
                    <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
93
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5.75 12.8665L8.33995 16.4138C9.15171 17.5256 10.8179 17.504 11.6006 16.3715L18.25 6.75"></path>
94
                    </svg>
95
                </a>
96
            {{/ numpolicy }}
97
            {{^ numpolicy }}
98
                <a role="button" href="{{returnurl}}" class="btn btn-primary">{{#str}} back {{/str}}</a>
99
            {{/ numpolicy }}
100
        {{/returnurl}}
101
        {{#editurl}}
102
            <a role="button" href="{{editurl}}" class="btn btn-secondary">{{#str}} edit {{/str}}</a>
103
        {{/editurl}}
104
        {{#accepturl}}
105
            <a role="button" href="{{accepturl}}" class="btn btn-success">
106
                <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
107
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5.75 12.8665L8.33995 16.4138C9.15171 17.5256 10.8179 17.504 11.6006 16.3715L18.25 6.75"></path>
108
                </svg>
109
                <span class="ml-2">{{#str}} iagree, tool_policy, {{{policy.name}}} {{/str}}</span>
110
            </a>
111
        {{/accepturl}}
112
        {{#declineurl}}
113
            <a role="button" href="{{declineurl}}" class="btn btn-danger">
114
                <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
115
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17.25 6.75L6.75 17.25"></path>
116
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6.75 6.75L17.25 17.25"></path>
117
                </svg>
118
                <span class="ml-2">{{#str}} idontagree, tool_policy, {{{policy.name}}} {{/str}}</span>
119
            </a>
120
        {{/declineurl}}
121
 
122
        <div class="float-right">
123
            <a href="#top" class="btn btn-secondary">
124
                <span class="mr-2">{{# str }} backtotop, tool_policy {{/ str }}</span>
125
                <svg xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="none" viewBox="0 0 24 24">
126
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 10.25L12 4.75L6.75 10.25"></path>
127
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19.25V5.75"></path>
128
                </svg>
129
            </a>
130
        </div>
131
    </div>
132
</div>