1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

Better defaults for content like setting

This commit is contained in:
Harvey Kandola 2018-06-08 13:43:46 +01:00
parent 78cdca3266
commit acdf2025ab
4 changed files with 679 additions and 678 deletions

View file

@ -75,7 +75,7 @@ Documize runs on the following:
Documize is built with the following technologies:
- EmberJS (v3.1.2)
- Go (v1.10.2)
- Go (v1.10.3)
...and supports the following databases:

File diff suppressed because one or more lines are too long

View file

@ -28,13 +28,9 @@ export default Component.extend(AuthMixin, Notifier, {
spaceTypeOptions: A([]),
spaceType: 0,
likes: 'Did this help you?',
likes: '',
allowLikes: false,
init() {
this._super(...arguments);
},
didReceiveAttrs() {
this._super(...arguments);
@ -48,8 +44,13 @@ export default Component.extend(AuthMixin, Notifier, {
this.set('spaceTypeOptions', spaceTypeOptions);
this.set('spaceType', spaceTypeOptions.findBy('id', folder.get('folderType')));
this.set('likes', folder.get('likes'));
this.set('allowLikes', folder.get('allowLikes'));
if (this.get('allowLikes')) {
this.set('likes', folder.get('likes'));
} else {
this.set('likes', 'Did this help you?');
}
},
actions: {

View file

@ -9,7 +9,7 @@
<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}}
{{input type='text' id="space-likes-prompt" class="form-control" placeholder="Enter prompt asking for user feedback" 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-outline-danger" onclick={{action 'onSetLikes' false}}>Do not allow users to like content</button>