mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +02:00
MDL-64819 output: Activity menu icons
Remove duplicate alt text from activity menu icons and the links to add new sections.
This commit is contained in:
parent
f9e436a2b6
commit
cce54c4732
6 changed files with 39 additions and 51 deletions
|
@ -117,10 +117,9 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
$name = empty($value['name']) ? '' : $value['name'];
|
||||
$attr = empty($value['attr']) ? array() : $value['attr'];
|
||||
$class = empty($value['pixattr']['class']) ? '' : $value['pixattr']['class'];
|
||||
$alt = empty($value['pixattr']['alt']) ? '' : $value['pixattr']['alt'];
|
||||
$al = new action_menu_link_secondary(
|
||||
new moodle_url($url),
|
||||
new pix_icon($icon, $alt, null, array('class' => "smallicon " . $class)),
|
||||
new pix_icon($icon, '', null, array('class' => "smallicon " . $class)),
|
||||
$name,
|
||||
$attr
|
||||
);
|
||||
|
@ -328,8 +327,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
'url' => new moodle_url('/course/editsection.php', array('id' => $section->id, 'sr' => $sectionreturn)),
|
||||
'icon' => 'i/settings',
|
||||
'name' => $streditsection,
|
||||
'pixattr' => array('class' => '', 'alt' => $streditsection),
|
||||
'attr' => array('class' => 'icon edit', 'title' => $streditsection));
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'icon edit'));
|
||||
}
|
||||
|
||||
if ($section->section) {
|
||||
|
@ -343,8 +342,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
'url' => $url,
|
||||
'icon' => 'i/hide',
|
||||
'name' => $strhidefromothers,
|
||||
'pixattr' => array('class' => '', 'alt' => $strhidefromothers),
|
||||
'attr' => array('class' => 'icon editing_showhide', 'title' => $strhidefromothers,
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'icon editing_showhide',
|
||||
'data-sectionreturn' => $sectionreturn, 'data-action' => 'hide'));
|
||||
} else {
|
||||
$strshowfromothers = get_string('showfromothers', 'format_'.$course->format);
|
||||
|
@ -353,8 +352,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
'url' => $url,
|
||||
'icon' => 'i/show',
|
||||
'name' => $strshowfromothers,
|
||||
'pixattr' => array('class' => '', 'alt' => $strshowfromothers),
|
||||
'attr' => array('class' => 'icon editing_showhide', 'title' => $strshowfromothers,
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'icon editing_showhide',
|
||||
'data-sectionreturn' => $sectionreturn, 'data-action' => 'show'));
|
||||
}
|
||||
}
|
||||
|
@ -370,8 +369,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
'url' => $url,
|
||||
'icon' => 'i/up',
|
||||
'name' => $strmoveup,
|
||||
'pixattr' => array('class' => '', 'alt' => $strmoveup),
|
||||
'attr' => array('class' => 'icon moveup', 'title' => $strmoveup));
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'icon moveup'));
|
||||
}
|
||||
|
||||
$url = clone($baseurl);
|
||||
|
@ -383,8 +382,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
'url' => $url,
|
||||
'icon' => 'i/down',
|
||||
'name' => $strmovedown,
|
||||
'pixattr' => array('class' => '', 'alt' => $strmovedown),
|
||||
'attr' => array('class' => 'icon movedown', 'title' => $strmovedown));
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'icon movedown'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -405,8 +404,8 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
'url' => $url,
|
||||
'icon' => 'i/delete',
|
||||
'name' => $strdelete,
|
||||
'pixattr' => array('class' => '', 'alt' => $strdelete),
|
||||
'attr' => array('class' => 'icon editing_delete', 'title' => $strdelete));
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'icon editing_delete'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1009,7 +1008,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
|
|||
if ($sectionreturn !== null) {
|
||||
$url->param('sectionreturn', $sectionreturn);
|
||||
}
|
||||
$icon = $this->output->pix_icon('t/add', $straddsections);
|
||||
$icon = $this->output->pix_icon('t/add', '');
|
||||
$newsections = $maxsections - $lastsection;
|
||||
echo html_writer::link($url, $icon . $straddsections,
|
||||
array('class' => 'add-sections', 'data-add-sections' => $straddsections, 'new-sections' => $newsections));
|
||||
|
|
|
@ -123,21 +123,19 @@ class format_topics_renderer extends format_section_renderer_base {
|
|||
if ($section->section && has_capability('moodle/course:setcurrentsection', $coursecontext)) {
|
||||
if ($course->marker == $section->section) { // Show the "light globe" on/off.
|
||||
$url->param('marker', 0);
|
||||
$markedthistopic = get_string('markedthistopic');
|
||||
$highlightoff = get_string('highlightoff');
|
||||
$controls['highlight'] = array('url' => $url, "icon" => 'i/marked',
|
||||
'name' => $highlightoff,
|
||||
'pixattr' => array('class' => '', 'alt' => $markedthistopic),
|
||||
'attr' => array('class' => 'editing_highlight', 'title' => $markedthistopic,
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'editing_highlight',
|
||||
'data-action' => 'removemarker'));
|
||||
} else {
|
||||
$url->param('marker', $section->section);
|
||||
$markthistopic = get_string('markthistopic');
|
||||
$highlight = get_string('highlight');
|
||||
$controls['highlight'] = array('url' => $url, "icon" => 'i/marker',
|
||||
'name' => $highlight,
|
||||
'pixattr' => array('class' => '', 'alt' => $markthistopic),
|
||||
'attr' => array('class' => 'editing_highlight', 'title' => $markthistopic,
|
||||
'pixattr' => array('class' => ''),
|
||||
'attr' => array('class' => 'editing_highlight',
|
||||
'data-action' => 'setmarker'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue