Каталог файловtilda-members-store-main.js
901 const hasMainBlock = props.courses.length || props.groups.length;902 const hasBg = style && style.backgroundColor && style.backgroundImage;903 const showEmptyBlock = !hasMainBlock && (!isStoreManagementEnabled || !hasStoreManagementResources);904 905 if (!hasTopText && !hasBottomText && !hasMainBlock && !showEmptyBlock) return;906 907 let html = '';908 909 html += '<div class="tlk-resources__container">';910 911 if (hasTopText) {912
История файла и сравнение версий
html += `<div class="tlk-resources__text-top">${style.textTop}</div>`;
916 html += '<div class="tlk-resources__wrap">'; 917 if (props.courses.length !== 0) { 918 html += '<div class="tlk-resources__courses">'; 920 for (let i = 0; i < props.courses.length; i++) { 921 html += tma__resources__getCourseItemHtml(props.courses[i]); 927 if (props.groups.length !== 0) { 928 html += '<div class="tlk-resources__groups">'; 930 for (let i = 0; i < props.groups.length; i++) { 931 html += tma__resources__getGroupItemHtml(props.groups[i]); 939 if (showEmptyBlock) { 940 html += '<div class="tlk-resources__wrap">'; 941 html += '<div class="tlk-resources__empty">'; 942 html += '<div class="tlk-resources__empty-wrap">'; 943 html += '<div class="tlk-resources__empty-image">'; 945 '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">'; 947 '<line fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" x1="7" y1="0" x2="7" y2="64"></line>'; 949 '<polyline fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" points="32.062,6 26,11 26,35 57,35 51,23 57,11 26,11 "></polyline>'; 951 '<polyline fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" points="26,30 7,30 7,6 32,6 32,11 "></polyline>'; 954 html += '<div class="tlk-resources__empty-text">'; 955 html += '{{resources_empty_text_first}}<br>{{resources_empty_text_second}}'; 963 html += `<div class="tlk-resources__text-bottom">${style.textBottom}</div>`; 968 html = tma__translate(html, 'store_dict'); 970 const rootElem = tma__checkContainerDiv('tlk-resources'); 971 rootElem.innerHTML = html; 974 rootElem.insertAdjacentHTML('afterend', '<div class="tlk-app-bg"></div>'); 979 * Шаблон элемента курса 981 * @param {object} props - данные страницы курса 982 * @returns {string} - шаблон страницы курса 984function tma__resources__getCourseItemHtml(props) { 987 html += '<div class="tlk-resources__item">'; 988 html += '<div class="tlk-resources__title">'; 989 html += `<a href="/members/courses/${props.alias}" class="tlk-resources__groups-title-link js-check-email-before-enter" data-field="tlk-link">`; 992 '<svg version="1.1" class="tlk-resources__groups-title-link-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100.2 100.2" style="enable-background:new 0 0 100.2 100.2;" xml:space="preserve">'; 995 '<path class="st0" d="M83,47.5c-0.8,0-1.5,0.7-1.5,1.5v17.5h-49v-49H50c0.8,0,1.5-0.7,1.5-1.5s-0.7-1.5-1.5-1.5H31 c-0.8,0-1.5,0.7-1.5,1.5v13.5H17c-0.8,0-1.5,0.7-1.5,1.5v52c0,0.8,0.7,1.5,1.5,1.5h52c0.8,0,1.5-0.7,1.5-1.5V69.5H83 c0.8,0,1.5-0.7,1.5-1.5V49C84.5,48.2,83.8,47.5,83,47.5z M67.5,81.5h-49v-49h11V68c0,0.8,0.7,1.5,1.5,1.5h36.5V81.5z" />'; 997 '<path class="st0" d="M83,14.5H64c-0.8,0-1.5,0.7-1.5,1.5c0,0.8,0.7,1.5,1.5,1.5h15.4L54.9,41.9c-0.6,0.6-0.6,1.5,0,2.1 c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4l24.4-24.4V35c0,0.8,0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5V16C84.5,15.2,83.8,14.5,83,14.5z" />';