Skip to content

Commit 82e2d7d

Browse files
authored
Merge pull request #484 from citation-file-format/457-authors-screen-icons
Change layout of AuthorEdit and add SchemaGuideLinks
2 parents 75b8fa9 + c3dba8e commit 82e2d7d

2 files changed

Lines changed: 57 additions & 7 deletions

File tree

src/components/AuthorCardEditing.vue

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
bordered
55
class="bg-formcard q-pa-md"
66
>
7+
<div class="row">
8+
<q-label class="text-dark">
9+
The person's given names
10+
<SchemaGuideLink anchor="#definitionspersongiven-names" />
11+
</q-label>
12+
</div>
713
<div class="row">
814
<q-input
915
bg-color="white"
@@ -20,6 +26,11 @@
2026
ref="givenNamesRef"
2127
/>
2228
</div>
29+
<div class="row">
30+
<q-label class="text-dark">
31+
The person's last names, split into parts
32+
</q-label>
33+
</div>
2334
<div class="row">
2435
<q-input
2536
bg-color="white"
@@ -33,7 +44,12 @@
3344
v-bind:error="nameParticleError.hasError"
3445
v-bind:error-message="nameParticleError.messages.join(', ')"
3546
v-on:update:modelValue="$emit('update', 'nameParticle', $event)"
36-
/>
47+
>
48+
<SchemaGuideLink
49+
anchor="#definitionspersonname-particle"
50+
class="q-pt-sm"
51+
/>
52+
</q-input>
3753
<q-input
3854
bg-color="white"
3955
class="col"
@@ -46,7 +62,12 @@
4662
v-bind:error="familyNamesError.hasError"
4763
v-bind:error-message="familyNamesError.messages.join(', ')"
4864
v-on:update:modelValue="$emit('update', 'familyNames', $event)"
49-
/>
65+
>
66+
<SchemaGuideLink
67+
anchor="#definitionspersonfamily-names"
68+
class="q-pt-sm"
69+
/>
70+
</q-input>
5071
<q-input
5172
bg-color="white"
5273
class="col-3"
@@ -59,7 +80,18 @@
5980
v-bind:error="nameSuffixError.hasError"
6081
v-bind:error-message="nameSuffixError.messages.join(', ')"
6182
v-on:update:modelValue="$emit('update', 'nameSuffix', $event)"
62-
/>
83+
>
84+
<SchemaGuideLink
85+
anchor="#definitionspersonname-suffix"
86+
class="q-pt-sm"
87+
/>
88+
</q-input>
89+
</div>
90+
<div class="row">
91+
<q-label class="text-dark">
92+
The person's email address
93+
<SchemaGuideLink anchor="#definitionsperson-email" />
94+
</q-label>
6395
</div>
6496
<div class="row">
6597
<q-input
@@ -77,6 +109,16 @@
77109
v-on:update:modelValue="$emit('update', 'email', $event)"
78110
/>
79111
</div>
112+
<div class="row">
113+
<q-label class="text-dark col">
114+
The person's affiliation
115+
<SchemaGuideLink anchor="#definitionsperson-affiliation" />
116+
</q-label>
117+
<q-label class="text-dark col">
118+
The person's ORCID
119+
<SchemaGuideLink anchor="#definitionsperson-orcid" />
120+
</q-label>
121+
</div>
80122
<div class="row">
81123
<q-input
82124
bg-color="white"
@@ -158,6 +200,7 @@
158200
import { computed, defineComponent, onMounted, ref } from 'vue'
159201
import { getMyErrors } from 'src/store/validator'
160202
import { authorErrors } from 'src/author-errors'
203+
import SchemaGuideLink from './SchemaGuideLink.vue'
161204
162205
export default defineComponent({
163206
name: 'AuthorCardEditing',
@@ -214,10 +257,10 @@ export default defineComponent({
214257
affiliationError: computed(() => getMyErrors(`/authors/${props.index}/affiliation`)),
215258
orcidError: computed(() => getMyErrors(`/authors/${props.index}/orcid`)),
216259
authorErrors: computed(() => authorErrors(props.index))
217-
218260
}
219261
},
220-
emits: ['closePressed', 'removePressed', 'update', 'moveUp', 'moveDown']
262+
emits: ['closePressed', 'removePressed', 'update', 'moveUp', 'moveDown'],
263+
components: { SchemaGuideLink }
221264
})
222265
</script>
223266
<style scoped>

src/components/SchemaGuideLink.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<template>
2-
<a v-bind:href="'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md' + anchor">
3-
<q-icon name="ion-information-circle-outline" />
2+
<a
3+
v-bind:href="'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md' + anchor"
4+
tabindex="-1"
5+
>
6+
<q-icon
7+
name="ion-information-circle-outline"
8+
size="24px"
9+
color="primary"
10+
/>
411
<q-tooltip
512
anchor="center middle"
613
class="bg-primary text-body2 text-white"

0 commit comments

Comments
 (0)