201html += '<div class="tlk-lectures__partition-wrap">';202html += '<div class="tlk-lectures__partition-title" data-field="tlk-title">';203204if (!props.isHideNumber) {205html += '{{lectures_title_partition}} ' + (props.indexPartition + 1) + ': ';206}207208html += item.name;209html += '</div>';210211for (var i = 0; i < item.lectures.length; i++) {212props.item = item.lectures[i];
props.indexLecture = i; html += tma__courses__getLecturesListPartitionPageHtml(props); } html += '</div>'; html += '</div>'; return html;}/** * Шаблон лекции * * @param {object} props - данные лекции * @returns {string} - шаблон карточки с лекцией */function tma__courses__getLecturesListPartitionPageHtml(props) { var item = props.item; var isAccess = item.hasaccess; var html = ''; html += '<div class="tlk-lectures__course-card' + (!isAccess ? ' tlk-lectures__course-card_disabled' : '') + '">'; html += '<a class="tlk-lectures__course-card-link" ' + (isAccess ? 'href="/members/courses/' + props.urlCourses + '/' + item.alias + '"' : '') + ' data-field="tlk-link">'; html += '<div class="tlk-lectures__course-card-content' + (props.isHideNumber ? ' tlk-lectures__course-card-content_hide-number' : '') + '">'; html += '<div class="tlk-lectures__course-card-content-left">'; if (item.statusid === 'complete') { html += '<div class="tlk-lectures__tick-wrap">'; html += '<span class="tlk-lectures__tick"></span>'; html += '</div>'; } else if (item.statusid === 'viewed') { html += '<img class="tlk-lectures__course-card-img" src="' + window.tildaMembers.endpoint + '/frontend/img/lecture_viewed.svg">'; } else { html += '<img class="tlk-lectures__course-card-img" src="' + tma__courses__getImageLecture(item.typeid) + '">'; } if (!props.isHideNumber) { html += '<span class="tlk-lectures__course-card-number">' + (props.indexPartition + 1) + '.' + (props.indexLecture + 1) + '</span>'; } html += '</div>'; html += '<div class="tlk-lectures__course-card-content-right">'; html += '<span class="tlk-lectures__course-card-name">' + item.name + '</span>'; if (item.hasnotifications) { html += '<span class="tlk-lectures__course-card-notification"></span>'; } if (item.description) { html += '<div class="tlk-lectures__course-card-descr">' + tma__courses__addBreakLineHtml(item.description) + '</div>'; } if (item.startdate) { html += '<div class="tlk-lectures__course-card-webinar-date">' + tma__courses__getDateWebinar(item.startdate) + '</div>'; } if (!isAccess) { var hasLecture = tma__courses__getLecturesListAfterLecture(item.accessdata.afterlectureid); html += '<div class="tlk-lectures__course-card-has-lecture">'; if (item.accessdata.afterlectureid && !item.accessdata.afterlectureoffsettype) { html += tma__translate('{{lectures_has_after_lecture}}', 'courses_dict', { lecturetype: hasLecture ? tma__translate('{{lectures_has_after_lecture_' + hasLecture.typeid + '}}', 'courses_dict') : ' ', lecturename: hasLecture ? hasLecture.name