Skip to content

Commit

Permalink
Merge branch 'feat/ALMS-87' into dev-custom-elearning
Browse files Browse the repository at this point in the history
  • Loading branch information
DanixSaTi committed Nov 26, 2024
2 parents 1d7f8f2 + 26c033d commit 5acdaeb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 46 deletions.
51 changes: 5 additions & 46 deletions eLearning_upgraded/views/website_slides_course_main_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
<div class="row">
<div class="col-12 col-md-4 col-lg-3 position-relative">
<div class="d-none d-md-flex align-items-end justify-content-around h-100">
<div t-field="channel.image_1920" t-options="{'widget': 'image', 'class': 'o_wslides_course_pict d-inline-block mb-2 mt-3 my-md-0 custom-image', 'preview_image': 'image_1024'}" class="h-100"/>
<div class="overlay-icon">
<div class="image-wrapped">
<div t-field="channel.image_1920" t-options="{'widget': 'image', 'class': 'o_wslides_course_pict d-inline-block mb-2 mt-3 my-md-0 custom-image', 'preview_image': 'image_1024'}" class="h-100 image-content"/>
</div>
<div class="overlay-icon">
<button role="button" class="btn btn-link" title="Share Channel" aria-label="Share Channel" data-bs-toggle="modal" t-att-data-bs-target="'#slideShareModal_%s' % channel.id">
<img src="/theme_academy/static/src/img/ios_share.png" alt="Icon" class="icon"/>
</button>
Expand Down Expand Up @@ -79,50 +81,7 @@
</a> to browse preview content and enroll.
</div>

<t t-if="channel.channel_type == 'training'" t-call="website_slides.course_slides_list"/>
<t t-else="">

<!-- Featured lesson -->
<t t-if="channel.promote_strategy != 'none'">
<t t-call="website_slides.course_promoted_slide"/>
</t>

<div class="container py-2">


<t t-foreach="category_data" t-as="category">
<div class="mb-2" t-if="(category['slides'] or channel.can_publish) and (search_category and search_category.id == category['id'] or not search_category)">
<t t-set="is_empty_editable" t-value="not category['slides'] and channel.can_publish"/>
<div class="d-flex align-items-center justify-content-between border-bottom pb-2 mb-3" t-if="category['id'] and query_string != '?search_uncategorized=1'">
<h5 t-attf-class="m-0 #{'text-muted' if is_empty_editable else ''}">
<t t-esc="category['name']"/>
</h5>
<a t-if="category['id'] and not is_empty_editable" t-attf-href="/slides/#{channel.id}/category/#{category['id']}?#{keep_query('invite_hash', 'invite_partner_id') if invite_preview else ''}">View all</a>
</div>
<div class="d-flex align-items-center justify-content-between border-bottom pb-2 mb-3" t-if="not category['id'] and len(category['slides']) &gt; 0">
<h5 t-if="len(category_data) &gt; 1" t-attf-class="m-0 #{'text-muted' if is_empty_editable else ''}">
<t t-esc="category['name']"/>
</h5>
<a t-attf-href="/slides/#{channel.id}?uncategorized=1&amp;#{keep_query('invite_hash', 'invite_partner_id') if invite_preview else ''}">View all</a>
</div>
<div class="row mx-n2">
<t t-foreach="category['slides']" t-as="slide">
<div class="col-12 col-sm-6 col-lg-4 px-2 d-flex" t-call="website_slides.lesson_card"/>
</t>
</div>
</div>
</t>

<div class="row">
<div class="col" t-field="channel.description_html"/>
</div>
</div>
<t t-if="search_category or search_uncategorized">
<div class="d-flex justify-content-center pb-5">
<t t-call="website_profile.pager_nobox"/>
</div>
</t>
</t>
<t t-call="website_slides.course_slides_list"/>

</div>
<div t-if="channel.allow_comment" t-att-class="'tab-pane fade %s' % ('show active' if active_tab == 'review' else '')" id="review" role="tabpanel" aria-labelledby="review-tab">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,9 @@
</div>
</template>

<template id="remove_exit_fullscreen_link" name="Remove exit fullscreen link from slide" inherit_id="website_slides.slide_fullscreen" priority="20">
<xpath expr="//a[hasclass('o_wslides_fs_exit_fullscreen')]" position="replace">
</xpath>
</template>

</odoo>
17 changes: 17 additions & 0 deletions theme_academy/static/src/scss/website_slides_courses.scss
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,21 @@ $blue-200: var(--Blue-200, #101E2D);
}
}

}

.image-wrapped {
width: 900px;
height: 170px;
position: relative;
overflow: hidden;
border-radius: 10px 10px 0 0;

.image-content{
width: 100%;
height: 100%;
object-fit: cover; //Oculta el exceso de la imagen
position: absolute;
top: 0;
left: 0;
}
}

0 comments on commit 5acdaeb

Please sign in to comment.