Skip to content

Commit

Permalink
Change generate icon. Include 'generated' field in preview.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcamilleri committed Apr 12, 2020
1 parent 4c70062 commit 28b52a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions routes/wordforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ router.post('/generate/:paradigm/:lexeme_id?',
})
} else {
// Just return forms
forms = forms.map(wf => {
wf['generated'] = true
return wf
})
res.json(forms)
}
})
Expand Down
2 changes: 1 addition & 1 deletion views/results.pug
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ block content
a.btn.btn-success.border-0.btn-sm(title="Add wordform",v-bind:href=`'${pageURL}/add/wordforms/' + item.lexeme._id`)
+icon('plus')
a.btn.btn-success.border-0.btn-sm.ml-1(title="Generate",v-bind:href=`'${pageURL}/generate/' + item.lexeme._id`)
+icon('list')
+icon('magic')
a.btn.btn-warning.border-0.btn-sm.ml-1(title="Bulk replace",v-bind:href=`'${pageURL}/replace/' + item.lexeme._id`)
+icon('retweet')
th(v-for="field,ix in item.wordformFields", v-bind:key="ix").text-nowrap
Expand Down

0 comments on commit 28b52a1

Please sign in to comment.