3 Commits

Author SHA1 Message Date
Jason Den Dulk
3af003f93a Disable behat for ci testing 2025-02-11 09:01:14 +11:00
Misha Golenkov
11fbe64c46 Merge pull request #361 from catalyst/359-MOODLE_39_STABLE-fix
Issue #358: Use pix_icon to render icons
2025-01-30 13:32:00 +11:00
djarrancotleanu
0114db359b Issue #358: Use pix_icon to render icons 2025-01-30 10:50:43 +10:00
3 changed files with 15 additions and 40 deletions

View File

@@ -8,5 +8,4 @@ jobs:
uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main
secrets:
moodle_org_token: ${{ secrets.MOODLE_ORG_TOKEN }}
with:
disable_behat: true

View File

@@ -77,12 +77,7 @@ class base_table extends flexible_table {
// View button.
$buttons .= html_writer::link(
new moodle_url('/auth/outage/info.php', ['id' => $outage->id]),
html_writer::empty_tag('img', [
'src' => $OUTPUT->image_url('t/preview'),
'alt' => get_string('view'),
'class' => 'iconsmall',
]),
$OUTPUT->pix_icon('t/preview', get_string('view'), 'moodle', array('class' => 'iconsmall')),
[
'title' => get_string('view'),
'target' => '_blank',
@@ -93,11 +88,7 @@ class base_table extends flexible_table {
if ($editdelete) {
$buttons .= html_writer::link(
new moodle_url('/auth/outage/edit.php', ['edit' => $outage->id]),
html_writer::empty_tag('img', [
'src' => $OUTPUT->image_url('t/edit'),
'alt' => get_string('edit'),
'class' => 'iconsmall',
]),
$OUTPUT->pix_icon('t/edit', get_string('edit'), 'moodle', array('class' => 'iconsmall')),
['title' => get_string('edit')]
);
}
@@ -105,12 +96,7 @@ class base_table extends flexible_table {
// Clone button.
$buttons .= html_writer::link(
new moodle_url('/auth/outage/edit.php', ['clone' => $outage->id]),
html_writer::empty_tag('img', [
'src' => $OUTPUT->image_url('t/copy'),
'alt' => get_string('clone', 'auth_outage'),
'class' => 'iconsmall',
]),
$OUTPUT->pix_icon('t/copy', get_string('clone', 'auth_outage'), 'moodle', array('class' => 'iconsmall')),
['title' => get_string('clone', 'auth_outage')]
);
@@ -118,11 +104,7 @@ class base_table extends flexible_table {
if ($outage->is_ongoing()) {
$buttons .= html_writer::link(
new moodle_url('/auth/outage/finish.php', ['id' => $outage->id]),
html_writer::empty_tag('img', [
'src' => $OUTPUT->image_url('t/check'),
'alt' => get_string('finish', 'auth_outage'),
'class' => 'iconsmall',
]),
$OUTPUT->pix_icon('t/check', get_string('finish', 'auth_outage'), 'moodle', array('class' => 'iconsmall')),
['title' => get_string('finish', 'auth_outage')]
);
}
@@ -131,11 +113,7 @@ class base_table extends flexible_table {
if ($editdelete) {
$buttons .= html_writer::link(
new moodle_url('/auth/outage/delete.php', ['id' => $outage->id]),
html_writer::empty_tag('img', [
'src' => $OUTPUT->image_url('t/delete'),
'alt' => get_string('delete'),
'class' => 'iconsmall',
]),
$OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle', array('class' => 'iconsmall')),
['title' => get_string('delete')]
);
}

View File

@@ -47,17 +47,15 @@ if (!$viewbag['static']) {
['target' => '_blank', 'class' => 'auth_outage_warningbar_box_title']
);
if (is_siteadmin()) {
$url = new moodle_url('/auth/outage/finish.php', ['id' => $viewbag['outage']->id]);
$text = html_writer::empty_tag('img', [
'src' => $OUTPUT->image_url('t/check'),
'alt' => get_string('finish', 'auth_outage'),
'class' => 'iconsmall',
]).' '.get_string('finish', 'auth_outage');
$attr = [
'title' => get_string('finish', 'auth_outage'),
'class' => 'auth_outage_warningbar_box_finish',
];
$title .= ' '.html_writer::span(html_writer::link($url, $text, $attr), '', ['id' => 'auth_outage_warningbar_button']);
$link = html_writer::link(
new moodle_url('/auth/outage/finish.php', ['id' => $viewbag['outage']->id]),
$OUTPUT->pix_icon('t/check', get_string('finish', 'auth_outage'), 'moodle', array('class' => 'iconsmall')) . get_string('finish', 'auth_outage'),
[
'title' => get_string('finish', 'auth_outage'),
'class' => 'auth_outage_warningbar_box_finish',
]
);
$title .= ' '.html_writer::span($link, '', ['id' => 'auth_outage_warningbar_button']);
}
}
?>