diff --git a/src/admin/components/lists/events-list.vue b/src/admin/components/lists/activities-list.vue similarity index 65% rename from src/admin/components/lists/events-list.vue rename to src/admin/components/lists/activities-list.vue index 8f7ad2cb6..85b8eff64 100644 --- a/src/admin/components/lists/events-list.vue +++ b/src/admin/components/lists/activities-list.vue @@ -6,15 +6,15 @@ -
{{ $i18n.get('label_event_title') }}
+
{{ $i18n.get('label_activity_title') }}
{{ $i18n.get('label_created_by') }}
- + -
{{ $i18n.get('label_event_date') }}
+
{{ $i18n.get('label_activity_date') }}
@@ -25,72 +25,72 @@ + v-for="(activity, index) of activities"> + @click="goToActivityPage(activity.id)" + :label="$i18n.get('label_activity_title')" + :aria-label="$i18n.get('label_activity_title') + ': ' + activity.title">

{{ event.title }}

+ }">{{ activity.title }}

+ :aria-label="$i18n.get('label_created_by') + ': ' + activity.user_name">

+ v-html="activity.user_name" /> - + + @click="goToActivityPage(activity.id)" + :label="$i18n.get('label_activity_date')" + :aria-label="$i18n.get('label_activity_date') + ': ' + activity.log_date">

+ v-html="activity.log_date" /> - + - + - + - + - + - + - + @@ -99,13 +99,13 @@ -

+

-

{{ $i18n.get('info_no_events') }}

+

{{ $i18n.get('info_no_activities') }}

