1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 07:39:43 +02:00

accept .markdown files and trap fro no spaces on space admin screen

This commit is contained in:
Harvey Kandola 2017-06-11 15:20:48 -04:00
parent bbcba8eb18
commit 86dcbbd684
5 changed files with 56 additions and 44 deletions

View file

@ -74,7 +74,7 @@ export default Ember.Component.extend(NotifierMixin, {
url: importUrl,
method: "post",
paramName: 'attachment',
acceptedFiles: ".doc,.docx,.txt,.md,.markdown",
acceptedFiles: ".doc,.docx,.md,.markdown,.htm,.html",
clickable: true,
maxFilesize: 10,
parallelUploads: 3,

View file

@ -27,6 +27,9 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
setupController(controller, model) {
let nonPrivateFolders = model.rejectBy('folderType', 2);
if (is.empty(nonPrivateFolders) || is.null(model) || is.undefined(model)) {
nonPrivateFolders = [];
}
controller.set('folders', nonPrivateFolders);
this.get('folderService').getProtectedFolderInfo().then((people) => {
@ -48,7 +51,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
},
activate() {
document.title = "Folders | Documize";
document.title = "Spaces | Documize";
},
actions: {

View file

@ -1,41 +1,50 @@
<div class="global-folder-settings">
<div class="form-header">
<div class="title">{{folders.length}} shared {{label}}</div>
<div class="tip">View and change shared space ownership</div>
</div>
<div class="input-control">
<table class="basic-table">
<thead>
<tr>
<th class="bordered">Space</th>
<th class="bordered">Participants</th>
</tr>
</thead>
<tbody>
{{#each folders as |folder|}}
<tr>
<td class="bordered">
{{#link-to 'folder' folder.id folder.slug class="alt"}}{{folder.name}}{{/link-to}}
</td>
<td class="bordered">
{{#each folder.sharedWith as |person|}}
{{#if person.isEveryone}}
Everyone
{{else}}
{{#if folders}}
<div class="global-folder-settings">
<div class="form-header">
<div class="title">{{folders.length}} shared {{label}}</div>
<div class="tip">View and change shared space ownership</div>
</div>
<div class="input-control">
<table class="basic-table">
<thead>
<tr>
<th class="bordered">Space</th>
<th class="bordered">Participants</th>
</tr>
</thead>
<tbody>
{{#each folders as |folder|}}
<tr>
<td class="bordered">
{{#link-to 'folder' folder.id folder.slug class="alt"}}{{folder.name}}{{/link-to}}
</td>
<td class="bordered">
{{#each folder.sharedWith as |person|}}
{{#if person.isEveryone}}
Everyone
{{else}}
{{#if person.isOwner}}
<span class="bold">{{person.firstname}} {{person.lastname}} (owner)</span>
{{else}}
{{person.firstname}} {{person.lastname}}
<a class="action-link" {{action "changeOwner" folder.id person.userId}}>make owner</a>
{{/if}}
{{/if}}
<br/>
{{/each}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{#if person.isOwner}}
<span class="bold">{{person.firstname}} {{person.lastname}} (owner)</span>
{{else}}
{{person.firstname}} {{person.lastname}}
<a class="action-link" {{action "changeOwner" folder.id person.userId}}>make owner</a>
{{/if}}
{{/if}}
<br/>
{{/each}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{else}}
<div class="global-folder-settings">
<div class="form-header">
<div class="title">{{folders.length}} shared {{label}}</div>
<div class="tip">There are no spaces to maintain</div>
</div>
</div>
{{/if}}

View file

@ -9,7 +9,7 @@
<div class="clearfix" />
<div id="import-document-button" class="import-document-button">
Drag-drop or click to select .doc, .docx, .txt, .md, .markdown files
Drag-drop or click to select .doc, .docx, .md, .markdown files
</div>
<div class="list-wrapper">

View file

@ -81,7 +81,7 @@ func LibSetup() error {
}
}
for _, xtn := range []string{"md"} {
for _, xtn := range []string{"md", "markdown"} {
err = Lib.RegPlugin("Convert", xtn, md.Convert, nil)
if err != nil {
return err