Merge branch 'MDL-56954-master' of git://github.com/lameze/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2017-02-07 06:20:26 +01:00
commit 3587ee29c2
4 changed files with 41 additions and 30 deletions

View File

@ -422,7 +422,7 @@ class core_course_management_renderer extends plugin_renderer_base {
'resortcategoriesby',
'name',
false,
array('aria-label' => get_string('selectcategorysortby'))
array('aria-label' => get_string('selectcategorysortby'), 'class' => 'm-t-1')
)
);
$form .= html_writer::div(
@ -441,15 +441,16 @@ class core_course_management_renderer extends plugin_renderer_base {
'resortcoursesby',
'fullname',
false,
array('aria-label' => get_string('selectcoursesortby'))
array('aria-label' => get_string('selectcoursesortby'), 'class' => 'm-t-1')
)
);
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort', 'value' => get_string('sort')));
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'bulksort',
'value' => get_string('sort'), 'class' => 'btn btn-secondary m-y-1'));
$form .= html_writer::end_div();
$html .= html_writer::start_div('detail-pair row yui3-g');
$html .= html_writer::div(html_writer::span(get_string('sorting')), 'pair-key span3 yui3-u-1-4');
$html .= html_writer::div($form, 'pair-value span9 yui3-u-3-4');
$html .= html_writer::start_div('detail-pair row yui3-g m-y-1');
$html .= html_writer::div(html_writer::span(get_string('sorting')), 'pair-key span3 col-md-3 yui3-u-1-4');
$html .= html_writer::div($form, 'pair-value span9 col-md-9 yui3-u-3-4');
$html .= html_writer::end_div();
}
if (coursecat::can_change_parent_any()) {
@ -463,9 +464,10 @@ class core_course_management_renderer extends plugin_renderer_base {
'movecategoriesto',
'',
array('' => 'choosedots'),
array('aria-labelledby' => 'moveselectedcategoriesto')
array('aria-labelledby' => 'moveselectedcategoriesto', 'class' => 'm-r-1')
);
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => get_string('move'));
$submit = array('type' => 'submit', 'name' => 'bulkmovecategories', 'value' => get_string('move'),
'class' => 'btn btn-secondary');
$html .= $this->detail_pair(
html_writer::span(get_string('moveselectedcategoriesto'), '', array('id' => 'moveselectedcategoriesto')),
$select . html_writer::empty_tag('input', $submit)
@ -780,9 +782,10 @@ class core_course_management_renderer extends plugin_renderer_base {
'movecoursesto',
'',
array('' => 'choosedots'),
array('aria-labelledby' => 'moveselectedcoursesto')
array('aria-labelledby' => 'moveselectedcoursesto', 'class' => 'm-r-1')
);
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'),
'class' => 'btn btn-secondary');
$html .= $this->detail_pair(
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
$select . html_writer::empty_tag('input', $submit)
@ -808,7 +811,8 @@ class core_course_management_renderer extends plugin_renderer_base {
array('' => 'choosedots'),
array('aria-labelledby' => 'moveselectedcoursesto')
);
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'),
'class' => 'btn btn-secondary');
$html .= $this->detail_pair(
html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')),
$select . html_writer::empty_tag('input', $submit)
@ -847,8 +851,8 @@ class core_course_management_renderer extends plugin_renderer_base {
*/
protected function detail_pair($key, $value, $class ='') {
$html = html_writer::start_div('detail-pair row yui3-g '.preg_replace('#[^a-zA-Z0-9_\-]#', '-', $class));
$html .= html_writer::div(html_writer::span($key), 'pair-key span3 yui3-u-1-4');
$html .= html_writer::div(html_writer::span($value), 'pair-value span9 yui3-u-3-4');
$html .= html_writer::div(html_writer::span($key), 'pair-key span3 col-md-3 yui3-u-1-4');
$html .= html_writer::div(html_writer::span($value), 'pair-value span9 col-md-9 m-b-1 yui3-u-3-4');
$html .= html_writer::end_div();
return $html;
}
@ -946,7 +950,7 @@ class core_course_management_renderer extends plugin_renderer_base {
public function grid_column_start($size, $id = null, $class = null) {
// Calculate Bootstrap grid sizing.
$bootstrapclass = 'span'.$size;
$bootstrapclass = 'span'.$size.' col-md-'.$size;
// Calculate YUI grid sizing.
if ($size === 12) {
@ -1322,13 +1326,14 @@ class core_course_management_renderer extends plugin_renderer_base {
$strsearchcourses = get_string("searchcourses");
$searchurl = new moodle_url('/course/management.php');
$output = html_writer::start_tag('form', array('id' => $formid, 'action' => $searchurl, 'method' => 'get'));
$output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset'));
$output .= html_writer::tag('label', $strsearchcourses.': ', array('for' => $inputid));
$output .= html_writer::empty_tag('input', array('type' => 'text', 'id' => $inputid,
'size' => $inputsize, 'name' => 'search', 'value' => s($value)));
$output .= html_writer::empty_tag('input', array('type' => 'submit',
'value' => get_string('go')));
$output = html_writer::start_tag('form', array('id' => $formid, 'action' => $searchurl, 'method' => 'get',
'class' => 'form-inline'));
$output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset m-y-1'));
$output .= html_writer::tag('label', $strsearchcourses, array('for' => $inputid));
$output .= html_writer::empty_tag('input', array('type' => 'text', 'id' => $inputid, 'size' => $inputsize,
'name' => 'search', 'value' => s($value), 'class' => 'form-control m-x-1'));
$output .= html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('go'),
'class' => 'btn btn-secondary'));
$output .= html_writer::end_tag('fieldset');
$output .= html_writer::end_tag('form');

View File

@ -785,8 +785,7 @@ span.editinstructions {
* Borders #e1e1e8
*/
#course-category-listings {
background-color: $body-bg;
margin-bottom: 200px;
margin-bottom: 0;
/** Two column layout */
&.columns-2 {
@ -1172,7 +1171,6 @@ span.editinstructions {
@media (max-width: 1199px) {
#course-category-listings.columns-2,
#course-category-listings.columns-3 {
background-color: $body-bg;
border: 0;
#category-listing,
@ -1181,12 +1179,6 @@ span.editinstructions {
width: 100%;
margin: 0 0 1em;
}
#category-listing > div,
#course-listing > div,
#course-detail > div {
background-color: $body-bg;
}
}
}

View File

@ -1054,6 +1054,14 @@ span.editinstructions {
}
}
#page-course-management .coursesearchbox input[type="text"] + input[type="submit"] {
margin-bottom: 0;
}
#page-course-management #course-category-listings .detail-pair .pair-value select {
max-width: 80%;
}
#course-category-listings #course-listing .listitem .drag-handle {
display: none;
}

View File

@ -4459,6 +4459,12 @@ span.editinstructions {
#course-category-listings .select-a-category .alert {
margin: 1em;
}
#page-course-management .coursesearchbox input[type="text"] + input[type="submit"] {
margin-bottom: 0;
}
#page-course-management #course-category-listings .detail-pair .pair-value select {
max-width: 80%;
}
#course-category-listings #course-listing .listitem .drag-handle {
display: none;
}