1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 20:15:26 +02:00

Break out document tag and category mng sections

Separate out screens for tag and category management.
This commit is contained in:
McMatts 2018-12-20 14:31:59 +00:00
parent 3c81297fc6
commit e140caff55
9 changed files with 315 additions and 105 deletions

View file

@ -0,0 +1,19 @@
{{layout/logo-heading
title="Categories"
desc="Assign one or more categories to help organize content within this space"
icon=constants.Icon.Category}}
{{ui/ui-list-picker items=categories nameField="category" singleSelect=false}}
{{#unless categories}}
<p class="color-green-700">This space has no categories yet</p>
{{/unless}}
{{ui/ui-spacer size=300}}
{{ui/ui-button
color=constants.Color.Green
icon=constants.Icon.Category
label=constants.Label.Save
light=true
onClick=(action "onSave")}}

View file

@ -1,21 +1,25 @@
<div class="content-zone">
<div class="explainer-header">General Options</div>
<p class="explainer-text explainer-gap">Set name, excerpt and lifecycle stage</p>
{{layout/logo-heading
title="Content Settings"
desc="Set name, description and lifecycle stage"
icon=constants.Icon.Settings}}
<form class="view-document">
<div class="form-group">
<label for="document-name">Name</label>
{{focus-input id="document-name" type="text" value=docName
class=(if hasNameError "form-control mousetrap is-invalid" "form-control mousetrap") placeholder="Title" autocomplete="off"}}
</div>
<form class="view-document">
<div class="form-group">
<label for="document-name">Name</label>
{{focus-input id="document-name" type="text" value=docName
class=(if hasNameError "form-control mousetrap is-invalid" "form-control mousetrap") placeholder="Title" autocomplete="off"}}
</div>
<div class="form-group">
<label for="document-excerpt">Excerpt</label>
{{textarea id="document-excerpt" rows="4" value=docExcerpt class="form-control mousetrap" placeholder="Excerpt" autocomplete="off"}}
<small class="form-text text-muted">Optional description explaining content</small>
</div>
<button type="submit" class="btn btn-success text-uppercase bold-700 mt-5" {{action "onSave"}}>Save</button>
</form>
</div>
<div class="form-group">
<label for="document-excerpt">Description</label>
{{textarea id="document-excerpt" rows="4" value=docExcerpt class="form-control mousetrap" placeholder="Excerpt" autocomplete="off"}}
<small class="form-text text-muted">Optional description explaining content</small>
</div>
{{ui/ui-button
color=constants.Color.Green
icon=constants.Icon.Settings
label=constants.Label.Save
light=true
onClick=(action "onSave")}}
</form>

View file

@ -1,30 +0,0 @@
<div class="content-zone">
<div class="explainer-header">Categories & Tags</div>
<p class="explainer-text explainer-gap">Categorize your content, assign tags to suppliment</p>
<h1>Specify up to {{appMeta.maxTags}} tags</h1>
<p class="form-text text-muted">Lowercase, characters, numbers, hyphens only</p>
<form>
{{#each tagz as |tag|}}
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">#</span>
</div>
{{input type="text" id=(concat "add-tag-field-" tag.number) class="form-control mousetrap tag-input" placeholder="Tag name" value=tag.value}}
</div>
{{/each}}
</form>
<div class="mt-5" />
<h1>Assign categories</h1>
<p class="form-text text-muted">Categories allow you divide a space into logical chunks</p>
{{ui/ui-list-picker items=categories nameField="category" singleSelect=false}}
{{#unless selectedCategories}}
<p class="text-danger">This space has no categories defined yet.</p>
{{/unless}}
<button type="submit" class="btn btn-success text-uppercase bold-700 mt-5" {{action "onSave"}}>Save</button>
</div>

View file

@ -0,0 +1,25 @@
{{layout/logo-heading
title="Tags"
desc=(concat "Specify up to " appMeta.maxTags " tags — lowercase, characters, numbers, hyphens only")
icon=constants.Icon.Category}}
{{#each tagz as |tag|}}
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="dicon {{constants.Icon.Tag}}" />
</span>
</div>
{{input type="text" id=(concat "add-tag-field-" tag.number) class="form-control mousetrap tag-input" placeholder="Tag name" value=tag.value}}
</div>
{{ui/ui-spacer size=200}}
{{/each}}
{{ui/ui-spacer size=300}}
{{ui/ui-button
color=constants.Color.Green
icon=constants.Icon.Tag
label=constants.Label.Save
light=true
onClick=(action "onSave")}}