-
- {{ form.nameOrId }}
-
+
({{ form.xmlFormId }})
|
@@ -89,6 +87,7 @@ import { DateTime } from 'luxon';
import DateTimeComponent from '../date-time.vue';
import EnketoFill from '../enketo/fill.vue';
import EnketoPreview from '../enketo/preview.vue';
+import FormLink from './link.vue';
import LinkIfCan from '../link-if-can.vue';
import useReviewState from '../../composables/review-state';
@@ -98,7 +97,13 @@ import { useRequestData } from '../../request-data';
export default {
name: 'FormRow',
- components: { DateTime: DateTimeComponent, EnketoFill, EnketoPreview, LinkIfCan },
+ components: {
+ DateTime: DateTimeComponent,
+ EnketoFill,
+ EnketoPreview,
+ FormLink,
+ LinkIfCan
+ },
props: {
form: {
type: Object,
@@ -111,11 +116,11 @@ export default {
},
setup() {
const { project, duplicateFormNames } = useRequestData();
- const { formPath, primaryFormPath } = useRoutes();
+ const { formPath } = useRoutes();
const { reviewStateIcon } = useReviewState();
return {
project, duplicateFormNames,
- formPath, primaryFormPath,
+ formPath,
reviewStateIcon
};
},
diff --git a/src/components/hover-card/form.vue b/src/components/hover-card/form.vue
new file mode 100644
index 000000000..aad6bfef4
--- /dev/null
+++ b/src/components/hover-card/form.vue
@@ -0,0 +1,45 @@
+
+
+
+ {{ form.name ?? form.xmlFormId }}
+ {{ $t('resource.form') }}
+
+
+ - {{ $t('common.version') }}
+
+
+ - {{ $t('resource.submissions') }}
+ - {{ $n(form.submissions) }}
+
+ - {{ $t('header.lastSubmission') }}
+
+
+
+
+
+
+
diff --git a/src/components/hover-cards.vue b/src/components/hover-cards.vue
index 1051dcf1d..d7875b7c2 100644
--- a/src/components/hover-cards.vue
+++ b/src/components/hover-cards.vue
@@ -25,12 +25,19 @@ import { inject, shallowRef, watch } from 'vue';
import HoverCardDataset from './hover-card/dataset.vue';
import HoverCardEntity from './hover-card/entity.vue';
+import HoverCardForm from './hover-card/form.vue';
import Popover from './popover.vue';
import { apiPaths } from '../util/request';
import { createResource } from '../request-data/resource';
const types = {
+ form: {
+ component: HoverCardForm,
+ requests: ({ projectId, xmlFormId }) => ({
+ form: { url: apiPaths.form(projectId, xmlFormId), extended: true }
+ })
+ },
dataset: {
component: HoverCardDataset,
requests: ({ projectId, name }) => ({
diff --git a/src/components/link-if-can.vue b/src/components/link-if-can.vue
index a341c5168..7e31da44f 100644
--- a/src/components/link-if-can.vue
+++ b/src/components/link-if-can.vue
@@ -10,15 +10,17 @@ including this file, may be copied, modified, propagated, or distributed
except according to the terms contained in the LICENSE file.
-->
-
+
-
+