diff --git a/src/admin/admin.vue b/src/admin/admin.vue
index ca8034f6a..cceda24f5 100644
--- a/src/admin/admin.vue
+++ b/src/admin/admin.vue
@@ -73,7 +73,7 @@
}
.is-main-content {
- padding: 0px;
+ padding: 0px !important;
margin: 0 auto;
position: relative;
overflow-y: auto;
@@ -89,8 +89,8 @@
}
.is-secondary-content {
- padding: 0px;
- margin: 94px auto 0 auto;
+ padding: 0px !important;
+ margin: 106px auto 0 auto;
position: relative;
overflow-y: hidden;
height: calc(100% - 94px);
diff --git a/src/admin/js/theme-main.js b/src/admin/js/theme-main.js
index 48152e17d..0c03e8ad9 100644
--- a/src/admin/js/theme-main.js
+++ b/src/admin/js/theme-main.js
@@ -31,6 +31,7 @@ import FilterTaxonomySelectbox from '../../classes/filter-types/taxonomy/Selectb
import TaincanFormItem from '../../classes/metadata-types/tainacan-form-item.vue';
import TaincanFiltersList from '../../classes/filter-types/tainacan-filter-item.vue';
import ItemsPage from '../pages/lists/items-page.vue';
+import TermItemsPage from '../pages/lists/term-items-page.vue';
import ViewModeTable from '../../theme-helper/view-mode-table.vue';
import ViewModeCards from '../../theme-helper/view-mode-cards.vue';
import ViewModeRecords from '../../theme-helper/view-mode-records.vue';
@@ -83,6 +84,7 @@ Vue.component('tainacan-filter-taxonomy-selectbox', FilterTaxonomySelectbox);
Vue.component('help-button', HelpButton);
Vue.component('draggable', draggable);
Vue.component('items-page', ItemsPage);
+Vue.component('term-items-page', TermItemsPage);
// Oficial view modes
Vue.component('view-mode-table', ViewModeTable);
@@ -95,11 +97,13 @@ Vue.use(eventBusSearch, { store: store, router: routerTheme});
// THEME ITEMS LIST (COLLECTIONS)
import ThemeItemsList from '../theme-items-list.vue';
-new Vue({
+export const ThemeItemsListing = new Vue({
el: '#tainacan-items-page',
store,
router: routerTheme,
data: {
+ termId: '',
+ taxonomy: '',
collectionId: '',
defaultViewMode: '',
enabledViewModes: {}
@@ -114,32 +118,10 @@ new Vue({
if (this.$el.attributes['enabled-view-modes'] != undefined)
this.enabledViewModes = this.$el.attributes['enabled-view-modes'].value.split(',');
- }
-
-});
-
-// THEME ITEMS LIST (TERMS)
-import ThemeTermItemsList from '../theme-term-items-list.vue';
-
-new Vue({
- el: '#tainacan-term-items-page',
- store,
- router: routerTheme,
- data: {
- termId: '',
- defaultViewMode: '',
- enabledViewModes: {}
- },
- render: h => h(ThemeTermItemsList),
- beforeMount () {
-
if (this.$el.attributes['term-id'] != undefined)
this.termId = this.$el.attributes['term-id'].value;
- if (this.$el.attributes['default-view-mode'] != undefined)
- this.defaultViewMode = this.$el.attributes['default-view-mode'].value;
- if (this.$el.attributes['enabled-view-modes'] != undefined)
- this.enabledViewModes = this.$el.attributes['enabled-view-modes'].value.split(',');
-
+ if (this.$el.attributes['taxonomy'] != undefined)
+ this.taxonomy = this.$el.attributes['taxonomy'].value;
}
});
\ No newline at end of file
diff --git a/src/admin/pages/lists/term-items-page.vue b/src/admin/pages/lists/term-items-page.vue
index c02487843..9abc81d17 100644
--- a/src/admin/pages/lists/term-items-page.vue
+++ b/src/admin/pages/lists/term-items-page.vue
@@ -680,8 +680,9 @@
}
},
props: {
- collectionId: Number,
+ // collectionId: Number,
termId: Number,
+ taxonomy: String,
defaultViewMode: String, // Used only on theme
enabledViewModes: Object // Used only on theme
},
@@ -1031,12 +1032,13 @@
}
},
created() {
-
+
this.isOnTheme = (this.$route.name === null);
this.isRepositoryLevel = (this.collectionId === undefined);
- this.$eventBusSearch.setCollectionId(this.collectionId);
+ // this.$eventBusSearch.setCollectionId(this.collectionId);
+ this.$eventBusSearch.setTerm(this.termId, this.taxonomy);
this.$eventBusSearch.updateStoreFromURL();
this.$eventBusSearch.$on('isLoadingItems', isLoadingItems => {
diff --git a/src/admin/scss/_tabs.scss b/src/admin/scss/_tabs.scss
index 2f2d74cdd..5894a1c6e 100644
--- a/src/admin/scss/_tabs.scss
+++ b/src/admin/scss/_tabs.scss
@@ -2,7 +2,7 @@
.tabs {
a {
font-size: 13px;
- margin-bottom: -3px;
+ margin-bottom: -3px !important;
&:hover{
border-bottom-color: transparent;
text-decoration: none;
diff --git a/src/admin/theme-items-list.vue b/src/admin/theme-items-list.vue
index 9701bbb12..233172b5d 100644
--- a/src/admin/theme-items-list.vue
+++ b/src/admin/theme-items-list.vue
@@ -1,9 +1,19 @@
+