Add the most basic form of the Art Browser that just lets users see and filter the tokens
This commit is contained in:
parent
82ba07414c
commit
547816701d
9 changed files with 412 additions and 0 deletions
11
templates/ArtBrowser/image/grid.hbs
Normal file
11
templates/ArtBrowser/image/grid.hbs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<li class="image grid">
|
||||
<img
|
||||
src="{{tb-filePath image.path}}"
|
||||
alt=""
|
||||
>
|
||||
{{#if (eq selectMode "single")}}
|
||||
<button>Select</button>
|
||||
{{else if (eq selectMod "multi")}}
|
||||
<input type="checkbox">
|
||||
{{/if}}
|
||||
</li>
|
||||
29
templates/ArtBrowser/image/list.hbs
Normal file
29
templates/ArtBrowser/image/list.hbs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<li class="image">
|
||||
<img
|
||||
src="{{tb-filePath image.path}}"
|
||||
alt=""
|
||||
>
|
||||
{{#if (eq selectMode "single")}}
|
||||
<button>Select</button>
|
||||
{{else if (eq selectMod "multi")}}
|
||||
<input type="checkbox">
|
||||
{{/if}}
|
||||
<div class="details">
|
||||
<div>
|
||||
"<span>{{image.name}}</span>"
|
||||
{{#if image.artists}}
|
||||
by
|
||||
{{#each image.artists as | artist |}}
|
||||
<span data-artist-id="{{artist.id}}">{{artist.name}}{{ifThen @last "" ","}}</span>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if image.tags}}
|
||||
<ul class="chip-list">
|
||||
{{#each image.tags as | tag |}}
|
||||
<li>{{tag}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
</li>
|
||||
32
templates/ArtBrowser/images.hbs
Normal file
32
templates/ArtBrowser/images.hbs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<div class="paginated">
|
||||
<div class="row">
|
||||
<button data-action="uploadImage">Upload Image</button>
|
||||
</div>
|
||||
{{#if images}}
|
||||
<ul class="image-list image-list--{{listLayout}}">
|
||||
{{#each images as | image |}}
|
||||
{{> (tb-filePath "templates/ArtBrowser/image/grid.hbs") image=image selectMode=@root.selectMode }}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<span class="placeholder">
|
||||
{{ localize "" }}
|
||||
</span>
|
||||
{{/if}}
|
||||
<div class="grow"></div>
|
||||
<div class="row page-nav">
|
||||
<button
|
||||
data-action="prevPage"
|
||||
{{disabled (not has.prev)}}
|
||||
>
|
||||
Prev
|
||||
</button>
|
||||
{{page}} / {{pages}}
|
||||
<button
|
||||
data-action="nextPage"
|
||||
{{disabled (not has.next)}}
|
||||
>
|
||||
Next
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
34
templates/ArtBrowser/sidebar.hbs
Normal file
34
templates/ArtBrowser/sidebar.hbs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<form autocomplete="off" class="filters">
|
||||
<label for="{{meta.idp}}-name">
|
||||
Name
|
||||
</label>
|
||||
<input
|
||||
id="{{meta.idp}}-name"
|
||||
type="text"
|
||||
name="name"
|
||||
value="{{name}}"
|
||||
>
|
||||
|
||||
<hr>
|
||||
|
||||
<label for="{{meta.idp}}-tags">
|
||||
Tags
|
||||
</label>
|
||||
<string-tags
|
||||
id="{{meta.idp}}-tags"
|
||||
value="{{tags}}"
|
||||
name="tags"
|
||||
></string-tags>
|
||||
|
||||
<hr>
|
||||
|
||||
<label for="{{meta.idp}}-artists">
|
||||
Artists
|
||||
</label>
|
||||
<multi-select
|
||||
id="{{meta.idp}}-artists"
|
||||
name="artists"
|
||||
>
|
||||
{{ tb-options artists artistList }}
|
||||
</multi-select>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue