|
7 | 7 | <div class="row"> |
8 | 8 | <h3 class="subquestion"> |
9 | 9 | The person's given names |
10 | | - <SchemaGuideLink anchor="#definitionspersongiven-names" /> |
| 10 | + <q-icon |
| 11 | + name="ion-information-circle-outline" |
| 12 | + size="24px" |
| 13 | + color="primary" |
| 14 | + v-on:click="showHelpDialogName = true" |
| 15 | + style="cursor:pointer;" |
| 16 | + /> |
11 | 17 | </h3> |
12 | 18 | </div> |
13 | 19 | <div class="row"> |
|
29 | 35 | <div class="row"> |
30 | 36 | <h3 class="subquestion"> |
31 | 37 | The person's last names, split into parts |
| 38 | + <q-icon |
| 39 | + name="ion-information-circle-outline" |
| 40 | + size="24px" |
| 41 | + color="primary" |
| 42 | + v-on:click="showHelpDialogLastName = true" |
| 43 | + style="cursor:pointer;" |
| 44 | + /> |
32 | 45 | </h3> |
33 | 46 | </div> |
34 | 47 | <div class="row"> |
|
44 | 57 | v-bind:error="false" |
45 | 58 | v-bind:error-message="''" |
46 | 59 | v-on:update:modelValue="$emit('update', 'nameParticle', $event)" |
47 | | - > |
48 | | - <SchemaGuideLink |
49 | | - anchor="#definitionspersonname-particle" |
50 | | - class="q-pt-sm" |
51 | | - /> |
52 | | - </q-input> |
| 60 | + /> |
53 | 61 | <q-input |
54 | 62 | bg-color="white" |
55 | 63 | class="col" |
|
62 | 70 | v-bind:error="false" |
63 | 71 | v-bind:error-message="''" |
64 | 72 | v-on:update:modelValue="$emit('update', 'familyNames', $event)" |
65 | | - > |
66 | | - <SchemaGuideLink |
67 | | - anchor="#definitionspersonfamily-names" |
68 | | - class="q-pt-sm" |
69 | | - /> |
70 | | - </q-input> |
| 73 | + /> |
71 | 74 | <q-input |
72 | 75 | bg-color="white" |
73 | 76 | class="col-3" |
|
80 | 83 | v-bind:error="false" |
81 | 84 | v-bind:error-message="''" |
82 | 85 | v-on:update:modelValue="$emit('update', 'nameSuffix', $event)" |
83 | | - > |
84 | | - <SchemaGuideLink |
85 | | - anchor="#definitionspersonname-suffix" |
86 | | - class="q-pt-sm" |
87 | | - /> |
88 | | - </q-input> |
| 86 | + /> |
89 | 87 | </div> |
90 | 88 | <div class="row"> |
91 | 89 | <h3 class="subquestion"> |
92 | 90 | The person's email address |
93 | | - <SchemaGuideLink anchor="#definitionspersonemail" /> |
| 91 | + <q-icon |
| 92 | + name="ion-information-circle-outline" |
| 93 | + size="24px" |
| 94 | + color="primary" |
| 95 | + v-on:click="showHelpDialogEmail = true" |
| 96 | + style="cursor:pointer;" |
| 97 | + /> |
94 | 98 | </h3> |
95 | 99 | </div> |
96 | 100 | <div class="row"> |
|
113 | 117 | <div class="row"> |
114 | 118 | <h3 class="subquestion col"> |
115 | 119 | The person's affiliation |
116 | | - <SchemaGuideLink anchor="#definitionspersonaffiliation" /> |
| 120 | + <q-icon |
| 121 | + name="ion-information-circle-outline" |
| 122 | + size="24px" |
| 123 | + color="primary" |
| 124 | + v-on:click="showHelpDialogAffiliation = true" |
| 125 | + style="cursor:pointer;" |
| 126 | + /> |
117 | 127 | </h3> |
118 | 128 | <h3 class="subquestion col"> |
119 | 129 | The person's ORCID |
120 | | - <SchemaGuideLink anchor="#definitionspersonorcid" /> |
| 130 | + <q-icon |
| 131 | + name="ion-information-circle-outline" |
| 132 | + size="24px" |
| 133 | + color="primary" |
| 134 | + v-on:click="showHelpDialogOrcid = true" |
| 135 | + style="cursor:pointer;" |
| 136 | + /> |
121 | 137 | </h3> |
122 | 138 | </div> |
123 | 139 | <div class="row"> |
|
139 | 155 | class="col" |
140 | 156 | dense |
141 | 157 | hint="Format: https://orcid.org/0000-0000-0000-0000" |
| 158 | + label="orcid" |
142 | 159 | mask="https://orcid.org/####-####-####-###X" |
143 | 160 | outlined |
144 | 161 | standout |
|
168 | 185 | /> |
169 | 186 | </q-card-actions> |
170 | 187 | </q-card> |
| 188 | + <InfoDialog |
| 189 | + v-model="showHelpDialogName" |
| 190 | + v-bind:data="helpData.name" |
| 191 | + /> |
| 192 | + <InfoDialog |
| 193 | + v-model="showHelpDialogLastName" |
| 194 | + v-bind:data="helpData.lastName" |
| 195 | + /> |
| 196 | + <InfoDialog |
| 197 | + v-model="showHelpDialogEmail" |
| 198 | + v-bind:data="helpData.email" |
| 199 | + /> |
| 200 | + <InfoDialog |
| 201 | + v-model="showHelpDialogAffiliation" |
| 202 | + v-bind:data="helpData.affiliation" |
| 203 | + /> |
| 204 | + <InfoDialog |
| 205 | + v-model="showHelpDialogOrcid" |
| 206 | + v-bind:data="helpData.orcid" |
| 207 | + /> |
171 | 208 | </template> |
172 | 209 |
|
173 | 210 | <script lang="ts"> |
174 | 211 | import { byError, emailQueries, orcidQueries } from 'src/error-filtering' |
175 | | -import { computed, defineComponent, onUpdated } from 'vue' |
176 | | -import SchemaGuideLink from 'src/components/SchemaGuideLink.vue' |
| 212 | +import { computed, defineComponent, onUpdated, ref } from 'vue' |
| 213 | +import InfoDialog from 'components/InfoDialog.vue' |
177 | 214 | import { useStepperErrors } from 'src/store/stepper-errors' |
178 | 215 | import { useValidation } from 'src/store/validation' |
179 | 216 |
|
180 | 217 | export default defineComponent({ |
181 | 218 | name: 'AuthorCardEditing', |
| 219 | + components: { |
| 220 | + InfoDialog |
| 221 | + }, |
182 | 222 | props: { |
183 | 223 | index: { |
184 | 224 | type: Number, |
@@ -229,13 +269,101 @@ export default defineComponent({ |
229 | 269 | .filter(byError(errors.value)) |
230 | 270 | .map(query => query.replace.message) |
231 | 271 | }) |
| 272 | + const helpData = { |
| 273 | + name: { |
| 274 | + title: 'given-names', |
| 275 | + url: [ |
| 276 | + { |
| 277 | + text: 'Click here to see the documentation for name.', |
| 278 | + link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#definitionspersongiven-names' |
| 279 | + } |
| 280 | + ], |
| 281 | + description: 'The person\'s given names.', |
| 282 | + examples: [ |
| 283 | + 'Jane', |
| 284 | + 'John' |
| 285 | + ] |
| 286 | + }, |
| 287 | + lastName: { |
| 288 | + title: 'name-particle, family-names, name-suffix', |
| 289 | + url: [ |
| 290 | + { |
| 291 | + text: 'Click here to see the documentation for name particle.', |
| 292 | + link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#definitionspersonname-particle' |
| 293 | + }, |
| 294 | + { |
| 295 | + text: 'Click here to see the documentation for family name.', |
| 296 | + link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#definitionspersonfamily-names' |
| 297 | + }, |
| 298 | + { |
| 299 | + text: 'Click here to see the documentation for name suffix.', |
| 300 | + link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#definitionspersonname-suffix' |
| 301 | + } |
| 302 | + ], |
| 303 | + description: 'The person\'s last names, split into parts.', |
| 304 | + examples: [ |
| 305 | + 'name particle: von', |
| 306 | + 'family name: Doe', |
| 307 | + 'name suffix: Jr.' |
| 308 | + ] |
| 309 | + }, |
| 310 | + email: { |
| 311 | + title: 'email', |
| 312 | + url: [ |
| 313 | + { |
| 314 | + text: 'Click here to see the documentation for email.', |
| 315 | + link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#definitionspersonemail' |
| 316 | + } |
| 317 | + ], |
| 318 | + description: 'The person\'s email address.', |
| 319 | + examples: [ |
| 320 | + 'mail@research-project.org' |
| 321 | + ] |
| 322 | + }, |
| 323 | + affiliation: { |
| 324 | + title: 'affiliation', |
| 325 | + url: [ |
| 326 | + { |
| 327 | + text: 'Click here to see the documentation for affiliation.', |
| 328 | + link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#definitionspersonaffiliation' |
| 329 | + } |
| 330 | + ], |
| 331 | + description: 'The person\'s affiliation.', |
| 332 | + examples: [ |
| 333 | + 'Netherlands eScience Center', |
| 334 | + 'German Aerospace Center (DLR)' |
| 335 | + ] |
| 336 | + }, |
| 337 | + orcid: { |
| 338 | + title: 'orcid', |
| 339 | + url: [ |
| 340 | + { |
| 341 | + text: 'Click here to see the documentation for orcid.', |
| 342 | + link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#definitionspersonorcid' |
| 343 | + }, |
| 344 | + { |
| 345 | + text: 'https://orcid.org', |
| 346 | + link: 'https://orcid.org' |
| 347 | + } |
| 348 | + ], |
| 349 | + description: 'The person\'s ORCID identifier.', |
| 350 | + examples: [ |
| 351 | + 'https://orcid.org/0000-0003-4925-7248' |
| 352 | + ] |
| 353 | + } |
| 354 | + } |
232 | 355 | return { |
233 | 356 | emailErrors, |
234 | | - orcidErrors |
| 357 | + helpData, |
| 358 | + orcidErrors, |
| 359 | + showHelpDialogLastName: ref(false), |
| 360 | + showHelpDialogName: ref(false), |
| 361 | + showHelpDialogEmail: ref(false), |
| 362 | + showHelpDialogAffiliation: ref(false), |
| 363 | + showHelpDialogOrcid: ref(false) |
235 | 364 | } |
236 | 365 | }, |
237 | | - emits: ['closePressed', 'removePressed', 'update'], |
238 | | - components: { SchemaGuideLink } |
| 366 | + emits: ['closePressed', 'removePressed', 'update'] |
239 | 367 | }) |
240 | 368 | </script> |
241 | 369 | <style scoped> |
|
0 commit comments