-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,141 additions
and
1,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
{{ define "definition" }} | ||
<section x-data="definitionComponent()" | ||
@open-definition-form.window="onOpen" | ||
@keyup.escape.window="onClose" | ||
@close-definition-form.window="onClose"> | ||
<template x-if="isVisible"> | ||
<div class="panel relation-form"> | ||
<h3>Add definition</h3> | ||
<form @submit.prevent="onSave"> | ||
<div x-text="parent.content"></div> | ||
<div>↓</div> | ||
<div> | ||
<label>Definition</label> | ||
<textarea required autofocus name="content" x-ref="content" x-model="def.content"></textarea> | ||
</div> | ||
<br /> | ||
<template x-if="Object.keys(config.languages[parent.lang].types).length > 0"> | ||
<fieldset class="row"> | ||
<div class="column four"> | ||
<label>Language</label> | ||
<select name="lang" x-model="def.lang"> | ||
<template x-for="[id, l] in Object.entries(config.languages)" :key="id"> | ||
<option :value="id" x-text="l.name"></option> | ||
</template> | ||
</select> | ||
</div> | ||
@open-definition-form.window="onOpen" | ||
@keyup.escape.window="onClose" | ||
@close-definition-form.window="onClose"> | ||
<template x-if="isVisible"> | ||
<div class="panel relation-form"> | ||
<h3>Add definition</h3> | ||
<form @submit.prevent="onSave"> | ||
<div x-text="parent.content"></div> | ||
<div>↓</div> | ||
<div> | ||
<label>Definition</label> | ||
<textarea required autofocus name="content" x-ref="content" x-model="def.content"></textarea> | ||
</div> | ||
<br /> | ||
<template x-if="Object.keys(config.languages[parent.lang].types).length > 0"> | ||
<fieldset class="row"> | ||
<div class="column four"> | ||
<label>Language</label> | ||
<select name="lang" x-model="def.lang"> | ||
<template x-for="[id, l] in Object.entries(config.languages)" :key="id"> | ||
<option :value="id" x-text="l.name"></option> | ||
</template> | ||
</select> | ||
</div> | ||
|
||
<div class="column four"> | ||
<label>Relation types</label> | ||
<select name="lang" x-model="def.types" multiple required> | ||
<template x-for="[id, typ] in Object.entries(config.languages[def.lang].types)" :key="id"> | ||
<option :value="id" x-text="typ"></option> | ||
</template> | ||
</select> | ||
<span class="help">Ctrl+click to select multiple values</span> | ||
</div> | ||
<div class="column four"> | ||
<label>Relation types</label> | ||
<select name="lang" x-model="def.types" multiple required> | ||
<template x-for="[id, typ] in Object.entries(config.languages[def.lang].types)" :key="id"> | ||
<option :value="id" x-text="typ"></option> | ||
</template> | ||
</select> | ||
<span class="help">Ctrl+click to select multiple values</span> | ||
</div> | ||
|
||
<div class="column four"> | ||
<label>Relation tags</label> | ||
<textarea name="tags" x-model="def.tags"></textarea> | ||
<span class="help">One per line</span> | ||
</div> | ||
</fieldset> | ||
</template> | ||
<div class="column four"> | ||
<label>Relation tags</label> | ||
<textarea name="tags" x-model="def.tags"></textarea> | ||
<span class="help">One per line</span> | ||
</div> | ||
</fieldset> | ||
</template> | ||
|
||
<fieldset> | ||
<label>Notes</label> | ||
<textarea name="notes" x-model="def.notes"></textarea> | ||
</fieldset> | ||
<fieldset> | ||
<label>Notes</label> | ||
<textarea name="notes" x-model="def.notes"></textarea> | ||
</fieldset> | ||
|
||
<fieldset class="buttons"> | ||
<button type="submit" class="button">Save</button> | ||
<button type="button" class="button button-outline" @click.prevent="onClose">Close</button> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</template> | ||
<fieldset class="buttons"> | ||
<button type="submit" class="button">Save</button> | ||
<button type="button" class="button button-outline" @click.prevent="onClose">Close</button> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</template> | ||
</section> | ||
{{ end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,117 @@ | ||
{{ define "entry" }} | ||
<section x-data="entryComponent()" | ||
@open-entry-form.window="onOpen" | ||
@keyup.escape.window="onClose" | ||
@close-entry-form.window="onClose"> | ||
<template x-if="isVisible"> | ||
<div class="panel entry-form"> | ||
<h3 x-text="isNew ? 'New entry' : 'Edit entry'"></h3> | ||
<form @submit.prevent="onSave"> | ||
<fieldset class="box"> | ||
<div class="row"> | ||
<div class="column nine"> | ||
<label>Content</label> | ||
<textarea required autofocus name="content" x-ref="content" x-model="entry.content"></textarea> | ||
</div> | ||
<div class="column three"> | ||
<label>Initial</label> | ||
<input required type="text" name="initial" x-model="entry.initial" @focus="onFocusInitial" /> | ||
<span class="help">First letter</span> | ||
</div> | ||
</div> | ||
<div> | ||
<label>Language</label> | ||
<select name="lang" x-model="entry.lang" required> | ||
<template x-for="[id, l] in Object.entries(config.languages)" :key="id"> | ||
<option :value="id" x-text="l.name" x-bind:selected="id === entry.lang"></option> | ||
</template> | ||
</select> | ||
</div> | ||
</fieldset> | ||
@open-entry-form.window="onOpen" | ||
@keyup.escape.window="onClose" | ||
@close-entry-form.window="onClose"> | ||
<template x-if="isVisible"> | ||
<div class="panel entry-form"> | ||
<h3 x-text="isNew ? 'New entry' : 'Edit entry'"></h3> | ||
<form @submit.prevent="onSave"> | ||
<fieldset class="box"> | ||
<div class="row"> | ||
<div class="column nine"> | ||
<label>Content</label> | ||
<textarea required autofocus name="content" x-ref="content" x-model="entry.content"></textarea> | ||
</div> | ||
<div class="column three"> | ||
<label>Initial</label> | ||
<input required type="text" name="initial" x-model="entry.initial" @focus="onFocusInitial" /> | ||
<span class="help">First letter</span> | ||
</div> | ||
</div> | ||
<div> | ||
<label>Language</label> | ||
<select name="lang" x-model="entry.lang" required> | ||
<template x-for="[id, l] in Object.entries(config.languages)" :key="id"> | ||
<option :value="id" x-text="l.name" x-bind:selected="id === entry.lang"></option> | ||
</template> | ||
</select> | ||
</div> | ||
</fieldset> | ||
|
||
<p> | ||
<a href="" @click.prevent="onToggleOptions"> | ||
<span x-text="!isFormOpen ? 'More options +' : 'Hide options -'"></span> | ||
</a> | ||
</p> | ||
<template x-if="isFormOpen"> | ||
<div class="box"> | ||
<fieldset class="row"> | ||
<div class="column six"> | ||
<label>Status</label> | ||
<select name="status" x-model="entry.status" required> | ||
<option value="enabled">Enabled</option> | ||
<option value="disabled">Disabled</option> | ||
</select> | ||
</div> | ||
<div class="column six"> | ||
<label>Weight</label> | ||
<input type="number" step="0.01" x-model="entry.weight" /> | ||
<span class="help">Sort order. Enter 0 to automatically set.</span> | ||
</div> | ||
</fieldset> | ||
<p> | ||
<a href="" @click.prevent="onToggleOptions"> | ||
<span x-text="!isFormOpen ? 'More options +' : 'Hide options -'"></span> | ||
</a> | ||
</p> | ||
<template x-if="isFormOpen"> | ||
<div class="box"> | ||
<fieldset class="row"> | ||
<div class="column six"> | ||
<label>Status</label> | ||
<select name="status" x-model="entry.status" required> | ||
<option value="enabled">Enabled</option> | ||
<option value="disabled">Disabled</option> | ||
</select> | ||
</div> | ||
<div class="column six"> | ||
<label>Weight</label> | ||
<input type="number" step="0.01" x-model="entry.weight" /> | ||
<span class="help">Sort order. Enter 0 to automatically set.</span> | ||
</div> | ||
</fieldset> | ||
|
||
<fieldset class="row"> | ||
<div class="column four"> | ||
<label>Phonetic notations</label> | ||
<textarea name="phones" x-model="entry.phones" cols="10"></textarea> | ||
<span class="help">One per line</span> | ||
</div> | ||
<div class="column four"> | ||
<label>Tags</label> | ||
<textarea name="tags" x-model="entry.tags"></textarea> | ||
<span class="help">One per line</span> | ||
</div> | ||
<div class="column four"> | ||
<label>Search tokens</label> | ||
<textarea name="tokens" x-model="entry.tokens"></textarea> | ||
<span class="help">TSVECTOR tokens. One per line. Leave empty to auto-generate.</span> | ||
</div> | ||
</fieldset> | ||
<fieldset class="row"> | ||
<div class="column four"> | ||
<label>Phonetic notations</label> | ||
<textarea name="phones" x-model="entry.phones" cols="10"></textarea> | ||
<span class="help">One per line</span> | ||
</div> | ||
<div class="column four"> | ||
<label>Tags</label> | ||
<textarea name="tags" x-model="entry.tags"></textarea> | ||
<span class="help">One per line</span> | ||
</div> | ||
<div class="column four"> | ||
<label>Search tokens</label> | ||
<textarea name="tokens" x-model="entry.tokens"></textarea> | ||
<span class="help">TSVECTOR tokens. One per line. Leave empty to auto-generate.</span> | ||
</div> | ||
</fieldset> | ||
|
||
<fieldset> | ||
<label>Notes</label> | ||
<textarea name="notes" x-model="entry.notes"></textarea> | ||
</fieldset> | ||
</div> | ||
</template> | ||
<br /> | ||
<fieldset class="buttons"> | ||
<button class="button button-outline float-right" @click.prevent="onDeleteEntry" | ||
x-bind:disabled="loading['entries.delete'] === true">Delete</button> | ||
<button type="submit" class="button" | ||
x-bind:disabled="loading['entries.update'] === true || loading['entries.create'] === true">Save</button> | ||
<button class="button button-outline" @click.prevent="onClose">Close</button> | ||
</fieldset> | ||
</form> | ||
<fieldset> | ||
<label>Notes</label> | ||
<textarea name="notes" x-model="entry.notes"></textarea> | ||
</fieldset> | ||
</div> | ||
</template> | ||
<br /> | ||
<fieldset class="buttons"> | ||
<button class="button button-outline float-right" @click.prevent="onDeleteEntry" | ||
x-bind:disabled="loading['entries.delete'] === true">Delete</button> | ||
<button type="submit" class="button" | ||
x-bind:disabled="loading['entries.update'] === true || loading['entries.create'] === true">Save</button> | ||
<button class="button button-outline" @click.prevent="onClose">Close</button> | ||
</fieldset> | ||
</form> | ||
|
||
<template x-if="!isNew"> | ||
<ul class="no meta"> | ||
<li><label>ID</label> <span x-text="entry.id"></span></li> | ||
<li><label>GUID</label> <span x-text="entry.guid"></span></li> | ||
<li><label>Created</label> <span x-text="entry.created_at.slice(0, 16).replace('T', ' ')"></span></li> | ||
<li><label>Updated</label> <span x-text="entry.updated_at.slice(0, 16).replace('T', ' ')"></span></li> | ||
</ul> | ||
</template> | ||
<template x-if="!isNew"> | ||
<ul class="no meta"> | ||
<li><label>ID</label> <span x-text="entry.id"></span></li> | ||
<li><label>GUID</label> <span x-text="entry.guid"></span></li> | ||
<li><label>Created</label> <span x-text="entry.created_at.slice(0, 16).replace('T', ' ')"></span></li> | ||
<li><label>Updated</label> <span x-text="entry.updated_at.slice(0, 16).replace('T', ' ')"></span></li> | ||
</ul> | ||
</template> | ||
|
||
<template x-if="!isNew && parentEntries.length > 0"> | ||
<div class="parents"> | ||
<h3>Parent entries (<span x-text="parentEntries.length"></span>)</h3> | ||
<ol class="relations"> | ||
<template x-for="r in parentEntries" :key="r.id"> | ||
<li class="rel"> | ||
<p> | ||
<a x-bind:href="makeURL({'id': r.id})" x-text="r.content" class="content"></a> | ||
<template x-if="r.phones.length > 0"> | ||
<span class="phones" x-text="r.phones.join(', ')"></span> | ||
</template> | ||
</p> | ||
</li> | ||
</template> | ||
</ol> | ||
</div> | ||
</template> | ||
</div> | ||
</template> | ||
<template x-if="!isNew && parentEntries.length > 0"> | ||
<div class="parents"> | ||
<h3>Parent entries (<span x-text="parentEntries.length"></span>)</h3> | ||
<ol class="relations"> | ||
<template x-for="r in parentEntries" :key="r.id"> | ||
<li class="rel"> | ||
<p> | ||
<a x-bind:href="makeURL({'id': r.id})" x-text="r.content" class="content"></a> | ||
<template x-if="r.phones.length > 0"> | ||
<span class="phones" x-text="r.phones.join(', ')"></span> | ||
</template> | ||
</p> | ||
</li> | ||
</template> | ||
</ol> | ||
</div> | ||
</template> | ||
</div> | ||
</template> | ||
</section> | ||
{{ end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.