Merge branch 'develop' into feature/794

This commit is contained in:
mateuswetah 2023-09-20 08:52:21 -03:00
commit 84fa0e3f2c
41 changed files with 425 additions and 187 deletions

View File

@ -597,141 +597,141 @@
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item:hover button:hover {
background-color: white !important;
border: 1px solid var(--tainacan-block-gray3, #a5a5a5) !important; }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-9 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-9 {
width: calc((100% / 9) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 9) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-8 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-8 {
width: calc((100% / 8) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 8) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-7 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-7 {
width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 7) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-6 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-6 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-5 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-5 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-4 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-4 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-3 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-3 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-2 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-2 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-1 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) ); }
@media only screen and (max-width: 1686px) {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item {
width: calc(16.666% - var(--spaceBetweenItems, 32px) );
min-width: calc(16.666% - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-9 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-9 {
width: calc((100% / 8) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 8) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-8 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-8 {
width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 7) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-7 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-7 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-6 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-6 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-5 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-5 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-4 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-4 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-3 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-3 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-1 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) ); } }
@media only screen and (max-width: 1452px) {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item {
width: calc(20% - var(--spaceBetweenItems, 32px) );
min-width: calc(20% - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-9 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-9 {
width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 7) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-8 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-8 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-7 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-7 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-6 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-6 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-5 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-5 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-4 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-4 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-1 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) ); } }
@media only screen and (max-width: 1118px) {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item {
width: calc(25% - var(--spaceBetweenItems, 32px) );
min-width: calc(25% - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-9 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-9 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-8 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-8 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-7 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-7 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-6 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-6 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-5 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-5 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-4, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-1 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-4, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) ); } }
@media only screen and (max-width: 854px) {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item {
width: calc(33.333% - var(--spaceBetweenItems, 32px) );
min-width: calc(33.333% - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-9 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-9 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-8 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-8 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-7 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-7 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-6 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-6 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-5, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-4, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-1 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-5, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-4, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) ); } }
@media only screen and (max-width: 584px) {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item {
width: calc(50% - var(--spaceBetweenItems, 32px) );
min-width: calc(50% - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-9 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-9 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-8 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-8 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-7 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-7 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) ); }
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-6, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-5, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-4, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-itens-per-screen-1 {
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-6, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-5, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-4, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) ); } }
.wp-block-tainacan-carousel-items-list .swiper-slide-duplicate img {

View File

@ -285,6 +285,143 @@
opacity: 0;
z-index: -1000; }
:root {
/*
--swiper-pagination-color: var(--swiper-theme-color);
--swiper-pagination-bullet-size: 8px;
--swiper-pagination-bullet-width: 8px;
--swiper-pagination-bullet-height: 8px;
--swiper-pagination-bullet-inactive-color: #000;
--swiper-pagination-bullet-inactive-opacity: 0.2;
--swiper-pagination-bullet-opacity: 1;
--swiper-pagination-bullet-horizontal-gap: 4px;
--swiper-pagination-bullet-vertical-gap: 6px;
*/ }
.swiper-pagination {
position: absolute;
text-align: center;
transition: 300ms opacity;
transform: translate3d(0, 0, 0);
z-index: 10; }
.swiper-pagination.swiper-pagination-hidden {
opacity: 0; }
.swiper-pagination-disabled > .swiper-pagination, .swiper-pagination.swiper-pagination-disabled {
display: none !important; }
/* Common Styles */
.swiper-pagination-fraction,
.swiper-pagination-custom,
.swiper-horizontal > .swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal {
bottom: 10px;
left: 0;
width: 100%; }
/* Bullets */
.swiper-pagination-bullets-dynamic {
overflow: hidden;
font-size: 0; }
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transform: scale(0.33);
position: relative; }
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
transform: scale(1); }
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
transform: scale(1); }
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
transform: scale(0.66); }
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
transform: scale(0.33); }
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
transform: scale(0.66); }
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
transform: scale(0.33); }
.swiper-pagination-bullet {
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
display: inline-block;
border-radius: 50%;
background: var(--swiper-pagination-bullet-inactive-color, #000);
opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); }
button.swiper-pagination-bullet {
border: none;
margin: 0;
padding: 0;
box-shadow: none;
appearance: none; }
.swiper-pagination-clickable .swiper-pagination-bullet {
cursor: pointer; }
.swiper-pagination-bullet:only-child {
display: none !important; }
.swiper-pagination-bullet-active {
opacity: var(--swiper-pagination-bullet-opacity, 1);
background: var(--swiper-pagination-color, var(--swiper-theme-color)); }
.swiper-vertical > .swiper-pagination-bullets,
.swiper-pagination-vertical.swiper-pagination-bullets {
right: 10px;
top: 50%;
transform: translate3d(0px, -50%, 0); }
.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet {
margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;
display: block; }
.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
top: 50%;
transform: translateY(-50%);
width: 8px; }
.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
display: inline-block;
transition: 200ms transform, 200ms top; }
.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px); }
.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,
.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
left: 50%;
transform: translateX(-50%);
white-space: nowrap; }
.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: 200ms transform, 200ms left; }
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: 200ms transform, 200ms right; }
/* Progress */
.swiper-pagination-progressbar {
background: rgba(0, 0, 0, 0.25);
position: absolute; }
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
background: var(--swiper-pagination-color, var(--swiper-theme-color));
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
transform: scale(0);
transform-origin: left top; }
.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
transform-origin: right top; }
.swiper-horizontal > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-horizontal, .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {
width: 100%;
height: 4px;
left: 0;
top: 0; }
.swiper-vertical > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-vertical, .swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {
width: 4px;
height: 100%;
left: 0;
top: 0; }
.swiper-pagination-lock {
display: none; }
.item-gallery-edit-container .tainacan-media-component .swiper-slide,
.item-gallery-edit-container .tainacan-media-component .swiper-button-prev,
.item-gallery-edit-container .tainacan-media-component .swiper-button-next {
@ -330,7 +467,9 @@
--tainacan-media-thumbs-carousel-width: 100%;
--tainacan-media-thumbs-carousel-item-size: 136px;
height: auto;
display: block;
display: flex;
flex-direction: column;
gap: 1rem;
background-color: var(--tainacan-media-background, transparent);
box-sizing: border-box; }
.tainacan-media-component:not(.alignfull):not(.alignwide) {
@ -404,7 +543,8 @@
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata {
text-align: center;
font-size: 0.875em;
margin-bottom: 1em; }
margin-bottom: 1em;
margin-top: 1rem; }
.tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-name .swiper-slide-metadata__name {
display: none;
visibility: hidden; }
@ -477,7 +617,7 @@
background: var(--tainacan-media-background, #ffffff);
border-radius: 3px;
word-wrap: break-word;
padding: 1rem 2rem;
padding: 0rem 2rem;
display: block; }
.tainacan-media-component__swiper-main .swiper-slide-content audio {
background: black;
@ -503,6 +643,10 @@
.tainacan-media-component__swiper-thumbs {
width: 100%;
max-width: var(--tainacan-media-thumbs-carousel-width, 100%); }
.tainacan-media-component__swiper-thumbs.swiper-is-beginning .swiper-start-border {
display: none; }
.tainacan-media-component__swiper-thumbs.swiper-is-end .swiper-end-border {
display: none; }
.tainacan-media-component__swiper-thumbs ul.swiper-wrapper {
max-width: calc(100% - var(--swiper-navigation-size, 44px) - var(--swiper-navigation-size, 44px));
margin: 0 var(--swiper-navigation-size, 44px); }

View File

@ -322,7 +322,7 @@ class REST_Exporters_Controller extends REST_Controller {
'readonly' => true
],
'options_form' => [
'description' => esc_html__( 'The form to input the set set of options exporter may have its own.', 'tainacan' ),
'description' => esc_html__( 'The HTML form with a set of options that the exporter may have.', 'tainacan' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true
@ -472,13 +472,13 @@ class REST_Exporters_Controller extends REST_Controller {
'readonly' => true
],
'manual_mapping' => [
'description' => esc_html__( 'Wether Tainacan must present the user with an interface to manually choose a mapping standard. This will allow them to export the items mapped to a chosen standard instead of in its original form.', 'tainacan' ),
'description' => esc_html__( 'Whether Tainacan must present the user with an interface to manually choose a mapping standard. This will allow them to export the items mapped to a chosen standard instead of in its original form.', 'tainacan' ),
'type' => 'boolean',
'context' => array( 'view' ),
'readonly' => true
],
'manual_collection' => [
'description' => esc_html__( 'Wether Tainacan will let the user choose the source collection. If set to true, Tainacan give the user a select box from where he/she will Choose one (and only one) Collection to export items from. Otherwise, the child exporter class must choose the collections somehow.', 'tainacan' ),
'description' => esc_html__( 'Whether Tainacan will let the user choose the source collection. If set to true, Tainacan give the user a select box from where he/she will Choose one (and only one) Collection to export items from. Otherwise, the child exporter class must choose the collections somehow.', 'tainacan' ),
'type' => 'boolean',
'context' => array( 'view' ),
'readonly' => true

View File

@ -245,7 +245,7 @@ class REST_Facets_Controller extends REST_Controller {
],
'parent' => [
'type' => 'string',
'description' => __( 'Parent metadatum id, if the metadtumof the facet', 'tainacan' ),
'description' => __( 'Parent term id, if coming from a Taxonomy metadata type tha has hierarchy.', 'tainacan' ),
],
'total_items' => [
'type' => 'integer',

View File

@ -197,12 +197,12 @@ class REST_Filters_Controller extends REST_Controller {
$collection = $this->collection_repository->fetch( $request['collection_id'] );
if ( $collection instanceof Entities\Collection ) {
return current_user_can( 'tnc_col_' . $collection->get_id() . '_manage_filters' );
return $collection->user_can( 'edit_filters' );
}
} else {
return current_user_can( 'tnc_rep_manage_filters' );
return current_user_can( 'tnc_rep_edit_filters' );
}

View File

@ -40,7 +40,7 @@ class Entity {
public $WP_Post;
/**
* Indicates wether an entity was validated, calling the validate() method
* Indicates whether an entity was validated, calling the validate() method
*
* Entities MUST be validated before attempt to save
*

View File

@ -417,7 +417,7 @@ class Item_Metadata_Entity extends Entity {
}
/**
* Check wether the item has a value stored in the database or not
* Check whether the item has a value stored in the database or not
*
* @return bool
*/

View File

@ -307,7 +307,7 @@ class Item extends Entity {
* @return string "open"|"closed"
*/
public function get_comment_status() {
return apply_filters('comments_open', $this->get_mapped_property('comment_status'), $this->get_id());
return apply_filters('tainacan-item-comments_open', $this->get_mapped_property('comment_status'), $this->get_id());
}
/**
@ -537,7 +537,7 @@ class Item extends Entity {
*
* @type bool $exclude_core Exclude Core Metadata (title and description) from result. Default false
*
* @type bool $hide_empty Wether to hide or not metadata the item has no value to
* @type bool $hide_empty Whether to hide or not metadata the item has no value to
* Default: true
* @type string $empty_value_message Message string to display if $hide_empty is false and there is not metadata value.
* Default: ''
@ -707,7 +707,7 @@ class Item extends Entity {
* @param array|string $args {
* Optional. Array or string of arguments.
*
* @type bool $hide_empty Wether to hide or not metadata the item has no value to
* @type bool $hide_empty Whether to hide or not metadata the item has no value to
* Default: true
* @type string $empty_value_message Message string to display if $hide_empty is false and there is not metadata value.
* Default: ''
@ -780,9 +780,16 @@ class Item extends Entity {
// Renders the metadatum name
$metadatum_title_before = $args['before_title'];
$metadatum_title_before = apply_filters( 'tainacan-get-item-metadatum-as-html-before-title', $metadatum_title_before, $item_metadatum );
$metadatum_status_info = '';
if ( $item_metadatum->get_metadatum()->get_status() != 'publish' ) {
$metadatum_status_object = get_post_status_object( $item_metadatum->get_metadatum()->get_status() );
$metadatum_status_info = ( $metadatum_status_object && $metadatum_status_object->label ? __( $metadatum_status_object->label, 'tainacan') : $item_metadatum->get_metadatum()->get_status() ) . ': ';
}
$metadatum_title_after = $args['after_title'];
$metadatum_title_after = apply_filters( 'tainacan-get-item-metadatum-as-html-after-title', $metadatum_title_after, $item_metadatum );
$return .= $metadatum_title_before . $item_metadatum->get_metadatum()->get_name() . $metadatum_title_after;
$return .= $metadatum_title_before . $metadatum_status_info . $item_metadatum->get_metadatum()->get_name() . $metadatum_title_after;
// Renders the metadatum value
$metadatum_value_before = $args['before_value'];
@ -982,7 +989,7 @@ class Item extends Entity {
*
* @type bool $hide_description Do not display the Metadata Section description. Default true
*
* @type bool $hide_empty Wether to hide or not metadata sections if there are no metadata list or they are empty
* @type bool $hide_empty Whether to hide or not metadata sections if there are no metadata list or they are empty
* Default: true
* @type string $empty_metadata_list_message Message string to display if $hide_empty is false and there is not metadata section metadata list.
* Default: ''
@ -1142,7 +1149,7 @@ class Item extends Entity {
*
* @type bool $hide_description Do not display the Metadata Section description. Default true
*
* @type bool $hide_empty Wether to hide or not metadata sections if there are no metadata list or they are empty
* @type bool $hide_empty Whether to hide or not metadata sections if there are no metadata list or they are empty
* Default: true
* @type string $empty_metadata_list_message Message string to display if $hide_empty is false and there is not metadata section metadata list.
* Default: ''

View File

@ -271,7 +271,7 @@ class Taxonomy extends Entity {
*
* @param string $term_name The term name
* @param int|null $parent The ID of the parent term to look for children or null to look for terms in any hierarchical position. Default is null
* @param bool $return_term wether to return the term object if it exists. default is to false
* @param bool $return_term whether to return the term object if it exists. default is to false
*
* @return bool|WP_Term return boolean indicating if term exists. If $return_term is true and term exists, return WP_Term object
*/

View File

@ -124,14 +124,14 @@ abstract class Exporter {
*
* Add and remove transient data using add_transient() and delete_transient() methods
*
* Transitens can be strings, numbers or arrays. Avoid storing objects.
* Transients can be strings, numbers or arrays. Avoid storing objects.
*
* @var array
*/
protected $transients = [];
/**
* Wether to abort importer/exporter execution.
* Whether to abort importer/exporter execution.
* @var bool
*/
protected $abort = false;
@ -386,7 +386,7 @@ abstract class Exporter {
}
/**
* Return wether importer should abort execution or not
* Return whether importer should abort execution or not
* @return bool
*/
public function get_abort() {

View File

@ -177,7 +177,7 @@ abstract class Generic_Process {
}
/**
* Return wether importer should abort execution or not
* Return whether importer should abort execution or not
* @return bool
*/
public function get_abort() {

View File

@ -115,7 +115,7 @@ class Importer_Handler {
* @type string $slug A unique slug for the importer. e.g. 'This is an example importer description'
* @type string $description The importer description. e.g. 'example-importer'
* @type string $class_name The Importer Class. e.g. '\Tainacan\Importer\Test_Importer'
* @type bool $manual_mapping Wether Tainacan must present the user with an interface to manually map
* @type bool $manual_mapping Whether Tainacan must present the user with an interface to manually map
* the metadata from the source to the target collection.
*
* If set to true, Importer Class must implement the method
@ -123,7 +123,7 @@ class Importer_Handler {
*
* Note that this will only work when importing items to one single collection.
*
* @type bool $manual_collection Wether Tainacan will let the user choose a destination collection.
* @type bool $manual_collection Whether Tainacan will let the user choose a destination collection.
*
* If set to true, the API endpoints will handle Collection creation and will assign it to
* the importer object using add_collection() method.

View File

@ -93,7 +93,7 @@ abstract class Importer {
*
* Add and remove transient data using add_transient() and delete_transient() methods
*
* Transitens can be strings, numbers or arrays. Avoid storing objects.
* Transients can be strings, numbers or arrays. Avoid storing objects.
*
* @var array
*/
@ -484,7 +484,7 @@ abstract class Importer {
}
/**
* Return wether importer should abort execution or not
* Return whether importer should abort execution or not
* @return bool
*/
public function get_abort() {

View File

@ -26,7 +26,7 @@ class Items extends Repository {
protected function __construct() {
parent::__construct();
add_filter( 'comments_open', [$this, 'hook_comments_open'], 10, 2);
add_filter( 'tainacan-item-comments_open', [$this, 'hook_comments_open'], 10, 2);
add_action( 'tainacan-api-item-updated', array( &$this, 'hook_api_updated_item' ), 10, 2 );
add_filter( 'map_meta_cap', array( $this, 'map_meta_cap' ), 10, 4 );
}
@ -582,16 +582,16 @@ class Items extends Repository {
/**
* Return if comment are open for this item (post_id) and the collection too
*
* @param bool $open_comment
* @param string $open_comment
* @param integer $post_id Item id
* @return bool
* @return string
*/
public function hook_comments_open($open_comment, $post_id) {
$item = self::get_entity_by_post($post_id);
if($item != false && $item instanceof Entities\Item) {
$collection = $item->get_collection();
if( $collection != null && $collection->get_allow_comments() !== 'open' ) return false;
if( $collection != null && $collection->get_allow_comments() !== 'open' ) return 'closed';
}
return $open_comment;

View File

@ -661,7 +661,7 @@ class Metadata extends Repository {
*
* @param array $result Response from method fetch_by_collection
* @param Entities\Collection $collection
* @param bool $include_disabled Wether to include disabled metadata in the results or not
* @param bool $include_disabled Whether to include disabled metadata in the results or not
*
* @return array
*/

View File

@ -378,7 +378,7 @@ class Taxonomies extends Repository {
* @param Entities\Taxonomy $taxonomy The taxonomy object where to look for terms
* @param string $term_name The term name
* @param int|null $parent The ID of the parent term to look for children or null to look for terms in any hierarchical position. Default is null
* @param bool $return_term wether to return the term object if it exists. default is to false
* @param bool $return_term whether to return the term object if it exists. default is to false
*
* @return bool|WP_Term return boolean indicating if term exists. If $return_term is true and term exists, return WP_Term object
*/

View File

@ -305,7 +305,7 @@ class Terms extends Repository {
* @param string $searched_term The term name (string) or term_id (integer). If term id is passed, parent is not considered.
* @param mixed $taxonomy The taxonomy ID, slug or Entity.
* @param int $parent The ID of the parent term to look for children or null to look for terms in any hierarchical position. Default is null
* @param bool $return_term wether to return the term object if it exists. default is to false
* @param bool $return_term whether to return the term object if it exists. default is to false
*
* @return bool|WP_Term return boolean indicating if term exists. If $return_term is true and term exists, return WP_Term object
*/

View File

@ -757,12 +757,12 @@ class Theme_Helper {
* Default view-mode-{$slug}
* @type string $thumbnail Full URL to an thumbnail that represents the view mode. Displayed in admin.
* @type string $icon HTML that outputs an icon that represents the view mode. Displayed in front end.
* @type bool $show_pagination Wether to display or not pagination controls. Default true.
* @type bool $full_screen Wether the view mode will display full screen or not. Default false.
* @type bool $dynamic_metadata Wether to display or not (and use or not) the "displayed metadata" selector. Default false.
* @type bool $implements_skeleton Wether the view mode has its own strategy for disaplying loading state.
* @type bool $show_pagination Whether to display or not pagination controls. Default true.
* @type bool $full_screen Whether the view mode will display full screen or not. Default false.
* @type bool $dynamic_metadata Whether to display or not (and use or not) the "displayed metadata" selector. Default false.
* @type bool $implements_skeleton Whether the view mode has its own strategy for disaplying loading state.
* @type string $skeleton_template If the view mode is a template, this is the html of its loading state.
* @type bool $required_thumbnail Wether the view mode considers essential that the item thumbnail is available, even if it is a placeholder.
* @type bool $required_thumbnail Whether the view mode considers essential that the item thumbnail is available, even if it is a placeholder.
* }
*
* @return void
@ -1614,6 +1614,48 @@ class Theme_Helper {
$wrapper_attributes .= 'class="tainacan-media-component"';
}
/**
* Filters the Swiper options for the main slider
*
* @param Object item The current item object
* @param Object args Arguments passed to the get_tainacan_item_gallery function
*/
$extra_swiper_main_options = [];
$extra_swiper_main_options = apply_filters( 'tainacan-swiper-main-options', $extra_swiper_main_options, $item, $args );
$swiper_main_options = array_merge(
$extra_swiper_main_options,
$layout_elements['main'] ? array(
'navigation' => array(
'nextEl' => sprintf('.swiper-navigation-next_tainacan-item-gallery-block_id-%s-main', $block_id),
'prevEl' => sprintf('.swiper-navigation-prev_tainacan-item-gallery-block_id-%s-main', $block_id),
'preloadImages' => false,
'lazy' => true
)
) : []
);
/**
* Filters the Swiper options for the thumbnails slider
*
* @param Object item The current item object
* @param Object args Arguments passed to the get_tainacan_item_gallery function
*/
$extra_swiper_thumbs_options = [];
$extra_swiper_thumbs_options = apply_filters( 'tainacan-swiper-thumbs-options', $extra_swiper_thumbs_options, $item, $args );
$swiper_thumbs_options = array_merge(
$extra_swiper_thumbs_options,
( $layout_elements['thumbnails'] && !$layout_elements['main'] ) ? array(
'navigation' => array(
'nextEl' => sprintf('.swiper-navigation-next_tainacan-item-gallery-block_id-%s-thumbs', $block_id),
'prevEl' => sprintf('.swiper-navigation-prev_tainacan-item-gallery-block_id-%s-thumbs', $block_id),
'preloadImages' => false,
'lazy' => true
)
) : []
);
return tainacan_get_the_media_component(
'tainacan-item-gallery-block_id-' . $block_id,
$layout_elements['thumbnails'] ? $media_items_thumbnails : null,
@ -1622,22 +1664,8 @@ class Theme_Helper {
'wrapper_attributes' => $wrapper_attributes,
'class_main_div' => '',
'class_thumbs_div' => '',
'swiper_main_options' => $layout_elements['main'] ? array(
'navigation' => array(
'nextEl' => sprintf('.swiper-navigation-next_tainacan-item-gallery-block_id-%s-main', $block_id),
'prevEl' => sprintf('.swiper-navigation-prev_tainacan-item-gallery-block_id-%s-main', $block_id),
'preloadImages' => false,
'lazy' => true
)
) : '',
'swiper_thumbs_options' => ( $layout_elements['thumbnails'] && !$layout_elements['main'] ) ? array(
'navigation' => array(
'nextEl' => sprintf('.swiper-navigation-next_tainacan-item-gallery-block_id-%s-thumbs', $block_id),
'prevEl' => sprintf('.swiper-navigation-prev_tainacan-item-gallery-block_id-%s-thumbs', $block_id),
'preloadImages' => false,
'lazy' => true
)
) : '',
'swiper_main_options' => $swiper_main_options,
'swiper_thumbs_options' => $swiper_thumbs_options,
'swiper_arrows_as_svg' => $show_arrows_as_svg,
'disable_lightbox' => !$open_lightbox_on_click,
'hide_media_name' => $hide_file_name_lightbox,
@ -1667,7 +1695,7 @@ class Theme_Helper {
* @type bool $exclude_title Exclude the Core Title Metadata from result. Default false
* @type bool $exclude_description Exclude the Core Description Metadata from result. Default false
* @type bool $exclude_core Exclude Core Metadata (title and description) from result. Default false
* @type bool $hide_empty Wether to hide or not metadata the item has no value to
* @type bool $hide_empty Whether to hide or not metadata the item has no value to
* Default: true
* @type string $empty_value_message Message string to display if $hide_empty is false and there is not metadata value. Default ''
* @type string $before String to be added before each metadata block

View File

@ -23,7 +23,7 @@ use \Tainacan\Repositories;
* @type bool $exclude_title Exclude the Core Title Metadata from result. Default false
* @type bool $exclude_description Exclude the Core Description Metadata from result. Default false
* @type bool $exclude_core Exclude Core Metadata (title and description) from result. Default false
* @type bool $hide_empty Wether to hide or not metadata the item has no value to
* @type bool $hide_empty Whether to hide or not metadata the item has no value to
* Default: true
* @type string $empty_value_message Message string to display if $hide_empty is false and there is not metadata value. Default ''
* @type string $before String to be added before each metadata block
@ -465,7 +465,7 @@ function tainacan_get_the_media_component(
<?php if ( $args['swiper_thumbs_options'] && isset($args['swiper_thumbs_options']['pagination']) ) : ?>
<!-- If we need pagination -->
<div class="swiper-paginations swiper-pagination_<?php echo esc_attr($args['media_thumbs_id']) ?>"></div>
<div class="swiper-pagination swiper-pagination_<?php echo esc_attr($args['media_thumbs_id']) ?>"></div>
<?php endif; ?>
<?php if ( $args['swiper_thumbs_options'] && isset($args['swiper_thumbs_options']['navigation']) ) : ?>
@ -834,7 +834,7 @@ function tainacan_get_item($post_id = 0) {
/**
* To be used inside The Loop of a faceted serach view mode template.
*
* Returns true or false indicating wether a certain property or metadata is
* Returns true or false indicating whether a certain property or metadata is
* selected to be displayed
*
* @param string|integer The property to be checked. If a string is passed, it will check against
@ -1157,7 +1157,7 @@ function tainacan_the_item_gallery($args = []) {
*
* @type bool $hide_description Do not display the Metadata Section description. Default true
*
* @type bool $hide_empty Wether to hide or not metadata sections if there are no metadata list or they are empty
* @type bool $hide_empty Whether to hide or not metadata sections if there are no metadata list or they are empty
* Default: true
* @type string $empty_metadata_list_message Message string to display if $hide_empty is false and there is not metadata section metadata list.
* Default: ''

View File

@ -749,7 +749,7 @@ export default {
viewModesList: [],
fromImporter: '',
registeredViewModes: tainacan_plugin.registered_view_modes,
reCAPTCHASettingsPagePath: tainacan_plugin.admin_url + 'admin.php?page=tainacan_item_submission',
reCAPTCHASettingsPagePath: tainacan_plugin.admin_url + '?page=tainacan_item_submission',
newPagePath: tainacan_plugin.admin_url + 'post-new.php?post_type=page',
isUpdatingSlug: false,
entityName: 'collection',

View File

@ -123,7 +123,7 @@
exporterType: '',
exporterName: '',
collections: [],
adminFullURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#',
adminFullURL: tainacan_plugin.admin_url + '?page=tainacan_admin#',
isFetchingCollections: false,
selectedMapping: undefined,
selectedCollection: undefined,

View File

@ -169,7 +169,7 @@
editItemId: false,
editCollectionId: false,
editItemModal: false,
adminURL: tainacan_plugin.admin_url + 'admin.php?',
adminURL: tainacan_plugin.admin_url + '?',
isUpdatingRelatedItems: false
}
},

View File

@ -399,7 +399,7 @@
let htmlList = '';
for (let i = 0; i < collections.length; i++) {
htmlList += `<a target="_blank" href=${ this.adminUrl + 'admin.php?page=tainacan_admin#' + this.$routerHelper.getCollectionPath(collections[i].id)}>${collections[i].name} (${metadata[collections[i].id].name})</a>`;
htmlList += `<a target="_blank" href=${ this.adminUrl + '?page=tainacan_admin#' + this.$routerHelper.getCollectionPath(collections[i].id)}>${collections[i].name} (${metadata[collections[i].id].name})</a>`;
if (collections.length > 2 && i < collections.length - 1) {
if (i < collections.length - 2)
htmlList += ', '

View File

@ -91,7 +91,7 @@ abstract class Metadata_Type {
private $preview_template;
/**
* Indicates wether this metadata type will generate metadata that should be available as sorting options in the items list UI.
* Indicates whether this metadata type will generate metadata that should be available as sorting options in the items list UI.
*/
private $sortable = true;

View File

@ -169,7 +169,7 @@
page: 1,
activeTab: 0,
editItemModalOpen: false,
adminURL: tainacan_plugin.admin_url + 'admin.php?',
adminURL: tainacan_plugin.admin_url + '?',
currentUserCanEditItems: false,
selectedValuesAsHtml: []
}
@ -254,7 +254,7 @@
});
}
// Checks if current user can edit itens on the related collection to offer modal
// Checks if current user can edit items on the related collection to offer modal
if (this.collection && this.collection.id == this.collectionId)
this.currentUserCanEditItems = this.collection.current_user_can_edit_items;
else {

View File

@ -354,6 +354,9 @@ class Taxonomy extends Metadata_Type {
public function get_value_as_html(Item_Metadata_Entity $item_metadata) {
$value = $item_metadata->get_value();
$return = '';
if ( !isset($value) )
return $return;
if ( $item_metadata->is_multiple() ) {
$count = 1;

View File

@ -624,7 +624,7 @@
dateFormat: '',
activityCreationDate: '',
isLoadingActivity: false,
adminFullURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#',
adminFullURL: tainacan_plugin.admin_url + '?page=tainacan_admin#',
}
},
computed: {

View File

@ -251,7 +251,7 @@ export const changeTermsParent = ({}, { taxonomyId, newParentTerm, terms, parent
// Used only on Term Edit form, for autocomplete search for parents
export const fetchPossibleParentTerms = ({ commit }, { taxonomyId, termId, search, offset } ) => {
const excludeTree = termId ? qs.stringify({ exclude_tree: termId }) : '';
const excludeTree = termId && termId != 'new' ? qs.stringify({ exclude_tree: termId }) : '';
let endpoint = '/taxonomy/' + taxonomyId + '/terms?searchterm=' + search + '&hierarchical=1&hideempty=0&offset=0&number=20&order=asc&' + excludeTree;

View File

@ -109,7 +109,17 @@
)"
:key="index"
class="field">
<label class="label">{{ itemMetadatum.metadatum.name }}</label>
<label class="label">
{{ itemMetadatum.metadatum.name }}
<span
v-if="itemMetadatum.metadatum.status !== 'publish'"
class="icon has-text-gray">
<i
class="tainacan-icon tainacan-icon-1em"
:class="$statusHelper.getIcon(itemMetadatum.metadatum.status)"
/>
</span>
</label>
<div
:class="{
'metadata-type-textarea': itemMetadatum.metadatum.metadata_type_object.component == 'tainacan-textarea',

View File

@ -386,11 +386,10 @@ class Admin {
}
function admin_body_class( $classes ) {
global $pagenow;
if ( $pagenow == 'admin.php' && isset( $_GET['page'] ) && $_GET['page'] == $this->menu_slug ) {
$classes .= ' tainacan-admin-page';
}
if ( isset( $_GET['page'] ) && $_GET['page'] == $this->menu_slug )
$classes .= ' tainacan-admin-page';
return $classes;
}

View File

@ -49,7 +49,7 @@ export default class CarouselItemsModal extends React.Component {
this.fetchCollection(this.props.existingCollectionId);
this.setState({
searchURL: (this.props.existingSearchURL && this.props.existingSearchURL.indexOf('iframemode') < 0) ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?' + (this.props.loadStrategy == 'search' ? 'itemsSearchSelectionMode' : 'itemsMultipleSelectionMode') + '=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
searchURL: (this.props.existingSearchURL && this.props.existingSearchURL.indexOf('iframemode') < 0) ? this.props.existingSearchURL : tainacan_blocks.admin_url + '?' + (this.props.loadStrategy == 'search' ? 'itemsSearchSelectionMode' : 'itemsMultipleSelectionMode') + '=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
});
} else {
this.setState({ collectionPage: 1 });
@ -117,7 +117,7 @@ export default class CarouselItemsModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_blocks.admin_url + 'admin.php?' + (this.props.loadStrategy == 'search' ? 'itemsSearchSelectionMode' : 'itemsMultipleSelectionMode') + '=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?' + (this.props.loadStrategy == 'search' ? 'itemsSearchSelectionMode' : 'itemsMultipleSelectionMode') + '=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
});
this.props.onSelectCollection(selectedCollectionId);
this.fetchCollection(selectedCollectionId);

View File

@ -89,7 +89,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
return (
<li
key={ item.id }
className={ 'swiper-slide item-list-item ' + (maxItemsPerScreen ? ' max-itens-per-screen-' + maxItemsPerScreen : '') + (['tainacan-medium', 'tainacan-small'].indexOf(imageSize) > -1 ? ' is-forced-square' : '') }>
className={ 'swiper-slide item-list-item ' + (maxItemsPerScreen ? ' max-items-per-screen-' + maxItemsPerScreen : '') + (['tainacan-medium', 'tainacan-small'].indexOf(imageSize) > -1 ? ' is-forced-square' : '') }>
{ loadStrategy == 'selection' ?
<Button
onClick={ () => removeItemOfId(item.id) }

View File

@ -386,39 +386,39 @@
border: 1px solid var(--tainacan-block-gray3, $gray3) !important;
}
&.max-itens-per-screen-9 {
&.max-items-per-screen-9 {
width: calc((100% / 9) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 9) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-8 {
&.max-items-per-screen-8 {
width: calc((100% / 8) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 8) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-7 {
&.max-items-per-screen-7 {
width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-6 {
&.max-items-per-screen-6 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-5 {
&.max-items-per-screen-5 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-4 {
&.max-items-per-screen-4 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-3 {
&.max-items-per-screen-3 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-2 {
&.max-items-per-screen-2 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-1 {
&.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) );
}
@ -430,36 +430,36 @@
width: calc(16.666% - var(--spaceBetweenItems, 32px) );
min-width: calc(16.666% - var(--spaceBetweenItems, 32px) );
&.max-itens-per-screen-9 {
&.max-items-per-screen-9 {
width: calc((100% / 8) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 8) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-8 {
&.max-items-per-screen-8 {
width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-7 {
&.max-items-per-screen-7 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-6 {
&.max-items-per-screen-6 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-5 {
&.max-items-per-screen-5 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-4 {
&.max-items-per-screen-4 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-3 {
&.max-items-per-screen-3 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-2,
&.max-itens-per-screen-1 {
&.max-items-per-screen-2,
&.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) );
}
@ -471,33 +471,33 @@
width: calc(20% - var(--spaceBetweenItems, 32px) );
min-width: calc(20% - var(--spaceBetweenItems, 32px) );
&.max-itens-per-screen-9 {
&.max-items-per-screen-9 {
width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 7) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-8 {
&.max-items-per-screen-8 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-7 {
&.max-items-per-screen-7 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-6 {
&.max-items-per-screen-6 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-5 {
&.max-items-per-screen-5 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-4 {
&.max-items-per-screen-4 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-3,
&.max-itens-per-screen-2,
&.max-itens-per-screen-1 {
&.max-items-per-screen-3,
&.max-items-per-screen-2,
&.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) );
}
@ -509,30 +509,30 @@
width: calc(25% - var(--spaceBetweenItems, 32px) );
min-width: calc(25% - var(--spaceBetweenItems, 32px) );
&.max-itens-per-screen-9 {
&.max-items-per-screen-9 {
width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 6) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-8 {
&.max-items-per-screen-8 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-7 {
&.max-items-per-screen-7 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-6 {
&.max-items-per-screen-6 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-5 {
&.max-items-per-screen-5 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-4,
&.max-itens-per-screen-3,
&.max-itens-per-screen-2,
&.max-itens-per-screen-1 {
&.max-items-per-screen-4,
&.max-items-per-screen-3,
&.max-items-per-screen-2,
&.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) );
}
@ -544,27 +544,27 @@
width: calc(33.333% - var(--spaceBetweenItems, 32px) );
min-width: calc(33.333% - var(--spaceBetweenItems, 32px) );
&.max-itens-per-screen-9 {
&.max-items-per-screen-9 {
width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 5) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-8 {
&.max-items-per-screen-8 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-7 {
&.max-items-per-screen-7 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-6 {
&.max-items-per-screen-6 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-5,
&.max-itens-per-screen-4,
&.max-itens-per-screen-3,
&.max-itens-per-screen-2,
&.max-itens-per-screen-1 {
&.max-items-per-screen-5,
&.max-items-per-screen-4,
&.max-items-per-screen-3,
&.max-items-per-screen-2,
&.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) );
}
@ -576,24 +576,24 @@
width: calc(50% - var(--spaceBetweenItems, 32px) );
min-width: calc(50% - var(--spaceBetweenItems, 32px) );
&.max-itens-per-screen-9 {
&.max-items-per-screen-9 {
width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 4) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-8 {
&.max-items-per-screen-8 {
width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 3) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-7 {
&.max-items-per-screen-7 {
width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
min-width: calc((100% / 2) - var(--spaceBetweenItems, 32px) );
}
&.max-itens-per-screen-6,
&.max-itens-per-screen-5,
&.max-itens-per-screen-4,
&.max-itens-per-screen-3,
&.max-itens-per-screen-2,
&.max-itens-per-screen-1 {
&.max-items-per-screen-6,
&.max-items-per-screen-5,
&.max-items-per-screen-4,
&.max-items-per-screen-3,
&.max-items-per-screen-2,
&.max-items-per-screen-1 {
width: calc(100% - var(--spaceBetweenItems, 32px) );
min-width: calc(100% - var(--spaceBetweenItems, 32px) );
}

View File

@ -2,6 +2,7 @@
@import '../../../../../node_modules/swiper/modules/navigation.scss';
@import '../../../../../node_modules/swiper/modules/a11y.scss';
@import '../../../../../node_modules/swiper/modules/autoplay.scss';
@import '../../../../../node_modules/swiper/modules/pagination.scss';
.item-gallery-edit-container {
.tainacan-media-component {
@ -58,7 +59,9 @@
--tainacan-media-thumbs-carousel-item-size: 136px;
height: auto;
display: block;
display: flex;
flex-direction: column;
gap: 1rem;
background-color: var(--tainacan-media-background, transparent);
box-sizing: border-box;
@ -149,6 +152,7 @@
text-align: center;
font-size: 0.875em;
margin-bottom: 1em;
margin-top: 1rem;
&.hide-name .swiper-slide-metadata__name {
display: none;
@ -246,7 +250,7 @@
background: var(--tainacan-media-background, #ffffff);
border-radius: 3px;
word-wrap: break-word;
padding: 1rem 2rem;
padding: 0rem 2rem;
display: block;
}
audio {
@ -279,6 +283,17 @@
width: 100%;
max-width: var(--tainacan-media-thumbs-carousel-width, 100%);
&.swiper-is-beginning {
.swiper-start-border {
display: none;
}
}
&.swiper-is-end {
.swiper-end-border {
display: none;
}
}
ul.swiper-wrapper {
max-width: calc(100% - var(--swiper-navigation-size, 44px) - var(--swiper-navigation-size, 44px));
margin: 0 var(--swiper-navigation-size, 44px);

View File

@ -6,7 +6,7 @@ import PhotoSwipeLightbox from 'photoswipe/lightbox';
import PhotoSwipe from 'photoswipe';
import 'photoswipe/dist/photoswipe.css';
import Swiper from 'swiper';
import { Navigation, A11y, Thumbs } from 'swiper/modules';
import { Navigation, A11y, Thumbs, Pagination } from 'swiper/modules';
const { __ } = wp.i18n;
@ -54,6 +54,7 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
let thumbsSwiperOptions = {
spaceBetween: 12,
slidesPerView: 'auto',
watchSlidesProgress: true,
navigation: {
nextEl: '.swiper-navigation-next_' + this.thumbs_gallery_selector,
prevEl: '.swiper-navigation-prev_' + this.thumbs_gallery_selector,
@ -61,8 +62,8 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
pagination: {
el: '.swiper-pagination_' + this.thumbs_gallery_selector
},
// centeredSlides: true,
// centeredSlidesBounds: true,
centeredSlides: true,
centeredSlidesBounds: true,
centerInsufficientSlides: true,
slideToClickedSlide: true,
watchOverflow: true,
@ -72,7 +73,24 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
firstSlideMessage: __('This is the first slide', 'tainacan'),
lastSlideMessage: __('This is the last slide', 'tainacan')
},
modules: [Navigation, A11y]
modules: [Navigation, A11y, Pagination],
on: {
init: function(swiper) {
swiper.el.classList.add('swiper-is-beginning');
},
slideChange: function(swiper) {
if (swiper.isBeginning)
swiper.el.classList.add('swiper-is-beginning');
else
swiper.el.classList.remove('swiper-is-beginning');
if (swiper.isEnd)
swiper.el.classList.add('swiper-is-end');
else
swiper.el.classList.remove('swiper-is-end');
}
}
};
thumbsSwiperOptions = {...thumbsSwiperOptions, ...this.options.swiper_thumbs_options };
this.thumbsSwiper = new Swiper(this.thumbs_gallery_selector, thumbsSwiperOptions);
@ -89,7 +107,11 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
firstSlideMessage: __('This is the first slide', 'tainacan'),
lastSlideMessage: __('This is the last slide', 'tainacan')
},
modules: [Navigation, A11y]
pagination: {
el: '.swiper-pagination_' + this.main_gallery_selector,
clickable: true
},
modules: [Navigation, A11y, Pagination]
};
mainSwiperOptions = {...mainSwiperOptions, ...this.options.swiper_main_options };
@ -98,10 +120,20 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
swiper: this.thumbsSwiper,
autoScrollOffset: 3
}
mainSwiperOptions.modules = [Navigation, A11y, Thumbs];
mainSwiperOptions.modules = [Navigation, A11y, Thumbs, Pagination];
}
this.mainSwiper = new Swiper(this.main_gallery_selector, mainSwiperOptions);
if (this.thumbs_gallery_selector && this.thumbsSwiper && this.mainSwiper) {
const refToMainSwiper = this.mainSwiper;
const refToThumbSwiper = this.thumbsSwiper;
this.mainSwiper.on('slideChangeTransitionStart', function() {
refToThumbSwiper.slideTo(refToMainSwiper.activeIndex);
});
}
}
}

View File

@ -50,7 +50,7 @@ export default class ItemsModal extends React.Component {
if (this.props.existingCollectionId) {
this.fetchCollection(this.props.existingCollectionId);
this.setState({
searchURL: (this.props.existingSearchURL && this.props.existingSearchURL.indexOf('iframemode') < 0) ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?itemsMultipleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish' });
searchURL: (this.props.existingSearchURL && this.props.existingSearchURL.indexOf('iframemode') < 0) ? this.props.existingSearchURL : tainacan_blocks.admin_url + '?itemsMultipleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish' });
} else {
this.setState({ collectionPage: 1 });
this.fetchModalCollections();
@ -175,7 +175,7 @@ export default class ItemsModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_blocks.admin_url + 'admin.php?itemsMultipleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?itemsMultipleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
});
this.props.onSelectCollection(selectedCollectionId);

View File

@ -65,7 +65,7 @@ export default class SingleItemMetadataSectionModal extends React.Component {
if (this.props.existingCollectionId && !this.props.isTemplateMode) {
this.fetchCollection(this.props.existingCollectionId);
this.setState({
searchURL: tainacan_blocks.admin_url + 'admin.php?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
});
if (this.props.existingItemId) {
@ -155,7 +155,7 @@ export default class SingleItemMetadataSectionModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_blocks.admin_url + 'admin.php?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
});
this.props.onSelectCollection(selectedCollectionId);

View File

@ -66,7 +66,7 @@ export default class SingleItemModal extends React.Component {
if (this.props.existingCollectionId && !this.props.isTemplateMode) {
this.fetchCollection(this.props.existingCollectionId);
this.setState({
searchURL: tainacan_blocks.admin_url + 'admin.php?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
});
if (this.props.existingItemId) {
@ -155,7 +155,7 @@ export default class SingleItemModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_blocks.admin_url + 'admin.php?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
});
this.props.onSelectCollection(selectedCollectionId);

View File

@ -49,7 +49,7 @@ export default class SingleItemModal extends React.Component {
if (this.props.existingCollectionId) {
this.fetchCollection(this.props.existingCollectionId);
this.setState({
searchURL: tainacan_blocks.admin_url + 'admin.php?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?status=publish'
});
} else {
this.setState({ collectionPage: 1 });
@ -117,7 +117,7 @@ export default class SingleItemModal extends React.Component {
selectCollection(selectedCollectionId) {
this.setState({
collectionId: selectedCollectionId,
searchURL: tainacan_blocks.admin_url + 'admin.php?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
searchURL: tainacan_blocks.admin_url + '?itemsSingleSelectionMode=true&page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?status=publish'
});
this.props.onSelectCollection(selectedCollectionId);

View File

@ -60,7 +60,7 @@ Object.keys(POST_TYPES).forEach((postType) => {
title: postName,
icon: itemsIcon,
category: 'tainacan-blocks-variations',
description: __('Displays a list of Tainacan itens from a collection', 'tainacan'),
description: __('Displays a list of Tainacan items from a collection', 'tainacan'),
isActive: ( { namespace, query } ) => {
return (
namespace === VARIATION_NAME

View File

@ -298,7 +298,7 @@ export default {
startDate: 'getStartDate'
}),
collectionEditionPage() {
return (this.selectedCollection && this.selectedCollection != 'default') ? (tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/' + this.selectedCollection) : '';
return (this.selectedCollection && this.selectedCollection != 'default') ? (tainacan_plugin.admin_url + '?page=tainacan_admin#/collections/' + this.selectedCollection) : '';
},
isRepositoryLevel() {
return !this.selectedCollection || this.selectedCollection == 'default';