mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-56803 mod_glossary: Fix styles for boost theme
This commit is contained in:
parent
0b8e0c374f
commit
1093b461f6
4 changed files with 24 additions and 29 deletions
|
@ -58,12 +58,7 @@ $exporturl = moodle_url::make_pluginfile_url($context->id, 'mod_glossary', 'expo
|
|||
|
||||
?>
|
||||
<form action="<?php echo $exporturl->out(); ?>" method="post">
|
||||
<table border="0" cellpadding="6" cellspacing="6" width="100%">
|
||||
<tr><td align="center">
|
||||
<input type="submit" value="<?php p($strexportfile)?>" />
|
||||
</td></tr></table>
|
||||
<div>
|
||||
</div>
|
||||
<input class="btn btn-primary" type="submit" value="<?php p($strexportfile)?>" />
|
||||
</form>
|
||||
<?php
|
||||
// don't need cap check here, we share with the general export.
|
||||
|
|
|
@ -1181,7 +1181,7 @@ function glossary_print_entry_aliases($course, $cm, $glossary, $entry,$mode='',
|
|||
foreach ($aliases as $alias) {
|
||||
if (trim($alias->alias)) {
|
||||
if ($return == '') {
|
||||
$return = '<select id="keyword" style="font-size:8pt">';
|
||||
$return = '<select id="keyword" class="custom-select">';
|
||||
}
|
||||
$return .= "<option>$alias->alias</option>";
|
||||
}
|
||||
|
@ -1233,7 +1233,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
|||
|
||||
if (has_capability('mod/glossary:approve', $context) && !$glossary->defaultapproval && $entry->approved) {
|
||||
$output = true;
|
||||
$return .= '<a class="action-icon" title="' . get_string('disapprove', 'glossary').
|
||||
$return .= '<a class="icon" title="' . get_string('disapprove', 'glossary').
|
||||
'" href="approve.php?newstate=0&eid='.$entry->id.'&mode='.$mode.
|
||||
'&hook='.urlencode($hook).'&sesskey='.sesskey().
|
||||
'"><img src="'.$OUTPUT->pix_url('t/block').'" class="smallicon" alt="'.
|
||||
|
@ -1248,7 +1248,10 @@ 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="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>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1264,11 +1267,16 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
|||
$ineditperiod = ((time() - $entry->timecreated < $CFG->maxeditingtime) || $glossary->editalways);
|
||||
if ( !$importedentry and (has_capability('mod/glossary:manageentries', $context) or ($entry->userid == $USER->id and ($ineditperiod and has_capability('mod/glossary:write', $context))))) {
|
||||
$output = true;
|
||||
$return .= "<a class='action-icon' title=\"" . get_string("delete") . "\" href=\"deleteentry.php?id=$cm->id&mode=delete&entry=$entry->id&prevmode=$mode&hook=".urlencode($hook)."\"><img src=\"";
|
||||
$url = "deleteentry.php?id=$cm->id&mode=delete&entry=$entry->id&prevmode=$mode&hook=".urlencode($hook);
|
||||
$return .= "<a class='icon' title=\"" . get_string("delete") . "\" " .
|
||||
"href=\"$url\"><img src=\"";
|
||||
$return .= $icon;
|
||||
$return .= "\" class=\"smallicon\" alt=\"" . get_string("delete") .$altsuffix."\" /></a>";
|
||||
|
||||
$return .= "<a class='action-icon' title=\"" . get_string("edit") . "\" href=\"edit.php?cmid=$cm->id&id=$entry->id&mode=$mode&hook=".urlencode($hook)."\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" class=\"smallicon\" alt=\"" . get_string("edit") .$altsuffix. "\" /></a>";
|
||||
$url = "edit.php?cmid=$cm->id&id=$entry->id&mode=$mode&hook=".urlencode($hook);
|
||||
$return .= "<a class='icon' title=\"" . get_string("edit") . "\" href=\"$url\">" .
|
||||
"<img src=\"" . $OUTPUT->pix_url('t/edit') . "\" class=\"smallicon\" " .
|
||||
"alt=\"" . get_string("edit") .$altsuffix. "\" /></a>";
|
||||
} elseif ( $importedentry ) {
|
||||
$return .= "<font size=\"-1\">" . get_string("exportedentry","glossary") . "</font>";
|
||||
}
|
||||
|
|
|
@ -23,10 +23,6 @@
|
|||
width: 35px;
|
||||
}
|
||||
|
||||
.path-mod-glossary .glossarypost .entrylowersection .aliases {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.path-mod-glossary .glossarypost .entrylowersection .icons {
|
||||
text-align: right;
|
||||
padding-right: 5px;
|
||||
|
|
|
@ -360,46 +360,42 @@ if ($glossary->intro && $showcommonelements) {
|
|||
|
||||
/// Search box
|
||||
if ($showcommonelements ) {
|
||||
echo '<form method="post" action="view.php">';
|
||||
echo '<form method="post" class="form form-inline m-b-1" action="view.php">';
|
||||
|
||||
echo '<table class="boxaligncenter" width="70%" border="0">';
|
||||
echo '<tr><td align="center" class="glossarysearchbox">';
|
||||
|
||||
echo '<input type="submit" value="'.$strsearch.'" name="searchbutton" /> ';
|
||||
if ($mode == 'search') {
|
||||
echo '<input type="text" name="hook" size="20" value="'.s($hook).'" alt="'.$strsearch.'" /> ';
|
||||
echo '<input type="text" name="hook" size="20" value="'.s($hook).'" alt="'.$strsearch.'" class="form-control"/> ';
|
||||
} else {
|
||||
echo '<input type="text" name="hook" size="20" value="" alt="'.$strsearch.'" /> ';
|
||||
echo '<input type="text" name="hook" size="20" value="" alt="'.$strsearch.'" class="form-control"/> ';
|
||||
}
|
||||
echo '<input type="submit" value="'.$strsearch.'" name="searchbutton" class="btn btn-secondary"/> ';
|
||||
if ($fullsearch || $mode != 'search') {
|
||||
$fullsearchchecked = 'checked="checked"';
|
||||
} else {
|
||||
$fullsearchchecked = '';
|
||||
}
|
||||
echo '<input type="checkbox" name="fullsearch" id="fullsearch" value="1" '.$fullsearchchecked.' />';
|
||||
echo '<span class="form-check"><label for="fullsearch" class="form-check-label">';
|
||||
echo '<input type="checkbox" class="form-check-input m-l-1" ' .
|
||||
'name="fullsearch" id="fullsearch" value="1" '.$fullsearchchecked.'/>';
|
||||
echo '<input type="hidden" name="mode" value="search" />';
|
||||
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
|
||||
echo '<label for="fullsearch">'.$strsearchindefinition.'</label>';
|
||||
echo '</td></tr></table>';
|
||||
echo $strsearchindefinition.'</label></span>';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
echo '<br />';
|
||||
}
|
||||
|
||||
/// Show the add entry button if allowed
|
||||
if (has_capability('mod/glossary:write', $context) && $showcommonelements ) {
|
||||
echo '<div class="singlebutton glossaryaddentry">';
|
||||
echo "<form id=\"newentryform\" method=\"get\" action=\"$CFG->wwwroot/mod/glossary/edit.php\">";
|
||||
echo "<form class=\"form form-inline m-b-1\" id=\"newentryform\" method=\"get\" action=\"$CFG->wwwroot/mod/glossary/edit.php\">";
|
||||
echo '<div>';
|
||||
echo "<input type=\"hidden\" name=\"cmid\" value=\"$cm->id\" />";
|
||||
echo '<input type="submit" value="'.get_string('addentry', 'glossary').'" />';
|
||||
echo '<input type="submit" value="'.get_string('addentry', 'glossary').'" class="btn btn-secondary" />';
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
echo '<br />';
|
||||
|
||||
require("tabs.php");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue