Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 17... Línea 17...
17
{{!
17
{{!
18
    @template core_course/activitychooserbutton
18
    @template core_course/activitychooserbutton
Línea 19... Línea 19...
19
 
19
 
Línea 20... Línea -...
20
    Displays a add activity or resource button.
-
 
21
 
-
 
22
    Context variables required for this template:
-
 
23
    * sectionid - Relative section number (field course_sections.section).
-
 
24
    * sectionreturn - The section to link back to.
20
    Displays a add activity or resource button.
25
 
21
 
-
 
22
    Example context (json):
26
    Example context (json):
23
    {
-
 
24
        "hasactionlinks": false,
-
 
25
        "sectionnum": 0,
-
 
26
        "sectionname": "Section example",
27
    {
27
        "modid": 1,
28
        "sectionid": 1,
28
        "activityname": "Activity example",
29
        "sectionreturn": 0
29
        "sectionreturn": 0
-
 
30
    }
-
 
31
}}
-
 
32
 
30
    }
33
{{! Single button to add a new activity or resource. }}
-
 
34
{{^hasactionlinks}}
-
 
35
    {{> core_course/addresourceoractivitybutton }}
31
}}
36
{{/hasactionlinks}}
32
{{< core_courseformat/local/content/divider}}
37
 
-
 
38
{{! Dropdown with "add a new activity or resource" item and any other action links. }}
33
    {{$extraclasses}}always-visible my-3{{/extraclasses}}
39
{{#hasactionlinks}}
-
 
40
<div class="dropdown">
-
 
41
    <button class="btn add-content d-flex justify-content-center align-items-center p-1 icon-no-margin"
-
 
42
            type="button"
34
    {{$content}}
43
            id="dropdownMenuButton-{{#modid}}{{modid}}{{/modid}}{{^modid}}{{uniqid}}{{/modid}}"
-
 
44
            data-bs-toggle="dropdown"
35
        <button class="btn add-content section-modchooser section-modchooser-link d-flex justify-content-center align-items-center py-1 px-2"
45
            data-action="open-addingcontent"
-
 
46
            {{#modid}}
-
 
47
            data-beforemod="{{modid}}"
-
 
48
            aria-label="{{#str}}insertcontentbefore, core, { "activityname": {{#quote}} {{activityname}} {{/quote}} } {{/str}}"
-
 
49
            {{/modid}}
-
 
50
            {{^modid}}
-
 
51
            aria-label="{{#str}}insertcontentsection, core, { "sectionname": {{#quote}} {{sectionname}} {{/quote}} } {{/str}}"
-
 
52
            {{/modid}}
-
 
53
            aria-haspopup="true"
36
            data-action="open-chooser"
54
            aria-expanded="false"
37
            data-sectionid="{{sectionid}}"
55
            tabindex="0"
38
            {{#sectionreturn}}data-sectionreturnid="{{.}}"{{/sectionreturn}}
56
            title="{{#str}}addcontent, core{{/str}}"
-
 
57
    >
-
 
58
        {{#pix}} t/add, core {{/pix}}
39
        >
59
    </button>
40
            {{#pix}} t/add, core {{/pix}}
60
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton-{{#modid}}{{modid}}{{/modid}}{{^modid}}{{uniqid}}{{/modid}}">
-
 
61
        {{> core_course/addresourceoractivitybutton }}
41
            <span class="activity-add-text pr-1">{{#str}}addresourceoractivity, core{{/str}}</span>
62
        {{#actionlinks}}
-
 
63
            {{> core/action_link}}
-
 
64
        {{/actionlinks}}
42
        </button>
65
    </div>