@@ -116,10 +116,10 @@ import ActivitiesIcon from '../other/activities-icon.vue'; export default { - name: 'EventsList', + name: 'ActivitiesList', data(){ return { - selectedEvents: [] + selectedActivities: [] } }, components: { @@ -127,27 +127,27 @@ }, props: { isLoading: false, - totalEvents: 0, + totalActivities: 0, page: 1, - eventsPerPage: 12, - events: Array + activitiesPerPage: 12, + activities: Array }, methods: { - // ...mapActions('event', [ + // ...mapActions('activity', [ // 'approve', // 'notApprove' // ]), - // approveEvent(eventId){ - // this.approve(eventId); + // approveActivity(activityId){ + // this.approve(activityId); // }, - // notApproveEvent(eventId){ - // this.notApprove(eventId); + // notApproveActivity(activityId){ + // this.notApprove(activityId); // }, - goToEventPage(eventId) { + goToActivityPage(activityId) { if (this.$route.params.collectionId == undefined) - this.$router.push(this.$routerHelper.getEventPath(eventId)); + this.$router.push(this.$routerHelper.getActivityPath(activityId)); else - this.$router.push(this.$routerHelper.getCollectionEventPath(this.$route.params.collectionId, eventId)); + this.$router.push(this.$routerHelper.getCollectionActivityPath(this.$route.params.collectionId, activityId)); } } } diff --git a/src/admin/components/navigation/primary-menu.vue b/src/admin/components/navigation/primary-menu.vue index df12dc220..ab8e18dbb 100644 --- a/src/admin/components/navigation/primary-menu.vue +++ b/src/admin/components/navigation/primary-menu.vue @@ -66,9 +66,9 @@
  • - {{ $i18n.get('events') }} + to="/activities" + :class="activeRoute == 'ActivitiesPage' ? 'is-active':''"> + {{ $i18n.get('activities') }}
  • diff --git a/src/admin/components/navigation/tainacan-collection-subheader.vue b/src/admin/components/navigation/tainacan-collection-subheader.vue index 47032944b..d95c0bd2f 100644 --- a/src/admin/components/navigation/tainacan-collection-subheader.vue +++ b/src/admin/components/navigation/tainacan-collection-subheader.vue @@ -122,18 +122,18 @@
  • + :to="{ path: $routerHelper.getCollectionActivitiesPath(id) }" + :aria-label="$i18n.get('label_collection_activities')"> - +
  • diff --git a/src/admin/components/other/event/diff-exhibition/event-split.vue b/src/admin/components/other/activity/diff-exhibition/activity-split.vue similarity index 95% rename from src/admin/components/other/event/diff-exhibition/event-split.vue rename to src/admin/components/other/activity/diff-exhibition/activity-split.vue index 153bbb435..c3960e7f8 100644 --- a/src/admin/components/other/event/diff-exhibition/event-split.vue +++ b/src/admin/components/other/activity/diff-exhibition/activity-split.vue @@ -5,9 +5,9 @@
    -

    {{ this.$i18n.get('info_logs_before') }}

    +

    {{ this.$i18n.get('info_logs_before') }}

    @@ -88,9 +88,9 @@
    -

    {{ this.$i18n.get('info_logs_after') }}

    +

    {{ this.$i18n.get('info_logs_after') }}

    @@ -175,9 +175,9 @@ @@ -187,7 +187,7 @@ overflow: auto; } - .event-titles { + .activity-titles { font-size: 20px; font-weight: 500; color: #01295c; diff --git a/src/admin/components/other/event/diff-exhibition/event-unified.vue b/src/admin/components/other/activity/diff-exhibition/activity-unified.vue similarity index 96% rename from src/admin/components/other/event/diff-exhibition/event-unified.vue rename to src/admin/components/other/activity/diff-exhibition/activity-unified.vue index 34cf51060..0b1d66106 100644 --- a/src/admin/components/other/event/diff-exhibition/event-unified.vue +++ b/src/admin/components/other/activity/diff-exhibition/activity-unified.vue @@ -6,9 +6,9 @@

    -

    {{ this.$i18n.get('info_changes') }}

    +

    {{ this.$i18n.get('info_changes') }}

    @@ -87,7 +87,7 @@

    @@ -173,9 +173,9 @@ @@ -185,7 +185,7 @@ overflow: auto; } - .event-titles { + .activity-titles { font-size: 20px; font-weight: 500; color: #01295c; diff --git a/src/admin/components/other/event/unique-exhibition/event-nodiff.vue b/src/admin/components/other/activity/unique-exhibition/activity-nodiff.vue similarity index 91% rename from src/admin/components/other/event/unique-exhibition/event-nodiff.vue rename to src/admin/components/other/activity/unique-exhibition/activity-nodiff.vue index bb605b6bc..4ec8e642e 100644 --- a/src/admin/components/other/event/unique-exhibition/event-nodiff.vue +++ b/src/admin/components/other/activity/unique-exhibition/activity-nodiff.vue @@ -2,14 +2,14 @@

    + v-if="activity.log_diffs.constructor === Object && + Object.keys(activity.log_diffs).length > 0 || + activity.log_diffs.length > 0">

    @@ -80,9 +80,9 @@ diff --git a/src/admin/js/router.js b/src/admin/js/router.js index 72df87d9a..d72bf4c63 100644 --- a/src/admin/js/router.js +++ b/src/admin/js/router.js @@ -10,8 +10,8 @@ import ItemPage from '../pages/singles/item-page.vue' import MetadataPage from '../pages/lists/metadata-page.vue' import FiltersPage from '../pages/lists/filters-page.vue' import Page from '../pages/lists/taxonomies-page.vue' -import EventsPage from '../pages/lists/events-page.vue' -import EventPage from '../pages/singles/event-page.vue' +import ActivitiesPage from '../pages/lists/activities-page.vue' +import ActivityPage from '../pages/singles/activity-page.vue' import ExportPage from '../pages/singles/export-page.vue' // Edition Form Components @@ -54,8 +54,8 @@ const routes = [ { path: 'settings', component: CollectionEditionForm, name: 'CollectionEditionForm', meta: {title: i18nGet('title_collection_settings'), icon: 'folder-multiple'} }, { path: 'metadata', component: MetadataList, name: 'MetadataList', meta: {title: i18nGet('title_collection_metadata_edition'), icon: 'folder-multiple'} }, { path: 'filters', component: FiltersList, name: 'FiltersList', meta: {title: i18nGet('title_collection_filters_edition'), icon: 'folder-multiple'} }, - { path: 'events', component: EventsPage, name: 'CollectionEventsPage', meta: {title: i18nGet('title_collection_events'), icon: 'flash'} }, - { path: 'events/:eventId', name: 'CollectionEventPage', component: EventPage, meta: {title: i18nGet('title_event_page'), icon: 'flash'} }, + { path: 'activities', component: ActivitiesPage, name: 'CollectionActivitiesPage', meta: {title: i18nGet('title_collection_activities'), icon: 'flash'} }, + { path: 'activities/:activityId', name: 'CollectionActivityPage', component: ActivityPage, meta: {title: i18nGet('title_activity_page'), icon: 'flash'} }, { path: 'sequence/:sequenceId', name: 'SavedSequenceEditionForm', component: ItemEditionForm, meta: {title: i18nGet('title_edit_item'), icon: 'folder-multiple'} }, { path: 'sequence/:sequenceId/:itemPosition', name: 'SequenceEditionForm', component: ItemEditionForm, meta: {title: i18nGet('title_edit_item'), icon: 'folder-multiple'} }, ] @@ -73,8 +73,8 @@ const routes = [ { path: '/taxonomies/:taxonomyId/edit', name: 'TaxonomyEditionForm', component: TaxonomyEditionForm, meta: {title: i18nGet('title_taxonomy_edition_page'), icon: 'shape'} }, { path: '/taxonomies/:taxonomyId', redirect: '/taxonomies/:taxonomyId/edit' }, - { path: '/events', name: 'EventsPage', component: EventsPage, meta: {title: i18nGet('title_repository_events_page'), icon: 'flash'} }, - { path: '/events/:eventId', name: 'EventPage', component: EventPage, meta: {title: i18nGet('title_event_page'), icon: 'flash'} }, + { path: '/activities', name: 'ActivitiesPage', component: ActivitiesPage, meta: {title: i18nGet('title_repository_activities_page'), icon: 'flash'} }, + { path: '/activities/:activityId', name: 'ActivityPage', component: ActivityPage, meta: {title: i18nGet('title_activity_page'), icon: 'flash'} }, { path: '/importers/', name: 'AvailableImportersPage', component: AvailableImportersPage, meta: {title: i18nGet('title_importers_page'), icon: 'import'} }, { path: '/importers/:importerSlug', name: 'ImporterEditionForm', component: ImporterEditionForm, meta: {title: i18nGet('title_importer_page'), icon: 'import'} }, diff --git a/src/admin/js/utilities.js b/src/admin/js/utilities.js index 9bc0307d3..df5a2f0d7 100644 --- a/src/admin/js/utilities.js +++ b/src/admin/js/utilities.js @@ -105,7 +105,7 @@ UserPrefsPlugin.install = function (Vue, options = {}) { 'items_per_page': 12, 'collections_per_page': 12, 'taxonomies_per_page': 12, - 'events_per_page': 12, + 'activities_per_page': 12, 'order': 'DESC', 'order_by': { slug: 'creation_date', @@ -184,8 +184,8 @@ RouterHelperPlugin.install = function (Vue, options = {}) { getCollectionFiltersPath(collectionId) { return '/collections/'+ collectionId + '/filters/'; }, - getCollectionEventsPath(collectionId) { - return '/collections/'+ collectionId + '/events/'; + getCollectionActivitiesPath(collectionId) { + return '/collections/'+ collectionId + '/activities/'; }, getItemsPath(query) { return '/items/?' + qs.stringify(query); @@ -202,17 +202,17 @@ RouterHelperPlugin.install = function (Vue, options = {}) { getMetadataPath(query) { return '/metadata/?' + qs.stringify(query); }, - getEventsPath(query) { - return '/events/?' + qs.stringify(query); + getActivitiesPath(query) { + return '/activities/?' + qs.stringify(query); }, getAvailableImportersPath() { return '/importers'; }, getProcessesPage(highlightedProcess) { if (highlightedProcess) - return '/events?tab=processes&highlight=' + highlightedProcess; + return '/activities?tab=processes&highlight=' + highlightedProcess; else - return '/events?tab=processes'; + return '/activities?tab=processes'; }, // Singles getCollectionPath(id) { @@ -230,14 +230,14 @@ RouterHelperPlugin.install = function (Vue, options = {}) { getTermPath(taxonomyId, termId) { return '/taxonomies/' + taxonomyId + '/terms/' + termId; }, - getEventPath(id) { - return '/events/' + id; + getActivityPath(id) { + return '/activities/' + id; }, getImporterPath(importerType, sessionId) { return '/importers/' + importerType + '/' + sessionId; }, - getCollectionEventPath(collectionId, eventId) { - return '/collections/' + collectionId + '/events/' + eventId; + getCollectionActivityPath(collectionId, activityId) { + return '/collections/' + collectionId + '/activities/' + activityId; }, // New getNewCollectionPath() { @@ -267,8 +267,8 @@ RouterHelperPlugin.install = function (Vue, options = {}) { getNewTermPath(taxonomyId) { return '/taxonomies/' + taxonomyId + '/terms/new'; }, - getNewEventPath() { - return '/events/new'; + getNewActivityPath() { + return '/activities/new'; }, getNewItemBulkAddPath(collectionId) { return '/collections/' + collectionId + '/bulk-add'; @@ -289,8 +289,8 @@ RouterHelperPlugin.install = function (Vue, options = {}) { getTermEditPath(taxonomyId, termId) { return '/taxonomies/' + taxonomyId + '/terms/' + termId + '/edit'; }, - getEventEditPath(id) { - return '/events/' + id + '/edit'; + getActivityEditPath(id) { + return '/activities/' + id + '/edit'; }, getImporterEditionPath(importerType) { return '/importers/' + importerType; diff --git a/src/admin/pages/lists/events-page.vue b/src/admin/pages/lists/activities-page.vue similarity index 74% rename from src/admin/pages/lists/events-page.vue rename to src/admin/pages/lists/activities-page.vue index 2114f36b2..5f718e933 100644 --- a/src/admin/pages/lists/events-page.vue +++ b/src/admin/pages/lists/activities-page.vue @@ -6,7 +6,7 @@ 'page-container': isRepositoryLevel }"> + :bread-crumb-items="[{ path: '', label: this.$i18n.get('activities') }]"/>

  • {{ $i18n.get('events') }}
  • + :class="{ 'is-active': tab == undefined || tab == ''}">{{ $i18n.get('activities') }}
  • {{ $i18n.get('processes') }}
  • @@ -26,13 +26,13 @@ :is-full-page="false" :active.sync="isLoading" :can-cancel="false"/> - + :total-activities="totalActivities" + :page="activitiesPage" + :activities-per-page="activitiesPerPage" + :activities="activities"/>
    + v-if="tab != 'processes' && totalActivities > 0">
    {{ - $i18n.get('info_showing_events') + - (eventsPerPage * (eventsPage - 1) + 1) + + $i18n.get('info_showing_activities') + + (activitiesPerPage * (activitiesPage - 1) + 1) + $i18n.get('info_to') + - getLastEventNumber() + - $i18n.get('info_of') + totalEvents + '.' + getLastActivityNumber() + + $i18n.get('info_of') + totalActivities + '.' }}
    + :label="$i18n.get('label_activities_per_page')"> + :value="activitiesPerPage" + @input="onChangeActivitiesPerPage" + :disabled="activities.length <= 0"> @@ -84,11 +84,11 @@