Skip to content

Commit

Permalink
Course catalog: fix button styles in cards - refs BT#19827
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Mar 31, 2022
1 parent 6e0c84c commit 1c7285c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
8 changes: 7 additions & 1 deletion app/Resources/public/css/base.css
Expand Up @@ -6636,10 +6636,16 @@ div#chat-remote-video video {
font-size: 14px;
}

.grid-courses .items .toolbar > div {
.grid-courses .items .toolbar {
margin-top: 10px;
text-align: center;
}

#homepage-announcements .toolbar .btn {
padding-left: 7px;
padding-right: 7px;
}

.grid-courses .items .toolbar .info {
float: left;
font-size: 12px;
Expand Down
10 changes: 5 additions & 5 deletions main/inc/lib/CoursesAndSessionsCatalog.class.php
Expand Up @@ -1135,7 +1135,7 @@ public static function return_register_button($course, $stok, $categoryCode, $se
}

return Display::url(
Display::returnFontAwesomeIcon('check').' '.$title,
Display::returnFontAwesomeIcon('check').PHP_EOL.$title,
api_get_path(WEB_CODE_PATH).'auth/courses.php'
.'?action='.$action.'&sec_token='.$stok
.'&course_code='.$course['code'].'&search_term='.$search_term.'&category_code='.$categoryCode,
Expand Down Expand Up @@ -1166,9 +1166,9 @@ public static function return_unregister_button($course, $stok, $search_term, $c
'&search_term='.$search_term.'&category_code='.$categoryCode;

return Display::url(
Display::returnFontAwesomeIcon('sign-in').' '.$title,
Display::returnFontAwesomeIcon('sign-in').PHP_EOL.$title,
$url,
['class' => 'btn btn-danger', 'title' => $title, 'aria-label' => $title]
['class' => 'btn btn-danger btn-sm', 'title' => $title, 'aria-label' => $title]
);
}

Expand Down Expand Up @@ -2169,10 +2169,10 @@ public static function displayCoursesList(
// if user registered as student
if ($userRegisteredInCourse) {
$course['already_registered_formatted'] = Display::url(
Display::returnFontAwesomeIcon('external-link').' '.
Display::returnFontAwesomeIcon('external-link').PHP_EOL.
get_lang('GoToCourse'),
$courseUrl.$course['directory'].'/index.php?id_session=0',
['class' => 'btn btn-primary']
['class' => 'btn btn-primary btn-sm']
);

if (!$courseClosed && $course_unsubscribe_allowed
Expand Down
14 changes: 4 additions & 10 deletions main/template/default/catalog/course_item_catalog.tpl
Expand Up @@ -104,18 +104,12 @@
{% endblock %}

{% block course_toolbar %}
<div class="toolbar row">
<div class="toolbar">
{% if course.already_registered_formatted %}
<div class="col-sm-6">
{{ course.unregister_formatted }}
</div>
<div class="col-sm-6">
{{ course.already_registered_formatted }}
</div>
{{ course.unregister_formatted }}
{{ course.already_registered_formatted }}
{% else %}
<div class="col-sm-12">
{{ course.subscribe_formatted }}
</div>
{{ course.subscribe_formatted }}
{% endif %}
</div>
{% endblock %}
Expand Down

0 comments on commit 1c7285c

Please sign in to comment.