Merge pull request #1876 from aragonc/1.11.x

fix css label subscriber
pull/2487/head
Alex Aragon Calixto 8 years ago committed by GitHub
commit 2ed1cf9ad0
  1. 7
      app/Resources/public/css/base.css
  2. 17
      main/auth/courses_categories.php

@ -6192,6 +6192,13 @@ ul#toolnavbox-two li a.btn{
display: block;
width: 100%;
}
.label-subscribed{
font-size: 12px;
position: absolute;
top: -65px;
right: 0;
width: 100px;
}
/* CSS NEW TOP ******************************************************************************/
/* CSS Responsive */
@media (min-width: 1025px) and (max-width: 1200px) {

@ -213,7 +213,7 @@ if ($showCourses && $action != 'display_sessions') {
// display course title and button bloc
$html .= '<div class="description">';
$html .= return_title($course, $userRegisterd);
$html .= return_title($course, $userRegisterdInCourse);
$html .= return_teacher($course);
// display button line
@ -226,7 +226,6 @@ if ($showCourses && $action != 'display_sessions') {
// if user registered as student
if ($userRegisterdInCourse) {
$html .= return_already_registered_label('student');
if (!$course_closed) {
if ($course_unsubscribe_allowed) {
$html .= return_unregister_button($course, $stok, $search_term, $code);
@ -434,9 +433,9 @@ function return_already_registered_label($in_status)
}
$html = Display::tag(
'button',
$icon,
array('id' => 'register', 'class' => 'btn btn-default btn-sm', 'title' => $title, 'aria-label' => $title)
'span',
$icon . ' ' . $title,
array('id' => 'register', 'class' => 'label-subscribed text-success', 'title' => $title, 'aria-label' => $title)
);
return $html;
@ -455,7 +454,7 @@ function return_register_button($course, $stok, $code, $search_term)
{
$title = get_lang('Subscribe');
$html = Display::url(
Display::returnFontAwesomeIcon('sign-in'),
Display::returnFontAwesomeIcon('check') . ' ' . $title,
api_get_self() . '?action=subscribe_course&sec_token=' . $stok.
'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code,
array('class' => 'btn btn-success btn-sm', 'title' => $title, 'aria-label' => $title)
@ -474,12 +473,12 @@ function return_register_button($course, $stok, $code, $search_term)
*/
function return_unregister_button($course, $stok, $search_term, $code)
{
$title = get_lang('Unsubscribe');
$title = get_lang('UnsubscriptionAllowed');
$html = Display::url(
Display::returnFontAwesomeIcon('sign-in'),
Display::returnFontAwesomeIcon('sign-in').' '.$title,
api_get_self() . '?action=unsubscribe&sec_token='.$stok
.'&unsubscribe='.$course['code'].'&search_term='.$search_term.'&category_code='.$code,
array('class' => 'btn btn-success btn-sm', 'title' => $title, 'aria-label' => $title)
array('class' => 'btn btn-danger btn-sm', 'title' => $title, 'aria-label' => $title)
);
return $html;
}

Loading…
Cancel
Save