mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-36830 usability: Glossary and database small design improvements
This commit is contained in:
parent
2d74d1aea3
commit
851d3b7a97
@ -1251,8 +1251,12 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
|
||||
$replacement [] = userdate($record->timemodified);
|
||||
|
||||
$patterns[]='##approve##';
|
||||
if (has_capability('mod/data:approve', $context) && ($data->approval) && (!$record->approved)){
|
||||
$replacement[] = '<span class="approve"><a href="'.$CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&approve='.$record->id.'&sesskey='.sesskey().'"><img src="'.$OUTPUT->pix_url('i/approve') . '" class="iconsmall" alt="'.get_string('approve').'" /></a></span>';
|
||||
if (has_capability('mod/data:approve', $context) && ($data->approval) && (!$record->approved)) {
|
||||
$approveurl = new moodle_url('/mod/data/view.php',
|
||||
array('d' => $data->id, 'approve' => $record->id, 'sesskey' => sesskey()));
|
||||
$approveicon = new pix_icon('t/approve', get_string('approve'), '', array('class' => 'iconsmall'));
|
||||
$replacement[] = html_writer::tag('span', $OUTPUT->action_icon($approveurl, $approveicon),
|
||||
array('class' => 'approve'));
|
||||
} else {
|
||||
$replacement[] = '';
|
||||
}
|
||||
|
@ -1234,7 +1234,8 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
||||
|
||||
if (!$entry->approved) {
|
||||
$output = true;
|
||||
$return .= get_string('entryishidden','glossary');
|
||||
$return .= html_writer::tag('span', get_string('entryishidden','glossary'),
|
||||
array('class' => 'glossary-hidden-note'));
|
||||
}
|
||||
|
||||
$iscurrentuser = ($entry->userid == $USER->id);
|
||||
@ -1245,7 +1246,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
||||
$mainglossary = $DB->get_record('glossary', array('mainglossary'=>1,'course'=>$course->id));
|
||||
if ( $mainglossary ) { // if there is a main glossary defined, allow to export the current entry
|
||||
$output = true;
|
||||
$return .= ' <a class="action-icon" title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$entry->id.'&prevmode='.$mode.'&hook='.urlencode($hook).'"><img src="'.$OUTPUT->pix_url('export', 'glossary').'" class="smallicon" alt="'.get_string('exporttomainglossary','glossary').$altsuffix.'" /></a>';
|
||||
$return .= '<a class="action-icon" title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$entry->id.'&prevmode='.$mode.'&hook='.urlencode($hook).'"><img src="'.$OUTPUT->pix_url('export', 'glossary').'" class="smallicon" alt="'.get_string('exporttomainglossary','glossary').$altsuffix.'" /></a>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -1292,8 +1293,6 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
||||
|
||||
$return .= $button->to_html(PORTFOLIO_ADD_ICON_LINK);
|
||||
}
|
||||
$return .= " "; // just to make up a little the output in Mozilla ;)
|
||||
|
||||
$return .= '</span>';
|
||||
|
||||
if (!empty($CFG->usecomments) && has_capability('mod/glossary:comment', $context) and $glossary->allowcomments) {
|
||||
@ -1394,7 +1393,11 @@ function glossary_print_entry_approval($cm, $entry, $mode, $align="right", $ins
|
||||
if ($insidetable) {
|
||||
echo '<table class="glossaryapproval" align="'.$align.'"><tr><td align="'.$align.'">';
|
||||
}
|
||||
echo '<a title="'.get_string('approve','glossary').'" href="approve.php?eid='.$entry->id.'&mode='.$mode.'&sesskey='.sesskey().'"><img align="'.$align.'" src="'.$OUTPUT->pix_url('i/approve') . '" style="border:0px; width:34px; height:34px" alt="'.get_string('approve','glossary').'" /></a>';
|
||||
echo $OUTPUT->action_icon(
|
||||
new moodle_url('approve.php', array('eid' => $entry->id, 'mode' => $mode, 'sesskey' => sesskey())),
|
||||
new pix_icon('t/approve', get_string('approve','glossary'), '',
|
||||
array('class' => 'iconsmall', 'align' => $align))
|
||||
);
|
||||
if ($insidetable) {
|
||||
echo '</td></tr></table>';
|
||||
}
|
||||
|
BIN
mod/glossary/pix/export.png
Normal file
BIN
mod/glossary/pix/export.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 209 B |
14
mod/glossary/pix/export.svg
Normal file
14
mod/glossary/pix/export.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
||||
]>
|
||||
<svg version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
||||
x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12" style="overflow:visible;enable-background:new 0 0 12 12;"
|
||||
xml:space="preserve" preserveAspectRatio="xMinYMid meet">
|
||||
<defs>
|
||||
</defs>
|
||||
<path style="fill:#999999;" d="M11,4.5H7.5V1c0-0.5-0.5-1-1-1h-1c-0.5,0-1,0.5-1,1v3.5L1,4.5c-0.5,0-1,0.5-1,1v1c0,0.5,0.5,1,1,1
|
||||
h3.5V11c0,0.5,0.5,1,1,1h1c0.5,0,1-0.5,1-1V7.5H11c0.6,0,1-0.5,1-1l0-1C12,5,11.6,4.5,11,4.5z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 860 B |
@ -7,6 +7,7 @@
|
||||
.path-mod-glossary .glossarypost .entrylowersection .aliases {text-align:center;}
|
||||
.path-mod-glossary .glossarypost .entrylowersection .icons {text-align:right;padding-right: 5px;}
|
||||
.path-mod-glossary .glossarypost .entrylowersection .ratings {text-align:right;padding-right: 5px;padding-bottom: 2px;}
|
||||
.path-mod-glossary .glossarypost .glossary-hidden-note { margin: 0 .45em; }
|
||||
|
||||
.path-mod-glossary .glossarydisplay {margin-left:auto;margin-right:auto;}
|
||||
.path-mod-glossary .glossarydisplay .tabs {width: 100%;margin-bottom: 0px;}
|
||||
|
BIN
pix/t/approve.png
Normal file
BIN
pix/t/approve.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 266 B |
14
pix/t/approve.svg
Normal file
14
pix/t/approve.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
||||
]>
|
||||
<svg version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
||||
x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12" style="overflow:visible;enable-background:new 0 0 12 12;"
|
||||
xml:space="preserve">
|
||||
<defs>
|
||||
</defs>
|
||||
<path style="fill:#999999;" d="M11.4,0.6l-0.9-0.5C10.1-0.1,9.5,0,9.2,0.5L4.7,8.2L2,6.6C1.5,6.3,0.9,6.5,0.6,7L0.1,7.8
|
||||
C-0.1,8.3,0,8.9,0.5,9.2L5,11.8c0.1,0.1,0.3,0.1,0.4,0.1c0.4,0.1,0.8-0.1,1-0.5L11.8,2C12.1,1.5,11.9,0.9,11.4,0.6z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 836 B |
@ -22,6 +22,7 @@ deprecation:
|
||||
* i/tick_amber_big: Use i/caution or i/grade_partiallycorrect
|
||||
* No more small versions of i/cross_red_small, i/tick_green_small and i/tick_amber_small, use their big equivalent.
|
||||
* t/addgreen: Use t/add instead.
|
||||
* i/approve: Use t/approve instead
|
||||
|
||||
optional changes:
|
||||
* new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
|
||||
@ -44,6 +45,7 @@ optional changes:
|
||||
* new classes 'icon-pre' and 'icon-post' supposedly to be used when the icon is positioned before or after the text. This is not really used yet, but it's a start towards some standardisation of the icon selectors.
|
||||
* new icons i/valid, i/caution and i/invalid for generic statuses.
|
||||
* new icons i/grade_correct, i/grade_partiallycorrect and i/grade_incorrect for grades.
|
||||
* new icon t/approve (12x12).
|
||||
|
||||
=== 2.3 ===
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user