Skip to content

Commit

Permalink
MBS-9818: Update ci.yml (make mustache lint optional), add license to…
Browse files Browse the repository at this point in the history
… template files
  • Loading branch information
PhMemmel committed Dec 28, 2024
1 parent 6c921ab commit ffa6b90
Show file tree
Hide file tree
Showing 29 changed files with 929 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

services:
postgres:
image: postgres:13
image: postgres:16
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
Expand All @@ -17,7 +17,7 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3

mariadb:
image: mariadb:10
image: mariadb:10.11
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Expand All @@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
php: ['8.2', '8.3']
moodle-branch: ['main', 'MOODLE_404_STABLE']
moodle-branch: ['main', 'MOODLE_405_STABLE', 'MOODLE_404_STABLE']
database: [pgsql, mariadb]

steps:
Expand Down Expand Up @@ -85,6 +85,7 @@ jobs:
run: moodle-plugin-ci savepoints

- name: Mustache Lint
continue-on-error: true
if: ${{ !cancelled() }}
run: moodle-plugin-ci mustache

Expand Down
33 changes: 33 additions & 0 deletions templates/components/ai-audio-player.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-audio-player
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<span class="tiny_ai-audio-label">{{audio_description}}</span>
<div class="tiny_ai-audio-player">
<audio class="tiny_ai-audio-source" src="/audio/audio-test-file.mp3"></audio>
Expand Down
33 changes: 33 additions & 0 deletions templates/components/ai-button.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-button
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<button class="tiny_ai-button {{#btn-iconname}}has-icon {{/btn-iconname}}{{#disabled}}disabled {{/disabled}}{{!
}}{{#primary}}primary {{/primary}}{{#secondary}}secondary {{/secondary}}{{#tertiary}}tertiary {{/tertiary}}"{{!
}} data-action="{{action}}" {{#expanded}}data-expanded{{/expanded}} data-toggle="tooltip" data-placement="top" title="{{tooltip}}">
Expand Down
33 changes: 33 additions & 0 deletions templates/components/ai-card-button.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-card-button
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<div data-action="toggletooltip" data-toggle="tooltip" data-placement="top" title="{{tooltip}}">
<a href="#" class="tiny_ai-card-button {{#disabled}}disabled{{/disabled}}" data-action="{{action}}" data-tool="{{toolname}}">
{{> tiny_ai/components/ai-icon}}
Expand Down
33 changes: 33 additions & 0 deletions templates/components/ai-dropdown.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-dropdown
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<span class="tiny_ai-dropdown-label">{{dropdownDescription}}</span>
<div id="tiny_ai-dropdown-{{uniqid}}" class="{{^dropup}}dropdown{{/dropup}}{{#dropup}}dropup{{/dropup}} tiny_ai-dropdown" data-preference="{{preference}}">
<button class="btn btn-secondary dropdown-toggle tiny_ai-btn tiny_ai-dropdown-toggle" type="button" id="dropdownMenuButton"{{!
Expand Down
33 changes: 33 additions & 0 deletions templates/components/ai-file-list-entry.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-file-list-entry
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<div class="d-flex flex-column align-items-center m-5 h-100 w-100">
<div class="mb-2"><span><i class="icon fa-solid {{icon}}"></i> {{filename}}</span></div>
{{#isImage}}
Expand Down
33 changes: 33 additions & 0 deletions templates/components/ai-icon-button.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-icon-button
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<button class="tiny_ai-icon-button" data-action="{{action}}" data-toggle="tooltip" data-placement="top" title="{{tooltip}}">
<i class="fa fa-{{iconname}} tiny_ai-icon"></i>
</button>
33 changes: 33 additions & 0 deletions templates/components/ai-icon.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-icon
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
{{#customicon}}
<span class="icon-tiny_ai_{{iconname}}"></span>
{{/customicon}}
Expand Down
33 changes: 33 additions & 0 deletions templates/components/ai-info-text.mustache
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-info-text
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<div data-rendertarget="infobox">
</div>
33 changes: 33 additions & 0 deletions templates/components/ai-info-warning.mustache
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see
<http: //www.gnu.org/licenses />.
}}
{{!
@template tiny_ai/components/ai-info-warning
Modal to select ai actions within the Tiny Editor.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
Example context (json):
{}
}}
<div data-rendertarget="warningbox"></div>
Loading

0 comments on commit ffa6b90

Please sign in to comment.