mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Content liking
New per space option that allows users to like/dislike content. The prompt is configurable per space, e.g. "Was this useful?". Enterprise edition gets new Votes report providing insights into most/least liked content.
This commit is contained in:
parent
6c8f23792c
commit
22b6674edb
23 changed files with 1031 additions and 694 deletions
|
@ -10,7 +10,7 @@
|
|||
<div class="section-divider" />
|
||||
{{/if}}
|
||||
|
||||
{{document/document-page document=document folder=folder page=item.page meta=item.meta pending=item.pending
|
||||
{{document/document-page document=document folder=folder page=item.page meta=item.meta pending=item.pending
|
||||
permissions=permissions toEdit=toEdit roles=roles blocks=blocks
|
||||
onSavePage=(action 'onSavePage') onSavePageAsBlock=(action 'onSavePageAsBlock')
|
||||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onDeletePage') refresh=(action refresh)}}
|
||||
|
@ -23,6 +23,24 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if folder.allowLikes}}
|
||||
<div class=" d-flex justify-content-center">
|
||||
<div class="vote-box">
|
||||
{{#unless voteThanks}}
|
||||
<div class="prompt">
|
||||
{{folder.likes}}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button type="button" class="btn btn-outline-success font-weight-bold" {{action 'onVote' 1}}>Yes, thanks!</button>
|
||||
<button type="button" class="btn btn-outline-secondary font-weight-bold" {{action 'onVote' 2}}>Not really</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ack">Thanks for the feedback!</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#unless hasPages}}
|
||||
|
|
|
@ -105,6 +105,47 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if (or permissions.spaceOwner permissions.spaceManage)}}
|
||||
<div id="space-settings-button" class="button-icon-gray align-middle" data-toggle="tooltip" data-placement="top" title="Settings">
|
||||
<i class="material-icons" data-toggle="modal" data-target="#space-settings-modal" data-backdrop="static">settings</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="space-settings-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">Space Settings</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>Space Type</label>
|
||||
{{ui-select id="group-dropdown" content=spaceTypeOptions optionValuePath="id" optionLabelPath="label" selection=spaceType action=(action 'onSetSpaceType')}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Content Liking</label>
|
||||
{{#if allowLikes}}
|
||||
{{input type='text' id="space-likes-prompt" class="form-control" placeholder="Did this help you?" value=likes}}
|
||||
<small class="form-text text-muted">Specify the prompt, e.g. Did this help you? Was this helpful? Did you find what you needed?</small>
|
||||
<div class="mt-4">
|
||||
<button type="button" class="btn btn-secondary" onclick={{action 'onSetLikes' false}}>Do not allow users to like content</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-success" onclick={{action 'onSetLikes' true}}>Allow users to like content</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-success" onclick={{action 'onSpaceSettings'}}>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if pinState.isPinned}}
|
||||
<div id="space-pin-button" class="button-icon-gold align-middle" data-toggle="tooltip" data-placement="top" title="Remove favorite" {{action 'onUnpin'}}>
|
||||
<i class="material-icons">star</i>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue