Improving actions UI.

1.10.x
Julio Montoya 12 years ago
parent 3f786ee8d0
commit 2ffc47a1eb
  1. 2
      main/admin/course_list.php
  2. 15
      main/admin/user_list.php
  3. 16
      main/inc/lib/pear/HTML/QuickForm/text.php
  4. 4
      main/template/default/layout/footer.tpl
  5. 19
      web/ChamiloLMS/css/base.css

@ -249,13 +249,11 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
$form->addElement('style_submit_button', 'submit', get_lang('SearchCourse'), 'class="btn"'); $form->addElement('style_submit_button', 'submit', get_lang('SearchCourse'), 'class="btn"');
$form->addElement('static', 'search_advanced_link', null, '<a href="course_list.php?search=advanced">'.get_lang('AdvancedSearch').'</a>'); $form->addElement('static', 'search_advanced_link', null, '<a href="course_list.php?search=advanced">'.get_lang('AdvancedSearch').'</a>');
$actions .= '<div style="float: right; ">';
$actions .= '<a href="course_add.php">'.Display::return_icon('new_course.png', get_lang('AddCourse'),'',ICON_SIZE_MEDIUM).'</a> '; $actions .= '<a href="course_add.php">'.Display::return_icon('new_course.png', get_lang('AddCourse'),'',ICON_SIZE_MEDIUM).'</a> ';
if (api_get_setting('course_validation') == 'true') { if (api_get_setting('course_validation') == 'true') {
$actions .= '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'),'',ICON_SIZE_MEDIUM).'</a>'; $actions .= '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'),'',ICON_SIZE_MEDIUM).'</a>';
} }
$actions .= '</div>';
$actions .= $form->return_form(); $actions .= $form->return_form();
// Create a sortable table with the course data // Create a sortable table with the course data

@ -617,20 +617,19 @@ if (!empty($action)) {
// Create a search-box // Create a search-box
$form = new FormValidator('search_simple','get', '', '', array('class' => 'form-search'),false); $form = new FormValidator('search_simple','get', '', '', array('class' => 'form-search'),false);
$renderer =& $form->defaultRenderer(); /*$renderer =& $form->defaultRenderer();
$renderer->setElementTemplate('<span>{element}</span> '); $renderer->setElementTemplate('<span>{element}</span> ');*/
$form->addElement('text','keyword',get_lang('keyword'), 'size="25"'); $form->addElement('text', 'keyword', get_lang('keyword'));
$form->addElement('style_submit_button', 'submit',get_lang('Search'),'class="btn"'); $form->addElement('button', 'submit' ,get_lang('Search'));
$form->addElement('advanced_settings', 'user_list_filter', get_lang('AdvancedSearch')); $form->addElement('advanced_settings', 'user_list_filter', get_lang('AdvancedSearch'));
$actions = ''; $actions = '';
if (api_is_platform_admin()) { if (api_is_platform_admin()) {
$actions .= '<span style="float:right;">'. $actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'.
'<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'. Display::return_icon('new_user.png',get_lang('AddUsers'),'',ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_user.png',get_lang('AddUsers'),'',ICON_SIZE_MEDIUM).'</a>'.
'</span>';
} }
$actions .= $form->return_form(); $actions .= $form->return_form();
if (isset ($_GET['keyword'])) { if (isset ($_GET['keyword'])) {
$parameters = array ('keyword' => Security::remove_XSS($_GET['keyword'])); $parameters = array ('keyword' => Security::remove_XSS($_GET['keyword']));
} elseif (isset ($_GET['keyword_firstname'])) { } elseif (isset ($_GET['keyword_firstname'])) {

@ -55,6 +55,14 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
*/ */
function HTML_QuickForm_text($elementName = null, $elementLabel = null, $attributes = null) function HTML_QuickForm_text($elementName = null, $elementLabel = null, $attributes = null)
{ {
if (isset($attributes) && is_array($attributes) && !empty($attributes['class'])) {
$attributes['class'] .= $attributes['class'].' form-control';
} else {
if (empty($attributes['class'])) {
$attributes = array('class' => 'form-control');
}
}
HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes); HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->setType('text'); $this->setType('text');
@ -90,9 +98,5 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
function setMaxlength($maxlength) function setMaxlength($maxlength)
{ {
$this->updateAttributes(array('maxlength' => $maxlength )); $this->updateAttributes(array('maxlength' => $maxlength ));
} //end func setMaxlength }
}
// }}}
} //end class HTML_QuickForm_text
?>

@ -197,6 +197,10 @@ $(document).ready( function() {
interval: 10000 interval: 10000
}); });
$('.actions').addClass('btn-group');
$('.actions a').addClass('btn btn-default');
// Tooltip. // Tooltip.
$(function() { $(function() {
$('a').tooltip({ $('a').tooltip({

@ -199,14 +199,13 @@ footer .container .row {
} }
.actions { .actions {
min-height: 20px;
padding: 8px 15px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 20px; margin-bottom: 10px;
background-color: #f5f5f5; }
border: 1px solid #e3e3e3;
border-radius: 4px; .actions form {
height: 50px; margin-left: 10px;
float:right;
} }
.actions .actions-pagination { .actions .actions-pagination {
@ -243,14 +242,10 @@ footer .container .row {
} }
.actions a { .actions a {
display: block;
float: left;
margin-right: 10px;
vertical-align: middle;
} }
.actions .btn-toolbar { .actions .btn-toolbar {
margin: 0px;
} }
#friend-container .thumbnail { #friend-container .thumbnail {

Loading…
Cancel
Save