Merge conflict fixes.

This commit is contained in:
Mateus Machado Luna 2019-11-08 17:21:25 -03:00
commit 3cbb293237
40 changed files with 424 additions and 322 deletions

View File

@ -491,7 +491,7 @@ export default {
.source-file-upload {
width: 100%;
display: grid;
@include display-grid;
}
.selected-source-file {

View File

@ -400,7 +400,7 @@ export default {
.source-file-upload {
width: 100%;
padding: 0.75rem $page-side-padding;
display: grid;
@include display-grid;
}
.document-list {
display: inline-block;

View File

@ -85,9 +85,10 @@
<b-autocomplete
:data="users"
:placeholder="$i18n.get('instruction_type_search_users_filter')"
:keep-first="keepFirst"
:open-on-focus="openOnFocus"
@typing="fetchUsersForFiltering"
keep-first
open-on-focus
@input="fetchUsersForFiltering"
@focus.once="($event) => fetchUsersForFiltering($event.target.value)"
@select="filterActivitiesByUser"
:loading="isFetchingUsers"
field="name"
@ -447,6 +448,7 @@
];
},
fetchUsersForFiltering: _.debounce(function (search) {
this.isFetchingUsers = true;
this.fetchUsers({ search: search })
@ -543,7 +545,7 @@
.button {
display: flex;
align-items: center;
border-radius: 0 !important;
border-radius: 0px !important;
height: 1.95rem !important;
}

View File

@ -20,6 +20,10 @@
cursor: default;
}
}
&>.control.has-icons-left .icon {
height: 2.125rem;
width: 2.125rem;
}
.dropdown-menu {
padding: 0px;
margin-top: 0;

View File

@ -150,11 +150,19 @@ $table-foot-cell-border-width: 1px 0 0 !important;
$table-cell-padding: 1.0em 0.75em;
// Roboto font
$family-sans-serif: 'Roboto', sans-serif;
$family-sans-serif: 'Roboto', 'Source Sans', 'Helvetica', sans-serif;
// Bulma's modal (needs to be greather than tainacan-admin-app)
$modal-z: 9999999;
// Grid mixin for display: grid compatibility
@mixin display-grid {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
}
// A copy of bootstrap's screen reader only class to be used for accessibility.
.sr-only {
position: absolute;

View File

@ -1,8 +1,8 @@
.tainacan-cards-container {
min-height: 50vh;
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
-ms-grid-columns: 455px 455px;
grid-template-columns: repeat(auto-fill, 455px);
grid-gap: 0px;
justify-content: space-evenly;
@ -11,6 +11,7 @@
@media screen and (max-width: 480px) {
width: 91.666666667%;
-ms-grid-columns: 100%;
grid-template-columns: repeat(auto-fill, 100%);
}

View File

@ -1,8 +1,7 @@
.tainacan-grid-container {
min-height: 50vh;
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
grid-template-columns: repeat(auto-fill, 285px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -8,4 +8,4 @@
@import "../../../node_modules/bulma/sass/elements/button.sass"
@import "../../../node_modules/bulma/sass/grid/columns.sass"
@import "../../../node_modules/bulma/sass/components/dropdown.sass"
@import "../../../node_modules/bulma/sass/components/modal.sass"
@import "../../../node_modules/bulma/sass/components/modal.sass"

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;
@ -171,8 +174,13 @@
.components-panel__body .collection-carousel-view-modes button.collection-carousel-view-mode-grid {
margin-right: 6px; }
.components-panel__body .collection-carousel-view-modes button.collection-carousel-view-mode-grid div {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 33% 33% 33%;
grid-template-columns: 33% 33% 33%;
-ms-grid-rows: 50% 50%;
grid-template-rows: 50% 50%;
grid-column-gap: 2px;
grid-row-gap: 2px;
@ -180,13 +188,17 @@
height: 40px;
margin: 4px auto 8px auto; }
.components-panel__body .collection-carousel-view-modes button.collection-carousel-view-mode-grid div > div:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
-ms-grid-column: 1;
-ms-grid-column-span: 2;
-ms-grid-row: 1;
-ms-grid-row-span: 2;
grid-column: 1/3;
grid-row: 1/3;
width: 41px;
height: 42px; }
.components-panel__body .collection-carousel-view-modes button.collection-carousel-view-mode-grid div > div {
flex-basis: 50%;
width: 20px;
height: 20px;
background: #555758;
@ -280,16 +292,23 @@
width: 100%;
display: block; }
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container .swiper-slide.collection-list-item-grid .collection-items-grid {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
width: 100%; }
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container .swiper-slide.collection-list-item-grid .collection-items-grid img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2; }
flex-basis: 100%;
-ms-grid-column: 1;
-ms-grid-column-span: 2;
-ms-grid-row: 1;
-ms-grid-row-span: 2;
grid-column: 1/3;
grid-row: 1/3; }
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container .swiper-slide.collection-list-item-grid .collection-items-grid img {
flex-basis: 50%;
width: 100%;
height: auto;
padding: 2px;
@ -389,15 +408,22 @@
background-color: white !important;
border: 1px solid #cbcbcb !important; }
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item .collection-items-grid {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%; }
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item .collection-items-grid img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2; }
flex-basis: 100%;
-ms-grid-column: 1;
-ms-grid-column-span: 2;
-ms-grid-row: 1;
-ms-grid-row-span: 2;
grid-column: 1/3;
grid-row: 1/3; }
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item .collection-items-grid img {
flex-basis: 50%;
padding: 2px;
margin-bottom: 0px; }
@media only screen and (max-width: 1686px) {

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;
@ -171,8 +174,13 @@
.components-panel__body .term-carousel-view-modes button.term-carousel-view-mode-grid {
margin-right: 6px; }
.components-panel__body .term-carousel-view-modes button.term-carousel-view-mode-grid div {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 33% 33% 33%;
grid-template-columns: 33% 33% 33%;
-ms-grid-rows: 50% 50%;
grid-template-rows: 50% 50%;
grid-column-gap: 2px;
grid-row-gap: 2px;
@ -180,13 +188,17 @@
height: 40px;
margin: 4px auto 8px auto; }
.components-panel__body .term-carousel-view-modes button.term-carousel-view-mode-grid div > div:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
-ms-grid-column: 1;
-ms-grid-column-span: 2;
-ms-grid-row: 1;
-ms-grid-row-span: 2;
grid-column: 1/3;
grid-row: 1/3;
width: 41px;
height: 42px; }
.components-panel__body .term-carousel-view-modes button.term-carousel-view-mode-grid div > div {
flex-basis: 50%;
width: 20px;
height: 20px;
background: #555758;
@ -280,16 +292,23 @@
width: 100%;
display: block; }
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container .swiper-slide.term-list-item-grid .term-items-grid {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
width: 100%; }
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container .swiper-slide.term-list-item-grid .term-items-grid img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2; }
flex-basis: 100%;
-ms-grid-column: 1;
-ms-grid-column-span: 2;
-ms-grid-row: 1;
-ms-grid-row-span: 2;
grid-column: 1/3;
grid-row: 1/3; }
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper-container .swiper-slide.term-list-item-grid .term-items-grid img {
flex-basis: 50%;
width: 100%;
height: auto;
padding: 2px;
@ -389,15 +408,22 @@
background-color: white !important;
border: 1px solid #cbcbcb !important; }
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item .term-items-grid {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%; }
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item .term-items-grid img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2; }
flex-basis: 100%;
-ms-grid-column: 1;
-ms-grid-column-span: 2;
-ms-grid-row: 1;
-ms-grid-row-span: 2;
grid-column: 1/3;
grid-row: 1/3; }
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item .term-items-grid img {
flex-basis: 50%;
padding: 2px;
margin-bottom: 0px; }
@media only screen and (max-width: 1686px) {

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;
@ -178,8 +181,11 @@
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid,
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;
@ -382,8 +385,11 @@
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid,
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;
@ -337,8 +340,11 @@
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-grid,
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-grid {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;
@ -178,8 +181,11 @@
.wp-block-tainacan-items-list ul.items-list.items-layout-grid,
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;

File diff suppressed because one or more lines are too long

View File

@ -95,8 +95,11 @@
.wp-block-tainacan-modal .modal-checkbox-list,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;
@ -163,8 +166,11 @@
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid,
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid {
padding: 0;
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -1,6 +1,6 @@
{
"version": 3,
"mappings": "AAEA,kCAAmC;EAC/B,KAAK,EAAE,iBAAiB;;AAE5B,cAAe;EACX,OAAO,EAAE,IAAI;EACb,cAAc,EAAE,GA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;MAG3B,0CAA2C;QAvC/C;4FAAkB;UAwCV,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA5C9C;4FAAkB;UA6CV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QAjD9C;4FAAkB;UAkDV,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB",
"sources": ["../../gutenberg-blocks/gutenberg-blocks-style.scss","../../gutenberg-blocks/tainacan-terms/terms-list/terms-list.scss"],
"names": [],
"file": "tainacan-gutenberg-block-terms-list.css"

View File

@ -41,6 +41,22 @@
}
}
// Grid mixin for display: grid compatibility
@mixin display-grid {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
}
@mixin grid-child ($col-start, $col-end, $row-start, $row-end) {
-ms-grid-column: $col-start;
-ms-grid-column-span: $col-end - $col-start;
-ms-grid-row: $row-start;
-ms-grid-row-span: $row-end - $row-start;
grid-column: #{$col-start}/#{$col-end};
grid-row: #{$row-start}/#{$row-end};
}
// Generic style for selection modals ---------------------------
.wp-block-tainacan-modal {
width: 50%;
@ -125,8 +141,8 @@
.modal-checkbox-list,
.modal-radio-list .components-base-control__field {
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
-ms-grid-columns: 250px 250px;
grid-template-columns: repeat(auto-fill, 250px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -18,8 +18,10 @@
&.collection-carousel-view-mode-grid {
margin-right: 6px;
div {
display: grid;
@include display-grid;
-ms-grid-columns: 33% 33% 33%;
grid-template-columns: 33% 33% 33%;
-ms-grid-rows: 50% 50%;
grid-template-rows: 50% 50%;
grid-column-gap: 2px;
grid-row-gap: 2px;
@ -28,15 +30,14 @@
margin: 4px auto 8px auto;
&>div:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
@include grid-child(1, 3, 1, 3);
width: 41px;
height: 42px;
}
&>div {
&>div {
flex-basis: 50%;
width: 20px;
height: 20px;
background: #555758;
@ -158,19 +159,18 @@
display: block;
}
.collection-items-grid {
display: grid;
@include display-grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
width: 100%;
img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
@include grid-child(1, 3, 1, 3);
}
img {
img {
flex-basis: 50%;
width: 100%;
height: auto;
padding: 2px;
@ -303,18 +303,17 @@
.collection-items-grid {
display: grid;
@include display-grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
@include grid-child(1, 3, 1, 3);
}
img {
img {
flex-basis: 50%;
padding: 2px;
margin-bottom: 0px;
}

View File

@ -31,8 +31,8 @@
ul.collections-list.collections-layout-grid,
ul.collections-list-edit.collections-layout-grid {
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -219,8 +219,8 @@
ul.facets-list.facets-layout-grid,
ul.facets-list-edit.facets-layout-grid {
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -275,8 +275,8 @@
ul.items-list.items-layout-grid,
ul.items-list-edit.items-layout-grid {
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -31,8 +31,8 @@
ul.items-list.items-layout-grid,
ul.items-list-edit.items-layout-grid {
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -18,8 +18,10 @@
&.term-carousel-view-mode-grid {
margin-right: 6px;
div {
display: grid;
@include display-grid;
-ms-grid-columns: 33% 33% 33%;
grid-template-columns: 33% 33% 33%;
-ms-grid-rows: 50% 50%;
grid-template-rows: 50% 50%;
grid-column-gap: 2px;
grid-row-gap: 2px;
@ -28,15 +30,14 @@
margin: 4px auto 8px auto;
&>div:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
@include grid-child(1, 3, 1, 3);
width: 41px;
height: 42px;
}
&>div {
&>div {
flex-basis: 50%;
width: 20px;
height: 20px;
background: #555758;
@ -158,19 +159,18 @@
display: block;
}
.term-items-grid {
display: grid;
@include display-grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
width: 100%;
img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
@include grid-child(1, 3, 1, 3);
}
img {
flex-basis: 50%;
width: 100%;
height: auto;
padding: 2px;
@ -303,18 +303,17 @@
.term-items-grid {
display: grid;
@include display-grid;
grid-template-columns: 33% 33% 33%;
grid-template-rows: 50% 50%;
img:first-of-type {
grid-column-start: 1;
grid-column-end: span 2;
grid-row-start: 1;
grid-row-end: span 2;
flex-basis: 100%;
@include grid-child(1, 3, 1, 3);
}
img {
img {
flex-basis: 50%;
padding: 2px;
margin-bottom: 0px;
}

View File

@ -227,7 +227,6 @@ registerBlockType('tainacan/carousel-terms-list', {
} else {
let promises = [];
for (let term of response.data) {
console.log(term)
promises.push(
tainacan.get('/items/?perpage=3&fetch_only=name,url,thumbnail&taxquery[0][taxonomy]=tnc_tax_' + taxonomyId + '&taxquery[0][terms][0]=' + term.id + '&taxquery[0][compare]=IN')
.then(response => { return({ term: term, termItems: response.data.items }) })

View File

@ -13,8 +13,8 @@
ul.terms-list.terms-layout-grid,
ul.terms-list-edit.terms-layout-grid {
padding: 0;
display: -ms-grid;
display: grid;
@include display-grid;
-ms-grid-columns: 220px 220px 220px 220px 220px;
grid-template-columns: repeat(auto-fill, 220px);
grid-gap: 0px;
justify-content: space-evenly;

View File

@ -84,7 +84,7 @@ class CSV extends Importer {
}
/**
*
*
* returns all header including special
*/
public function raw_source_metadata() {
@ -103,9 +103,12 @@ class CSV extends Importer {
*/
public function process_item( $index, $collection_definition ) {
$processedItem = [];
$headers = $this->raw_source_metadata();
$headers = $this->raw_source_metadata();
$this->add_log('Proccessing item index ' . $index . ' in collection ' . $collection_definition['id'] );
$item_line = (int) $index + 2;
$this->add_log( 'Processing item on line ' . $item_line );
$this->add_log( 'Target collection: ' . $collection_definition['id'] );
if (($handle = fopen($this->tmp_file, "r")) !== false) {
$file = $handle;
@ -146,10 +149,8 @@ class CSV extends Importer {
return false;
}
$this->add_log('item index ' . $this->get_option('item_id_index') );
if( is_numeric($this->get_option('item_id_index')) ) {
$this->handle_item_id( $values );
$this->add_log('Updating item' );
}
foreach ( $collection_definition['mapping'] as $metadatum_id => $header) {
$column = null;
@ -165,7 +166,7 @@ class CSV extends Importer {
$valueToInsert = $this->handle_encoding( $values[ $column ] );
$metadatum = new \Tainacan\Entities\Metadatum($metadatum_id);
$processedItem[ $header ] = ( $metadatum->is_multiple() ) ?
$processedItem[ $header ] = ( $metadatum->is_multiple() ) ?
explode( $this->get_option('multivalued_delimiter'), $valueToInsert) : $valueToInsert;
}
@ -174,7 +175,7 @@ class CSV extends Importer {
if( !empty( $this->get_option('item_status_index') ) ) $processedItem['special_item_status'] = '';
if( !empty( $this->get_option('item_comment_status_index') ) ) $processedItem['special_comment_status'] = '';
$this->add_log('Success to proccess index: ' . $index );
$this->add_log('Success processing index: ' . $index );
return $processedItem;
}
@ -188,7 +189,7 @@ class CSV extends Importer {
$column_item_comment_status = $this->get_option('item_comment_status_index');
if( !empty($column_document) || !empty( $column_attachment ) || !empty( $column_item_status ) ){
if (($handle = fopen($this->tmp_file, "r")) !== false) {
$file = $handle;
} else {
@ -238,7 +239,7 @@ class CSV extends Importer {
return false;
}
public function options_form() {
ob_start();
?>
@ -257,13 +258,13 @@ class CSV extends Importer {
<div class="help-tooltip-body">
<p><?php _e('The character used to separate each column in your CSV (e.g. , or ;)', 'tainacan'); ?></p>
</div>
</div>
</div>
</span>
<div class="control is-clearfix">
<input class="input" type="text" name="delimiter" value="<?php echo esc_attr($this->get_option('delimiter')); ?>">
</div>
</div>
<div class="field">
<label class="label"><?php _e('Multivalued metadata delimiter', 'tainacan'); ?></label>
<span class="help-wrapper">
@ -279,13 +280,13 @@ class CSV extends Importer {
<div class="help-tooltip-body">
<p><?php _e('The character used to separate each value inside a cell with multiple values (e.g. ||). Note that the target metadatum must accept multiple values.', 'tainacan'); ?></p>
</div>
</div>
</div>
</span>
<div class="control is-clearfix">
<input class="input" type="text" name="multivalued_delimiter" value="<?php echo $this->get_option('multivalued_delimiter'); ?>">
</div>
</div>
<div class="field">
<label class="label"><?php _e('Enclosure', 'tainacan'); ?></label>
<span class="help-wrapper">
@ -301,13 +302,13 @@ class CSV extends Importer {
<div class="help-tooltip-body">
<p><?php _e('The character that wraps the content of each cell in your CSV. (e.g. ")', 'tainacan'); ?></p>
</div>
</div>
</div>
</span>
<div class="control is-clearfix">
<input class="input" type="text" name="enclosure" value="<?php echo $this->get_option('enclosure'); ?>">
</div>
</div>
<div class="field">
<label class="label"><?php _e('File Encoding', 'tainacan'); ?></label>
<span class="help-wrapper">
@ -323,7 +324,7 @@ class CSV extends Importer {
<div class="help-tooltip-body">
<p><?php _e('The encoding of the CSV file.', 'tainacan'); ?></p>
</div>
</div>
</div>
</span>
<div class="control is-clearfix">
<div class="select">
@ -350,7 +351,7 @@ class CSV extends Importer {
<div class="help-tooltip-body">
<p><?php _e('Choose the action when a repeated item is found', 'tainacan'); ?></p>
</div>
</div>
</div>
</span>
<div class="control is-clearfix">
<div class="select">
@ -361,7 +362,7 @@ class CSV extends Importer {
</div>
</div>
</div>
<div class="field">
<label class="label"><?php _e('Importing attachments', 'tainacan'); ?></label>
<p>
@ -386,16 +387,16 @@ class CSV extends Importer {
<div class="help-tooltip-body">
<p><?php _e("When using CSV special field to add documents or attachments that you've uploaded to the server, inform the full path to the folder here (e.g. /home/user/files/)", 'tainacan'); ?></p>
</div>
</div>
</div>
</span>
<div class="control is-clearfix">
<input class="input" type="text" name="server_path" value="<?php echo $this->get_option('server_path'); ?>">
</div>
</div>
<?php
<?php
return ob_get_clean();
}
@ -433,7 +434,7 @@ class CSV extends Importer {
$correct_value = trim(substr($column_value, 5));
$item_inserted->set_document( $correct_value );
$item_inserted->set_document_type( 'text' );
if( $item_inserted->validate() ) {
$item_inserted = $this->items_repo->update($item_inserted);
}
@ -523,7 +524,7 @@ class CSV extends Importer {
private function handle_enclosure( &$file ) {
$line = trim(fgets($file));
$start = substr($line, 0, strlen($this->get_option('enclosure')));
$start = substr($line, 0, strlen($this->get_option('enclosure')));
if( $this->get_option('enclosure') === $start ) {
$cut_start = strlen($this->get_option('enclosure'));
@ -586,7 +587,7 @@ class CSV extends Importer {
* @param array $processed_item Associative array with metadatum source's as index with
* its value or values
* @param integet $collection_index The index in the $this->collections array of the collection the item is beeing inserted into
*
*
* @return Tainacan\Entities\Item Item inserted
*/
public function insert( $processed_item, $collection_index ) {
@ -607,31 +608,32 @@ class CSV extends Importer {
// $Tainacan_Items->disable_logs();
// $Tainacan_Metadata->disable_logs();
// $Tainacan_Item_Metadata->disable_logs();
$itemMetadataArray = [];
$updating_item = false;
if ( is_numeric($this->get_transient('item_id')) ) {
$item = $Tainacan_Items->fetch( (int) $this->get_transient('item_id') );
} else {
$item = new Entities\Item();
}
if( is_numeric($this->get_transient('item_id')) ) {
if ( $item->get_id() == $this->get_transient('item_id') ) {
if ( $item instanceof Entities\Item && $item->get_id() == $this->get_transient('item_id') ) {
$this->add_log('item will be updated ID:' . $item->get_id() );
$updating_item = true;
// When creating a new item, disable log for each metadata to speed things up
$Tainacan_Item_Metadata->disable_logs();
} else {
$this->add_log('item with ID ' . $item->get_id() . ' not found. Unable to update. Creating a new one.' );
$this->add_log('item with ID ' . $this->get_transient('item_id') . ' not found. Unable to update. Creating a new one.' );
$item = new Entities\Item();
}
}
if( $this->get_transient('item_id') && $item && is_numeric($item->get_id()) && $item->get_id() > 0 && $this->get_transient('item_action') == 'ignore' ){
$this->add_log('Repeated Item');
if( $this->get_transient('item_id') && $item instanceof Entities\Item && is_numeric($item->get_id()) && $item->get_id() > 0 && $this->get_transient('item_action') == 'ignore' ){
$this->add_log('Ignoring repeated Item');
return $item;
}
@ -711,7 +713,7 @@ class CSV extends Importer {
if ( ! $updating_item ) {
$insertedItem->set_status('publish' );
}
if($insertedItem->validate()) {
$insertedItem = $Tainacan_Items->update( $insertedItem );
$this->after_inserted_item( $insertedItem, $collection_index );
@ -743,7 +745,7 @@ class CSV extends Importer {
/**
* @param $metadatum the metadata
* @param $values the categories names
*
*
* @return array empty with no category or array with IDs
*/
private function insert_hierarchy( $metadatum, $values ){
@ -751,16 +753,16 @@ class CSV extends Importer {
if (empty($values)) {
return false;
}
$Tainacan_Terms = \Tainacan\Repositories\Terms::get_instance();
$taxonomy = new Entities\Taxonomy( $metadatum->get_metadata_type_options()['taxonomy_id']);
if ( strpos($values, '>>') === false ) {
return $values;
}
$exploded_values = explode(">>",$values);
if (empty($exploded_values)) {
return false;
}
@ -790,7 +792,7 @@ class CSV extends Importer {
$this->add_error_log( implode(',', $term->get_errors()) );
return false;
}
}
}
return $parent !== 0 ? (int)$parent : false;

View File

@ -10,29 +10,29 @@ abstract class Importer {
*
* When creating a new importer session via API, an id is returned and used to access this
* importer instance. This is temporarily stored in the database and discarded after the bg process is triggered
*
*
* @var identifier
*/
private $id;
/**
* The path to the temporary file created when user uploads a file
* @var string
*/
protected $tmp_file;
/**
* This array holds the structure that the default step 'process_collections' will handle.
*
* Its an array of the target collections, with their IDs, an identifier from the source, the total number of items to be imported, the mapping array
* Its an array of the target collections, with their IDs, an identifier from the source, the total number of items to be imported, the mapping array
* from the source structure to the ID of the metadata metadata in tainacan
*
* The format of the map is an array where the keys are the metadata IDs of the destination collection and the
* The format of the map is an array where the keys are the metadata IDs of the destination collection and the
* values are the identifier from the source. This could be an ID or a string or whatever the importer finds appropriate to handle
*
* The source_id can be anyhting you like, that helps you relate this collection to your source.
*
*
* Example of the structure of this propery for one collection:
* 0 => [
* 'id' => 12,
@ -46,38 +46,38 @@ abstract class Importer {
*
* use add_collection() and remove_collection() to interact with thiis array.
*
*
*
* @var array
*/
protected $collections = [];
/**
* Stores the options for the importer. Each importer might use this property to save
* their own specific option
* @var array
*/
private $options = [];
/**
* Stores the default options for the importer options
* @var array
*/
protected $default_options = [];
private $accepts = [
'file' => true,
'url' => false,
];
/**
* Declares what are the steps the importer will run, in the right order.
*
* By default, there is only one step, and the callback is the process_collections method
* By default, there is only one step, and the callback is the process_collections method
* that process items for the collections in the collections array.
*
* Child classes may declare as many steps as they want and can keep this default step to use
* Child classes may declare as many steps as they want and can keep this default step to use
* this method for import the items. But it is optional.
*
*
* @var array
*/
protected $steps = [
@ -87,41 +87,41 @@ abstract class Importer {
'callback' => 'process_collections'
]
];
/**
* Transients is used to store temporary data to be used accross multiple requests
*
* Add and remove transient data using add_transient() and delete_transient() methods
*
* Transitens can be strings, numbers or arrays. Avoid storing objects.
*
*
* @var array
*/
private $transients = [];
private $current_step = 0;
private $in_step_count = 0;
private $current_collection = 0;
private $current_collection_item = 0;
private $url = '';
private $log = [];
private $error_log = [];
/**
* Wether to abort importer execution.
* @var bool
*/
private $abort = false;
/**
* List of attributes that are saved in DB and that are used to
* reconstruct the object
* List of attributes that are saved in DB and that are used to
* reconstruct the object
* @var array
*/
private $array_attributes = [
@ -153,10 +153,10 @@ abstract class Importer {
}
}
}
}
public function _to_Array($short = false) {
$return = ['id' => $this->get_id()];
foreach ($this->array_attributes as $attr) {
@ -177,10 +177,10 @@ abstract class Importer {
return $return;
}
/////////////////////
// Getters and setters
/**
* @return string
*/
@ -220,51 +220,51 @@ abstract class Importer {
public function get_current_step() {
return $this->current_step;
}
public function set_current_step($value) {
$this->current_step = $value;
}
public function get_in_step_count() {
return $this->in_step_count;
}
public function set_in_step_count($value) {
$this->in_step_count = $value;
}
public function get_current_collection() {
return $this->current_collection;
}
public function set_current_collection($value) {
$this->current_collection = $value;
}
public function get_current_collection_item() {
return $this->current_collection_item;
}
public function set_current_collection_item($value) {
$this->current_collection_item = $value;
}
public function get_tmp_file(){
return $this->tmp_file;
}
public function set_tmp_file($filepath){
$this->tmp_file = $filepath;
}
public function get_collections() {
return $this->collections;
}
public function set_collections($value) {
$this->collections = $value;
}
/**
* Gets the options for this importer, including default values for options
* that were not set yet.
@ -273,55 +273,55 @@ abstract class Importer {
public function get_options() {
return array_merge($this->default_options, $this->options);
}
/**
* Set the options array
* @param array $options
* @param array $options
*/
public function set_options($options) {
$this->options = $options;
}
/**
* Set the default options values.
*
* Must be called from the __construct method of the child importer class to set default values.
*
* @param array $options
*
* @param array $options
*/
protected function set_default_options($options) {
$this->default_options = $options;
}
public function set_steps($steps) {
$this->steps = $steps;
}
public function get_steps() {
return $this->steps;
}
private function get_transients() {
return $this->transients;
}
private function set_transients(array $data) {
$this->transients = $data;
}
public function get_log() {
return $this->log;
}
public function get_error_log() {
return $this->error_log;
}
////////////////////////////////////
// Utilities
/**
* @param $file File to be managed by importer
@ -336,8 +336,8 @@ abstract class Importer {
return false;
}
}
/**
* log the actions from importer
*
@ -350,14 +350,14 @@ abstract class Importer {
public function add_error_log($message ){
$this->error_log[] = $message;
}
public function add_collection(array $collection) {
if (isset($collection['id'])) {
$this->remove_collection($collection['id']);
$this->collections[] = $collection;
}
}
public function remove_collection($col_id) {
foreach ($this->get_collections() as $index => $col) {
if ($col['id'] == $col_id) {
@ -378,7 +378,7 @@ abstract class Importer {
//$file_array['name'] = $name;
//$file_array['tmp_name'] = $path_file;
//$file_array['size'] = filesize( $path_file );
if ( !function_exists('media_handle_upload') ) {
require_once(ABSPATH . "wp-admin" . '/includes/image.php');
require_once(ABSPATH . "wp-admin" . '/includes/file.php');
@ -403,12 +403,12 @@ abstract class Importer {
return $this->add_file( $this->get_id().'.txt' );
}
}
/**
* Gets one option from the options array.
*
* Checks if option exist or if it have a default value. Otherwise return an empty string
*
*
* @param string $key the desired option
* @return mixed the option value, the default value or an empty string
*/
@ -416,12 +416,12 @@ abstract class Importer {
$options = $this->get_options();
return isset($options[$key]) ? $options[$key] : '';
}
/**
* Adds a new method accepeted by the importer
*
* Current possible methods are file and url
*
*
* @param string $method file or url
* @return bool true for success, false if method does not exist
*/
@ -437,7 +437,7 @@ abstract class Importer {
* Removes method accepeted by the importer
*
* Current possible methods are file and url
*
*
* @param string $method file or url
* @return bool true for success, false if method does not exist
*/
@ -448,16 +448,16 @@ abstract class Importer {
}
return false;
}
public function add_transient($key, $data) {
$this->transients[$key] = $data;
}
public function delete_transient($key) {
if (isset($this->transients[$key]))
unset($this->transients[$key]);
}
public function get_transient($key) {
if (isset($this->transients[$key]))
return $this->transients[$key];
@ -473,7 +473,7 @@ abstract class Importer {
return false;
}
/**
* Cancel Scheduled abortion at the end of run()
* @return void
@ -481,7 +481,7 @@ abstract class Importer {
protected function cancel_abort() {
$this->abort = false;
}
/**
* Schedule importer abortion at the end of run()
* @return void
@ -489,10 +489,10 @@ abstract class Importer {
protected function abort() {
$this->abort = true;
}
/**
* Return wether importer should abort execution or not
* @return bool
* @return bool
*/
public function get_abort() {
return $this->abort;
@ -501,11 +501,11 @@ abstract class Importer {
/**
* Gets the current label to be displayed below the progress bar to give
* feedback to the user.
*
*
* It automatically gets the attribute progress_label from the current step running.
*
*
* Importers may change this label whenever they want
*
*
* @return string
*/
public function get_progress_label() {
@ -537,17 +537,17 @@ abstract class Importer {
/**
* Gets the current value to build the progress bar and give feedback to the user
* on the background process that is running the importer.
*
*
* It does so by comparing the "size" attribute with the $in_step_count class attribute
* where size indicates the total size of iterations the step will take and $this->in_step_count
* where size indicates the total size of iterations the step will take and $this->in_step_count
* is the current iteration.
*
*
* For the step with "process_items" as a callback, this method will look for the the $this->collections array
* and sum the value of all "total_items" attributes of each collection. Then it will look for
* and sum the value of all "total_items" attributes of each collection. Then it will look for
* $this->get_current_collection and $this->set_current_collection_item to calculate the progress.
*
*
* The value must be from 0 to 100
*
*
* If a negative value is passed, it is assumed that the progress is unknown
*/
public function get_progress_value() {
@ -595,12 +595,12 @@ abstract class Importer {
/**
* Sets the total attribute for the current step
*
*
* The "total" attribute of a step indicates the number of iterations this step will take to complete.
*
*
* The iteration is counted using $this->in_step_count attribute, and comparing the two values gives us
* the current progress of the process.
*
*
*/
protected function set_current_step_total($value) {
$this->set_step_total($this->get_current_step(), $value);
@ -608,12 +608,12 @@ abstract class Importer {
/**
* Sets the total attribute for a given step
*
*
* The "total" attribute of a step indicates the number of iterations this step will take to complete.
*
*
* The iteration is counted using $this->in_step_count attribute, and comparing the two values gives us
* the current progress of the process.
*
*
*/
protected function set_step_total($step, $value) {
$steps = $this->get_steps();
@ -626,7 +626,7 @@ abstract class Importer {
///////////////////////////////
// Abstract methods
/**
* get the metadata of file/url to allow mapping
@ -637,7 +637,7 @@ abstract class Importer {
* @return array $metadata_source the metadata from the source
*/
public function get_source_metadata() {}
/**
* get values for a single item
*
@ -649,13 +649,13 @@ abstract class Importer {
*/
abstract public function process_item( $index, $collection_id );
/**
* Method implemented by the child importer class to return the total number of items that will be imported
*
* Used to build the progress bar
*
*
* @return int
*/
public function get_source_number_of_items() {}
@ -665,37 +665,37 @@ abstract class Importer {
* Method implemented by child importer to return the HTML of the Options Form to be rendered in the Importer page
*/
public function options_form() {}
/**
* Called when the process is finished. returns the final message to the user with a
* Called when the process is finished. returns the final message to the user with a
* short description of what happened. May contain HTML code and links
*
* @return string
* @return string
*/
public function get_output() {
return '';
}
////////////////////////////////////////
// Core methods
/**
* process an item from the collections queue
*
*/
public function process_collections() {
$current_collection = $this->get_current_collection();
$collections = $this->get_collections();
$collection_definition = isset($collections[$current_collection]) ? $collections[$current_collection] : false;
$current_collection_item = $this->get_current_collection_item();
$this->add_log('Processing item ' . $current_collection_item);
$processed_item = $this->process_item( $current_collection_item, $collection_definition );
if( $processed_item ) {
if( is_bool($processed_item) ){
return $this->next_item();
return $this->next_item();
}
$this->add_log('Inserting item ' . $current_collection_item);
@ -703,66 +703,66 @@ abstract class Importer {
} else {
$this->add_error_log('failed on item '. $current_collection_item );
}
return $this->next_item();
}
protected function next_item() {
$current_collection = $this->get_current_collection();
$current_collection_item = $this->get_current_collection_item();
$collections = $this->get_collections();
$collection = $collections[$current_collection];
$current_collection_item ++;
$this->set_current_collection_item($current_collection_item);
if( $this->get_transient('change_total') ){
$collection['total_items'] = $this->get_transient('change_total');
}
if ($current_collection_item >= $collection['total_items']) {
return $this->next_collection();
}
return $current_collection_item;
}
protected function next_collection() {
$current_collection = $this->get_current_collection();
$collections = $this->get_collections();
$this->set_current_collection_item(0);
$current_collection ++;
if (isset($collections[$current_collection])) {
$this->set_current_collection($current_collection);
return $current_collection;
}
}
return false;
}
protected function next_step() {
$current_step = $this->get_current_step();
$steps = $this->get_steps();
$current_step ++;
$this->set_current_step($current_step);
if (isset($steps[$current_step])) {
return $current_step;
}
}
return false;
}
/**
@ -771,11 +771,11 @@ abstract class Importer {
* @param array $processed_item Associative array with metadatum source's as index with
* its value or values
* @param integet $collection_index The index in the $this->collections array of the collection the item is beeing inserted into
*
*
* @return Tainacan\Entities\Item Item inserted
*/
public function insert( $processed_item, $collection_index ) {
remove_action( 'post_updated', 'wp_save_post_revision' );
$collections = $this->get_collections();
$collection_definition = isset($collections[$collection_index]) ? $collections[$collection_index] : false;
@ -783,20 +783,20 @@ abstract class Importer {
$this->add_error_log('Collection misconfigured');
return false;
}
$collection = \Tainacan\Repositories\Collections::get_instance()->fetch($collection_definition['id']);
$Tainacan_Metadata = \Tainacan\Repositories\Metadata::get_instance();
$Tainacan_Item_Metadata = \Tainacan\Repositories\Item_Metadata::get_instance();
$Tainacan_Items = \Tainacan\Repositories\Items::get_instance();
$Tainacan_Items->disable_logs();
$Tainacan_Metadata->disable_logs();
$Tainacan_Item_Metadata->disable_logs();
$item = new Entities\Item( ( $this->get_transient('item_id') ) ? $this->get_transient('item_id') : 0 );
$itemMetadataArray = [];
if( is_array( $processed_item ) ){
foreach ( $processed_item as $metadatum_source => $values ){
$tainacan_metadatum_id = array_search( $metadatum_source, $collection_definition['mapping'] );
@ -812,7 +812,7 @@ abstract class Importer {
}
}
if( !empty( $itemMetadataArray ) && $collection instanceof Entities\Collection ){
$item->set_collection( $collection );
@ -823,7 +823,7 @@ abstract class Importer {
$this->add_error_log( $item->get_errors() );
return false;
}
foreach ( $itemMetadataArray as $itemMetadata ) {
$itemMetadata->set_item( $insertedItem ); // *I told you
@ -843,33 +843,33 @@ abstract class Importer {
// $this->add_error_log( 'Item ' . $insertedItem->get_id() . ' has an error' );
//}
}
$insertedItem->set_status('publish' );
if($insertedItem->validate()) {
$insertedItem = $Tainacan_Items->update( $insertedItem );
$this->after_inserted_item( $insertedItem, $collection_index );
} else {
$this->add_error_log( 'Error publishing Item' );
$this->add_error_log( $insertedItem->get_errors() );
$this->add_error_log( 'Error publishing Item' );
$this->add_error_log( $insertedItem->get_errors() );
return false;
}
return $insertedItem;
} else {
$this->add_error_log( 'Collection not set');
return false;
}
}
/**
* allow importers executes process after item is insertes
* @param array $insertedItem Associative array with inserted item
* @param integer $collection_index The index in the $this->collections array of the collection the item is beeing inserted into
*
*
*/
public function after_inserted_item($insertedItem, $collection_index){}
@ -881,13 +881,15 @@ abstract class Importer {
if ($this->is_finished()) {
return false;
}
$steps = $this->get_steps();
$current_step = $this->get_current_step();
$method_name = $steps[$current_step]['callback'];
if (method_exists($this, $method_name)) {
$author = $this->get_transient('author');
$this->add_log('---------------------------');
$this->add_log('Starting processing new item');
$this->add_log('User in process: ' . $author);
wp_set_current_user($author);
$result = $this->$method_name();
@ -903,10 +905,10 @@ abstract class Importer {
$this->set_in_step_count($result);
$return = $result;
}
return $return;
}
/**
@ -929,16 +931,16 @@ abstract class Importer {
$name = $properties[0];
$type = $properties[1];
$supported_types = \Tainacan\Repositories\Metadata::get_instance()->fetch_metadata_types('NAME');
$supported_types = array_map('strtolower', $supported_types);
if ( ! \in_array($type, $supported_types) ) {
// translators: Warning on import logs. Invalid metadata type passed, using text type as fallback. 1 is the invalid type; 2 the name of the metadata. Ex: Unknown Metadata type "Hexadecimal" for Color. Considering text type.
$this->add_log( sprintf(__('Unknown Metadata type "%1$s" for %2$s. Considering text type.', 'tainacan'), $type, $name) );
$type = 'text';
}
$newMetadatum = new Entities\Metadatum();
$newMetadatum->set_name($name);
@ -1005,4 +1007,4 @@ abstract class Importer {
return false;
}
}
}
}

View File

@ -21,18 +21,8 @@ export const fetchActivities = ({ commit }, { page, activitiesPerPage, search, s
endpoint += '&' + qs.stringify(dateQuery);
}
if (authorId != undefined && authorId != null) {
let metaQuery = {
metaquery: [
{
value: authorId,
key: 'user_id',
compare: '='
}
]
};
endpoint += '&' + qs.stringify(metaQuery);
}
if (authorId != undefined && authorId != null)
endpoint += '&authorid=' + authorId;
return new Promise((resolve, reject) => {
axios.tainacan.get(endpoint)
@ -70,18 +60,8 @@ export const fetchCollectionActivities = ({ commit }, { page, activitiesPerPage,
endpoint += '&' + qs.stringify(dateQuery);
}
if (authorId != undefined && authorId != null) {
let metaQuery = {
metaquery: [
{
value: authorId,
key: 'user_id',
compare: '='
}
]
};
endpoint += '&' + qs.stringify(metaQuery);
}
if (authorId != undefined && authorId != null)
endpoint += '&authorid=' + authorId;
return new Promise((resolve, reject) => {
axios.tainacan.get(endpoint)
@ -106,18 +86,8 @@ export const fetchItemActivities = ({ commit }, { page, activitiesPerPage, itemI
if (search != undefined && search != '')
endpoint += `&search=${search}`;
if (authorId != undefined && authorId != null) {
let metaQuery = {
metaquery: [
{
value: authorId,
key: 'user_id',
compare: '='
}
]
};
endpoint += '&' + qs.stringify(metaQuery);
}
if (authorId != undefined && authorId != null)
endpoint += '&authorid=' + authorId;
if (searchDates && searchDates[0] != null && searchDates[1] != null) {
let dateQuery = {

View File

@ -419,6 +419,11 @@ class Migrations {
}
static function update_repository_rename_document_index_meta_key() {
global $wpdb;
$wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = 'document_content_index' WHERE meta_key = '_document_content_index'");
}
}

View File

@ -156,6 +156,14 @@ export default {
$gray4: #555758;
$gray5: #454647;
// Grid mixin for display: grid compatibility
@mixin display-grid {
flex-wrap: wrap;
display: flex;
display: -ms-grid;
display: grid;
}
@import "../../src/admin/scss/_view-mode-cards.scss";
.tainacan-cards-container .tainacan-card .metadata-title {