Compare commits
9 Commits
v0.4.0-bet
...
v0.4.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfe71900d3 | ||
|
|
c6a6b41193 | ||
|
|
b0f7bef279 | ||
|
|
014f76b2fb | ||
|
|
546928fb79 | ||
|
|
b4ead5a2eb | ||
|
|
124918b744 | ||
|
|
9308ad125a | ||
|
|
7dc43829ab |
@@ -14,7 +14,7 @@
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>0.4.0-beta2</version>
|
||||
<version>0.4.0-beta3</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<namespace>Deck</namespace>
|
||||
|
||||
@@ -911,14 +911,11 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
#card-attachments {
|
||||
ul {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.details {
|
||||
font-size: 8pt;
|
||||
padding-left: 15px;
|
||||
.card-attachments {
|
||||
.error {
|
||||
padding-left: 38px;
|
||||
margin-bottom: 5px;
|
||||
background-position: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,13 +30,17 @@ export default class FileService {
|
||||
this.cardservice = CardService;
|
||||
this.uploader.onAfterAddingFile = this.onAfterAddingFile.bind(this);
|
||||
this.uploader.onSuccessItem = this.onSuccessItem.bind(this);
|
||||
this.uploader.onErrorItem = this.onErrorItem.bind(this);
|
||||
|
||||
this.status = null;
|
||||
}
|
||||
|
||||
|
||||
runUpload (fileItem, attachmentId) {
|
||||
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment');
|
||||
this.status = null;
|
||||
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment?type=deck_file');
|
||||
if (typeof attachmentId !== 'undefined') {
|
||||
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment/' + attachmentId);
|
||||
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment/' + attachmentId + '?type=deck_file');
|
||||
} else {
|
||||
fileItem.formData = [
|
||||
{
|
||||
@@ -95,6 +99,13 @@ export default class FileService {
|
||||
this.cardservice.get(item.cardId).attachments.push(response);
|
||||
}
|
||||
|
||||
onErrorItem (item, response) {
|
||||
this.status = {
|
||||
error: t('deck', `Failed to upload:`) + ' ' + item.file.name,
|
||||
message: response.message
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.service('FileService', FileService);
|
||||
12
l10n/de.js
12
l10n/de.js
@@ -15,11 +15,17 @@ OC.L10N.register(
|
||||
"Action needed" : "Handlung erforderlich",
|
||||
"Later" : "Später",
|
||||
"The file was uploaded" : "Die Datei wurde hochgeladen",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Die hochgeladene Datei überschreitet die upload_max_filesize-Vorgabe in php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Die Datei ist größer, als die MAX_FILE_SIZE-Vorgabe, die im HTML-Formular angegeben ist.",
|
||||
"The file was only partially uploaded" : "Die Datei konnte nur teilweise hochgeladen werden",
|
||||
"No file was uploaded" : "Es wurde keine Datei hochgeladen",
|
||||
"Missing a temporary folder" : "Kein temporärer Ordner vorhanden",
|
||||
"Could not write file to disk" : "Die Datei konnte nicht auf die Festplatte geschrieben werden",
|
||||
"A PHP extension stopped the file upload" : "Eine PHP-Erweiterung hat das Hochladen der Datei gestoppt",
|
||||
"No file uploaded" : "Keine Datei hochgeladen",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Ein Kanban Werkzeug für Nextcloud",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deck ist ein Organisationstool im Kanban-Stil für die persönliche Planung und Projektorganisation von Teams, die in Nextcloud integriert sind.\n\n\n- 📥 Füge Deine Aufgaben zu den Karten hinzu und ordne diese\n- 📄 Zusätzliche Hinweise in der Abschrift notieren\n- 🔖 Vergabe von Labels für noch bessere Organisation\n- 👥 Teile mit Deinem Team, Freunden oder der Familie\n- 🚀 Organisiere Dein Projekt",
|
||||
"Add a new stack" : "Stapel hinzufügen",
|
||||
"Submit" : "Übermitteln",
|
||||
"Show archived cards" : "Archivierte Karten anzeigen",
|
||||
@@ -27,6 +33,7 @@ OC.L10N.register(
|
||||
"Board details" : "Board-Details",
|
||||
"All Boards" : "Alle Boards",
|
||||
"Archived boards" : "Archivierte Boards",
|
||||
"Drop your files here to upload it to the card" : "Lege Deine Dateien hier ab, um sie auf die Karte hochzuladen",
|
||||
"Archive" : "Archivieren",
|
||||
"Unarchive" : "Dearchivieren",
|
||||
"Enter a card title" : "Kartentitel eingeben",
|
||||
@@ -59,13 +66,16 @@ OC.L10N.register(
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Anhang auswählen",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
"Insert the file into the description" : "Füge die Datei in die Beschreibung ein",
|
||||
"Modified:" : "Geändert:",
|
||||
"Created:" : "Erstellt:",
|
||||
"Choose a tag" : "Schlagwort auswählen",
|
||||
"Add a tag" : "Schlagwort hinzufügen",
|
||||
"Select tags" : "Schlagworte auswählen",
|
||||
"Assign users" : "Nutzer zuweisen",
|
||||
"Choose a user to assign" : "Wähle einen Benutzer zum Zuweisen",
|
||||
"Choose a user to assign" : "Wähle einen Benutzer für die Zuweisung aus",
|
||||
"Assign this card to a user" : "Diese Karte einem Benutzer zuweisen",
|
||||
"Due date" : "Fälligkeitsdatum",
|
||||
"Click to set" : "Klicken zum Übernehmen",
|
||||
|
||||
12
l10n/de.json
12
l10n/de.json
@@ -13,11 +13,17 @@
|
||||
"Action needed" : "Handlung erforderlich",
|
||||
"Later" : "Später",
|
||||
"The file was uploaded" : "Die Datei wurde hochgeladen",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Die hochgeladene Datei überschreitet die upload_max_filesize-Vorgabe in php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Die Datei ist größer, als die MAX_FILE_SIZE-Vorgabe, die im HTML-Formular angegeben ist.",
|
||||
"The file was only partially uploaded" : "Die Datei konnte nur teilweise hochgeladen werden",
|
||||
"No file was uploaded" : "Es wurde keine Datei hochgeladen",
|
||||
"Missing a temporary folder" : "Kein temporärer Ordner vorhanden",
|
||||
"Could not write file to disk" : "Die Datei konnte nicht auf die Festplatte geschrieben werden",
|
||||
"A PHP extension stopped the file upload" : "Eine PHP-Erweiterung hat das Hochladen der Datei gestoppt",
|
||||
"No file uploaded" : "Keine Datei hochgeladen",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Ein Kanban Werkzeug für Nextcloud",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deck ist ein Organisationstool im Kanban-Stil für die persönliche Planung und Projektorganisation von Teams, die in Nextcloud integriert sind.\n\n\n- 📥 Füge Deine Aufgaben zu den Karten hinzu und ordne diese\n- 📄 Zusätzliche Hinweise in der Abschrift notieren\n- 🔖 Vergabe von Labels für noch bessere Organisation\n- 👥 Teile mit Deinem Team, Freunden oder der Familie\n- 🚀 Organisiere Dein Projekt",
|
||||
"Add a new stack" : "Stapel hinzufügen",
|
||||
"Submit" : "Übermitteln",
|
||||
"Show archived cards" : "Archivierte Karten anzeigen",
|
||||
@@ -25,6 +31,7 @@
|
||||
"Board details" : "Board-Details",
|
||||
"All Boards" : "Alle Boards",
|
||||
"Archived boards" : "Archivierte Boards",
|
||||
"Drop your files here to upload it to the card" : "Lege Deine Dateien hier ab, um sie auf die Karte hochzuladen",
|
||||
"Archive" : "Archivieren",
|
||||
"Unarchive" : "Dearchivieren",
|
||||
"Enter a card title" : "Kartentitel eingeben",
|
||||
@@ -57,13 +64,16 @@
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Anhang auswählen",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
"Insert the file into the description" : "Füge die Datei in die Beschreibung ein",
|
||||
"Modified:" : "Geändert:",
|
||||
"Created:" : "Erstellt:",
|
||||
"Choose a tag" : "Schlagwort auswählen",
|
||||
"Add a tag" : "Schlagwort hinzufügen",
|
||||
"Select tags" : "Schlagworte auswählen",
|
||||
"Assign users" : "Nutzer zuweisen",
|
||||
"Choose a user to assign" : "Wähle einen Benutzer zum Zuweisen",
|
||||
"Choose a user to assign" : "Wähle einen Benutzer für die Zuweisung aus",
|
||||
"Assign this card to a user" : "Diese Karte einem Benutzer zuweisen",
|
||||
"Due date" : "Fälligkeitsdatum",
|
||||
"Click to set" : "Klicken zum Übernehmen",
|
||||
|
||||
@@ -16,7 +16,7 @@ OC.L10N.register(
|
||||
"Later" : "Später",
|
||||
"The file was uploaded" : "Die Datei wurde hochgeladen",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Die hochgeladene Datei überschreitet die upload_max_filesize-Vorgabe in php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Die Datei ist größer, als die MAX_FILE_SIZE-Vorgabe erlaubt, die im HTML-Formular spezifiziert ist",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Die Datei ist größer, als die MAX_FILE_SIZE-Vorgabe, die im HTML-Formular angegeben ist.",
|
||||
"The file was only partially uploaded" : "Die Datei konnte nur teilweise hochgeladen werden",
|
||||
"No file was uploaded" : "Es wurde keine Datei hochgeladen",
|
||||
"Missing a temporary folder" : "Kein temporärer Ordner vorhanden",
|
||||
@@ -25,7 +25,7 @@ OC.L10N.register(
|
||||
"No file uploaded" : "Keine Datei hochgeladen",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Ein Kanban Werzeug für Nextcloud",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deck ist ein Organisationstool im Kanban-Stil für die persönliche Planung und Projektorganisation von Teams, die in Nextcloud integriert sind.\n\n\n📥 Fügen Sie Ihre Aufgaben zu den Karten hinzu und ordnen Sie sie ein.\n📄 Zusätzliche Hinweise in der Abschrift notieren\n🔖 Vergabe von Labels für noch bessere Organisation\n👥 Teilen Sie mit Ihrem Team, Ihren Freunden oder Ihrer Familie\n🚀 Organisieren Sie Ihr Projekt",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deck ist ein Organisationstool im Kanban-Stil für die persönliche Planung und Projektorganisation von Teams, die in Nextcloud integriert sind.\n\n\n- 📥 Fügen Sie Ihre Aufgaben zu den Karten hinzu und ordnen Sie diese\n- 📄 Zusätzliche Hinweise in der Abschrift notieren\n- 🔖 Vergabe von Labels für noch bessere Organisation\n- 👥 Teilen Sie mit Ihrem Team, Ihren Freunden oder Ihrer Familie\n- 🚀 Organisieren Sie Ihr Projekt",
|
||||
"Add a new stack" : "Neuen Stapel hinzufügen",
|
||||
"Submit" : "Übermitteln",
|
||||
"Show archived cards" : "Archivierte Karten anzeigen",
|
||||
@@ -66,16 +66,16 @@ OC.L10N.register(
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Wählen Sie einen Anhang",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten Cronjob-Lauf gelöscht.",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
"Insert the file into the description" : "Fügen Sie die Datei in die Beschreibung ein",
|
||||
"Insert the file into the description" : "Füge die Datei in die Beschreibung ein",
|
||||
"Modified:" : "Geändert:",
|
||||
"Created:" : "Erstellt:",
|
||||
"Choose a tag" : "Schlagwort auswählen",
|
||||
"Add a tag" : "Schlagwort hinzufügen",
|
||||
"Select tags" : "Schlagworte auswählen",
|
||||
"Assign users" : "Benutzer zuordnen",
|
||||
"Choose a user to assign" : "Wählen Sie einen Benutzer zum Zuweisen",
|
||||
"Choose a user to assign" : "Wähle einen Benutzer für die Zuweisung aus",
|
||||
"Assign this card to a user" : "Diese Karte einem Benutzer zuordnen",
|
||||
"Due date" : "Zieltermin",
|
||||
"Click to set" : "Setzen",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"Later" : "Später",
|
||||
"The file was uploaded" : "Die Datei wurde hochgeladen",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Die hochgeladene Datei überschreitet die upload_max_filesize-Vorgabe in php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Die Datei ist größer, als die MAX_FILE_SIZE-Vorgabe erlaubt, die im HTML-Formular spezifiziert ist",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Die Datei ist größer, als die MAX_FILE_SIZE-Vorgabe, die im HTML-Formular angegeben ist.",
|
||||
"The file was only partially uploaded" : "Die Datei konnte nur teilweise hochgeladen werden",
|
||||
"No file was uploaded" : "Es wurde keine Datei hochgeladen",
|
||||
"Missing a temporary folder" : "Kein temporärer Ordner vorhanden",
|
||||
@@ -23,7 +23,7 @@
|
||||
"No file uploaded" : "Keine Datei hochgeladen",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Ein Kanban Werzeug für Nextcloud",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deck ist ein Organisationstool im Kanban-Stil für die persönliche Planung und Projektorganisation von Teams, die in Nextcloud integriert sind.\n\n\n📥 Fügen Sie Ihre Aufgaben zu den Karten hinzu und ordnen Sie sie ein.\n📄 Zusätzliche Hinweise in der Abschrift notieren\n🔖 Vergabe von Labels für noch bessere Organisation\n👥 Teilen Sie mit Ihrem Team, Ihren Freunden oder Ihrer Familie\n🚀 Organisieren Sie Ihr Projekt",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deck ist ein Organisationstool im Kanban-Stil für die persönliche Planung und Projektorganisation von Teams, die in Nextcloud integriert sind.\n\n\n- 📥 Fügen Sie Ihre Aufgaben zu den Karten hinzu und ordnen Sie diese\n- 📄 Zusätzliche Hinweise in der Abschrift notieren\n- 🔖 Vergabe von Labels für noch bessere Organisation\n- 👥 Teilen Sie mit Ihrem Team, Ihren Freunden oder Ihrer Familie\n- 🚀 Organisieren Sie Ihr Projekt",
|
||||
"Add a new stack" : "Neuen Stapel hinzufügen",
|
||||
"Submit" : "Übermitteln",
|
||||
"Show archived cards" : "Archivierte Karten anzeigen",
|
||||
@@ -64,16 +64,16 @@
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Wählen Sie einen Anhang",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten Cronjob-Lauf gelöscht.",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
"Insert the file into the description" : "Fügen Sie die Datei in die Beschreibung ein",
|
||||
"Insert the file into the description" : "Füge die Datei in die Beschreibung ein",
|
||||
"Modified:" : "Geändert:",
|
||||
"Created:" : "Erstellt:",
|
||||
"Choose a tag" : "Schlagwort auswählen",
|
||||
"Add a tag" : "Schlagwort hinzufügen",
|
||||
"Select tags" : "Schlagworte auswählen",
|
||||
"Assign users" : "Benutzer zuordnen",
|
||||
"Choose a user to assign" : "Wählen Sie einen Benutzer zum Zuweisen",
|
||||
"Choose a user to assign" : "Wähle einen Benutzer für die Zuweisung aus",
|
||||
"Assign this card to a user" : "Diese Karte einem Benutzer zuordnen",
|
||||
"Due date" : "Zieltermin",
|
||||
"Click to set" : "Setzen",
|
||||
|
||||
17
l10n/es.js
17
l10n/es.js
@@ -14,6 +14,15 @@ OC.L10N.register(
|
||||
"To review" : "Para revisar",
|
||||
"Action needed" : "Acción necesaria",
|
||||
"Later" : "Después",
|
||||
"The file was uploaded" : "Se ha subido el archivo",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "El archivo subido excede la directiva upload_max_filesize en php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido excede la directiva MAX_FILE-SIZE directive que se especificó en el formulario web",
|
||||
"The file was only partially uploaded" : "El archivo se ha subido solo parcialmente",
|
||||
"No file was uploaded" : "No se ha subido ningún archivo",
|
||||
"Missing a temporary folder" : "Falta una carpeta temporal",
|
||||
"Could not write file to disk" : "No se ha podido escribir el archivo al disco",
|
||||
"A PHP extension stopped the file upload" : "Una extensión de PHP ha detenido la subida del archivo",
|
||||
"No file uploaded" : "No se ha subido ningún archivo",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Una herramienta de manejo de proyectos y personal al estilo kanban para Nextcloud.",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deckes una herramienta de organización al estilo kanban enfocada en la planificación personal y en la organización de proyectos para equipos, integrada en Nextcloud.\n\n\n- 📥 Añade tus tareas a tarjetas y ordénalas\n- 📄 Escribe notas adicionales en markdown\n- 🔖 Asigna etiquetas para una organización aún mejor\n- 👥 Comparte con tu equipo, amigos o familia\n- 🚀 Organiza tu proyecto",
|
||||
@@ -24,6 +33,7 @@ OC.L10N.register(
|
||||
"Board details" : "Detalles del tablero",
|
||||
"All Boards" : "Todos los tableros",
|
||||
"Archived boards" : "Tableros archivados",
|
||||
"Drop your files here to upload it to the card" : "Arrastra tus archivos aquí para subirlos a la tarjeta",
|
||||
"Archive" : "Archivar",
|
||||
"Unarchive" : "Desarchivar",
|
||||
"Enter a card title" : "Introducir título de tarjeta",
|
||||
@@ -54,7 +64,11 @@ OC.L10N.register(
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Deshacer borrado del tablero. Si no, el tablero será eliminado durante la próxima ejecución del cronjob.",
|
||||
"Create new board" : "Crear nuevo tablero",
|
||||
"New board title" : "Nuevo título de tablero",
|
||||
"Select an attachment" : "Selecciona un adjunto",
|
||||
"by" : "por",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Deshacer eliminación del archivo. De otra forma el archivo se borrará durante la próxima ejecución del trabajo cron.",
|
||||
"Undo file deletion" : "Deshacer eliminación del archivo",
|
||||
"Insert the file into the description" : "Introduce el archivo en la descripción",
|
||||
"Modified:" : "Modificado: ",
|
||||
"Created:" : "Creado: ",
|
||||
"Choose a tag" : "Escoge una etiqueta",
|
||||
@@ -67,9 +81,12 @@ OC.L10N.register(
|
||||
"Click to set" : "Pinchar para establecer",
|
||||
"Remove due date" : "Eliminar fecha límite",
|
||||
"Description" : "Descripción",
|
||||
"Attachments" : "Adjuntos",
|
||||
"Saved" : "Guardado",
|
||||
"Unsaved changes" : "Cambios no guardados",
|
||||
"Formatting help" : "Ayuda de formato",
|
||||
"Upload attachment" : "Subir adjunto",
|
||||
"Insert attachment" : "Insertar adjunto",
|
||||
"Add a card description…" : "Añadir una descripción de tarjeta...",
|
||||
"Shared boards" : "Tableros compartidos",
|
||||
"View more" : "Ver más",
|
||||
|
||||
17
l10n/es.json
17
l10n/es.json
@@ -12,6 +12,15 @@
|
||||
"To review" : "Para revisar",
|
||||
"Action needed" : "Acción necesaria",
|
||||
"Later" : "Después",
|
||||
"The file was uploaded" : "Se ha subido el archivo",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "El archivo subido excede la directiva upload_max_filesize en php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido excede la directiva MAX_FILE-SIZE directive que se especificó en el formulario web",
|
||||
"The file was only partially uploaded" : "El archivo se ha subido solo parcialmente",
|
||||
"No file was uploaded" : "No se ha subido ningún archivo",
|
||||
"Missing a temporary folder" : "Falta una carpeta temporal",
|
||||
"Could not write file to disk" : "No se ha podido escribir el archivo al disco",
|
||||
"A PHP extension stopped the file upload" : "Una extensión de PHP ha detenido la subida del archivo",
|
||||
"No file uploaded" : "No se ha subido ningún archivo",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Una herramienta de manejo de proyectos y personal al estilo kanban para Nextcloud.",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deckes una herramienta de organización al estilo kanban enfocada en la planificación personal y en la organización de proyectos para equipos, integrada en Nextcloud.\n\n\n- 📥 Añade tus tareas a tarjetas y ordénalas\n- 📄 Escribe notas adicionales en markdown\n- 🔖 Asigna etiquetas para una organización aún mejor\n- 👥 Comparte con tu equipo, amigos o familia\n- 🚀 Organiza tu proyecto",
|
||||
@@ -22,6 +31,7 @@
|
||||
"Board details" : "Detalles del tablero",
|
||||
"All Boards" : "Todos los tableros",
|
||||
"Archived boards" : "Tableros archivados",
|
||||
"Drop your files here to upload it to the card" : "Arrastra tus archivos aquí para subirlos a la tarjeta",
|
||||
"Archive" : "Archivar",
|
||||
"Unarchive" : "Desarchivar",
|
||||
"Enter a card title" : "Introducir título de tarjeta",
|
||||
@@ -52,7 +62,11 @@
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Deshacer borrado del tablero. Si no, el tablero será eliminado durante la próxima ejecución del cronjob.",
|
||||
"Create new board" : "Crear nuevo tablero",
|
||||
"New board title" : "Nuevo título de tablero",
|
||||
"Select an attachment" : "Selecciona un adjunto",
|
||||
"by" : "por",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Deshacer eliminación del archivo. De otra forma el archivo se borrará durante la próxima ejecución del trabajo cron.",
|
||||
"Undo file deletion" : "Deshacer eliminación del archivo",
|
||||
"Insert the file into the description" : "Introduce el archivo en la descripción",
|
||||
"Modified:" : "Modificado: ",
|
||||
"Created:" : "Creado: ",
|
||||
"Choose a tag" : "Escoge una etiqueta",
|
||||
@@ -65,9 +79,12 @@
|
||||
"Click to set" : "Pinchar para establecer",
|
||||
"Remove due date" : "Eliminar fecha límite",
|
||||
"Description" : "Descripción",
|
||||
"Attachments" : "Adjuntos",
|
||||
"Saved" : "Guardado",
|
||||
"Unsaved changes" : "Cambios no guardados",
|
||||
"Formatting help" : "Ayuda de formato",
|
||||
"Upload attachment" : "Subir adjunto",
|
||||
"Insert attachment" : "Insertar adjunto",
|
||||
"Add a card description…" : "Añadir una descripción de tarjeta...",
|
||||
"Shared boards" : "Tableros compartidos",
|
||||
"View more" : "Ver más",
|
||||
|
||||
14
l10n/fr.js
14
l10n/fr.js
@@ -15,8 +15,14 @@ OC.L10N.register(
|
||||
"Action needed" : "Action requise",
|
||||
"Later" : "Plus tard",
|
||||
"The file was uploaded" : "Le fichier a été téléchargé",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Le fichier téléversé dépasse la valeur upload_max_filesize située dans le fichier php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Le fichier envoyé dépasse la valeur MAX_FILE_SIZE qui était spécifiée dans le formulaire HTML",
|
||||
"The file was only partially uploaded" : "Le fichier n'a été que partiellement envoyé",
|
||||
"No file was uploaded" : "Aucun fichier n'a été téléchargé",
|
||||
"Missing a temporary folder" : "Absence de dossier temporaire",
|
||||
"Could not write file to disk" : "Impossible d'écrire le fichier sur le disque.",
|
||||
"A PHP extension stopped the file upload" : "Une extension PHP a arrêté le téléversement du fichier",
|
||||
"No file uploaded" : "Aucun fichier téléversé",
|
||||
"Deck" : "Deck",
|
||||
"Add a new stack" : "Ajouter une nouvelle pile",
|
||||
"Submit" : "Envoyer",
|
||||
@@ -25,6 +31,7 @@ OC.L10N.register(
|
||||
"Board details" : "Détails du tableau",
|
||||
"All Boards" : "Tous les tableaux",
|
||||
"Archived boards" : "Tableaux archivés",
|
||||
"Drop your files here to upload it to the card" : "Déposez vos fichiers ici pour les téléverser sur la carte",
|
||||
"Archive" : "Archiver",
|
||||
"Unarchive" : "Ne plus archiver",
|
||||
"Enter a card title" : "Saisissez un titre de carte",
|
||||
@@ -55,7 +62,11 @@ OC.L10N.register(
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Annuler la suppression du tableau - Autrement le tableau sera supprimé lors du prochain lancement de la tâche cron.",
|
||||
"Create new board" : "Créer un nouveau tableau",
|
||||
"New board title" : "Nouveau titre pour le tableau",
|
||||
"Select an attachment" : "Sélectionner une pièce jointe",
|
||||
"by" : "par",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Annuler la suppression du fichier - Autrement le fichier sera supprimé lors du prochain lancement de la tâche cron.",
|
||||
"Undo file deletion" : "Annuler la suppression du fichier",
|
||||
"Insert the file into the description" : "Insérer le fichier dans la description",
|
||||
"Modified:" : "Modifié le :",
|
||||
"Created:" : "Créé le :",
|
||||
"Choose a tag" : "Choisir une étiquette",
|
||||
@@ -68,9 +79,12 @@ OC.L10N.register(
|
||||
"Click to set" : "Cliquez pour définir",
|
||||
"Remove due date" : "Supprimer la date d'échéance",
|
||||
"Description" : "Description",
|
||||
"Attachments" : "Pièces jointes",
|
||||
"Saved" : "Enregistré",
|
||||
"Unsaved changes" : "Modifications non sauvegardées",
|
||||
"Formatting help" : "Aide sur la mise en forme",
|
||||
"Upload attachment" : "Téléverser la pièce jointe",
|
||||
"Insert attachment" : "Insérer une pièce jointe",
|
||||
"Add a card description…" : "Ajouter une description pour la carte",
|
||||
"Shared boards" : "Tableaux partagés",
|
||||
"View more" : "Voir plus",
|
||||
|
||||
14
l10n/fr.json
14
l10n/fr.json
@@ -13,8 +13,14 @@
|
||||
"Action needed" : "Action requise",
|
||||
"Later" : "Plus tard",
|
||||
"The file was uploaded" : "Le fichier a été téléchargé",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Le fichier téléversé dépasse la valeur upload_max_filesize située dans le fichier php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Le fichier envoyé dépasse la valeur MAX_FILE_SIZE qui était spécifiée dans le formulaire HTML",
|
||||
"The file was only partially uploaded" : "Le fichier n'a été que partiellement envoyé",
|
||||
"No file was uploaded" : "Aucun fichier n'a été téléchargé",
|
||||
"Missing a temporary folder" : "Absence de dossier temporaire",
|
||||
"Could not write file to disk" : "Impossible d'écrire le fichier sur le disque.",
|
||||
"A PHP extension stopped the file upload" : "Une extension PHP a arrêté le téléversement du fichier",
|
||||
"No file uploaded" : "Aucun fichier téléversé",
|
||||
"Deck" : "Deck",
|
||||
"Add a new stack" : "Ajouter une nouvelle pile",
|
||||
"Submit" : "Envoyer",
|
||||
@@ -23,6 +29,7 @@
|
||||
"Board details" : "Détails du tableau",
|
||||
"All Boards" : "Tous les tableaux",
|
||||
"Archived boards" : "Tableaux archivés",
|
||||
"Drop your files here to upload it to the card" : "Déposez vos fichiers ici pour les téléverser sur la carte",
|
||||
"Archive" : "Archiver",
|
||||
"Unarchive" : "Ne plus archiver",
|
||||
"Enter a card title" : "Saisissez un titre de carte",
|
||||
@@ -53,7 +60,11 @@
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Annuler la suppression du tableau - Autrement le tableau sera supprimé lors du prochain lancement de la tâche cron.",
|
||||
"Create new board" : "Créer un nouveau tableau",
|
||||
"New board title" : "Nouveau titre pour le tableau",
|
||||
"Select an attachment" : "Sélectionner une pièce jointe",
|
||||
"by" : "par",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Annuler la suppression du fichier - Autrement le fichier sera supprimé lors du prochain lancement de la tâche cron.",
|
||||
"Undo file deletion" : "Annuler la suppression du fichier",
|
||||
"Insert the file into the description" : "Insérer le fichier dans la description",
|
||||
"Modified:" : "Modifié le :",
|
||||
"Created:" : "Créé le :",
|
||||
"Choose a tag" : "Choisir une étiquette",
|
||||
@@ -66,9 +77,12 @@
|
||||
"Click to set" : "Cliquez pour définir",
|
||||
"Remove due date" : "Supprimer la date d'échéance",
|
||||
"Description" : "Description",
|
||||
"Attachments" : "Pièces jointes",
|
||||
"Saved" : "Enregistré",
|
||||
"Unsaved changes" : "Modifications non sauvegardées",
|
||||
"Formatting help" : "Aide sur la mise en forme",
|
||||
"Upload attachment" : "Téléverser la pièce jointe",
|
||||
"Insert attachment" : "Insérer une pièce jointe",
|
||||
"Add a card description…" : "Ajouter une description pour la carte",
|
||||
"Shared boards" : "Tableaux partagés",
|
||||
"View more" : "Voir plus",
|
||||
|
||||
17
l10n/tr.js
17
l10n/tr.js
@@ -14,6 +14,15 @@ OC.L10N.register(
|
||||
"To review" : "İncelenecek",
|
||||
"Action needed" : "İşlem yapılması gerekiyor",
|
||||
"Later" : "Sonra",
|
||||
"The file was uploaded" : "Dosya yüklendi",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Yüklenen dosya php.ini dosyasındaki yüklenebilecek dosya boyutunu belirten upload_max_filesize değişkeninin değerini aşıyor",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Yüklenen dosya HTML formundaki yüklenebilecek dosya boyutunu belirten MAX_FILE_SIZE değişkeninin değerini aşıyor",
|
||||
"The file was only partially uploaded" : "Dosyanın yalnız bir bölümü yüklendi",
|
||||
"No file was uploaded" : "Herhangi bir dosya yüklenmedi",
|
||||
"Missing a temporary folder" : "Geçici bir klasör eksik",
|
||||
"Could not write file to disk" : "Dosya diske yazılamadı",
|
||||
"A PHP extension stopped the file upload" : "Bir PHP eklentisi dosyanın yüklenmesini engelledi",
|
||||
"No file uploaded" : "Herhangi bir dosya yüklenmemiş",
|
||||
"Deck" : "Tahta",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Nextcloud için Kanban tarzında bir proje ve kişisel yönetim uygulaması",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deste, Nextcloud ile bütünleştirilmiş takımlar için Kanban tarzında bir kişisel planlama ve proje yönetimi uygulamasıdır.\n\n\n- 📥 Görevleri kartlara ekleyerek sıralayabilirsiniz\n- 📄 Markdown ile biçimlendirilmiş notlar ekleyebilirsiniz\n- 🔖 Daha iyi düzenleme için etiketler atayabilirsiniz\n- 👥 Takımınız, arkadaşlarınız ya da aileniz ile paylaşabilirsiniz\n- 🚀 Projelerinizi düzenli tutarak izleyebilirsiniz",
|
||||
@@ -24,6 +33,7 @@ OC.L10N.register(
|
||||
"Board details" : "Pano ayrıntıları",
|
||||
"All Boards" : "Tüm Panolar",
|
||||
"Archived boards" : "Arşivlenmiş panolar",
|
||||
"Drop your files here to upload it to the card" : "Karta yüklemek istediğiniz dosyalarınızı sürükleyip buraya bırakın",
|
||||
"Archive" : "Arşivle",
|
||||
"Unarchive" : "Arşivden Çıkar",
|
||||
"Enter a card title" : "Bir kart başlığı yazın",
|
||||
@@ -54,7 +64,11 @@ OC.L10N.register(
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Pano silme işlemini geri alır. Yoksa pano zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Create new board" : "Yeni pano ekle",
|
||||
"New board title" : "Yeni pano başlığı",
|
||||
"Select an attachment" : "Bir ek dosyası seçin",
|
||||
"by" : "Kişi:",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dosya silme işlemini geri alır. Yoksa dosya zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Undo file deletion" : "Dosya silmeyi geri al",
|
||||
"Insert the file into the description" : "Dosyayı açıklamaya ekle",
|
||||
"Modified:" : "Değiştirilme:",
|
||||
"Created:" : "Oluşturulma:",
|
||||
"Choose a tag" : "Bir etiket seçin",
|
||||
@@ -67,9 +81,12 @@ OC.L10N.register(
|
||||
"Click to set" : "Ayarlamak için tıklayın",
|
||||
"Remove due date" : "Bitiş tarihini kaldır",
|
||||
"Description" : "Açıklama",
|
||||
"Attachments" : "Ek dosyalar",
|
||||
"Saved" : "Kaydedildi",
|
||||
"Unsaved changes" : "Kaydedilmemiş değişiklikler",
|
||||
"Formatting help" : "Biçimlendirme yardımı",
|
||||
"Upload attachment" : "Ek dosya yükle",
|
||||
"Insert attachment" : "Ek dosya ekle",
|
||||
"Add a card description…" : "Bir kart açıklaması ekle...",
|
||||
"Shared boards" : "Paylaşılmış panolar",
|
||||
"View more" : "Diğerlerini görüntüle",
|
||||
|
||||
17
l10n/tr.json
17
l10n/tr.json
@@ -12,6 +12,15 @@
|
||||
"To review" : "İncelenecek",
|
||||
"Action needed" : "İşlem yapılması gerekiyor",
|
||||
"Later" : "Sonra",
|
||||
"The file was uploaded" : "Dosya yüklendi",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Yüklenen dosya php.ini dosyasındaki yüklenebilecek dosya boyutunu belirten upload_max_filesize değişkeninin değerini aşıyor",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Yüklenen dosya HTML formundaki yüklenebilecek dosya boyutunu belirten MAX_FILE_SIZE değişkeninin değerini aşıyor",
|
||||
"The file was only partially uploaded" : "Dosyanın yalnız bir bölümü yüklendi",
|
||||
"No file was uploaded" : "Herhangi bir dosya yüklenmedi",
|
||||
"Missing a temporary folder" : "Geçici bir klasör eksik",
|
||||
"Could not write file to disk" : "Dosya diske yazılamadı",
|
||||
"A PHP extension stopped the file upload" : "Bir PHP eklentisi dosyanın yüklenmesini engelledi",
|
||||
"No file uploaded" : "Herhangi bir dosya yüklenmemiş",
|
||||
"Deck" : "Tahta",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Nextcloud için Kanban tarzında bir proje ve kişisel yönetim uygulaması",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deste, Nextcloud ile bütünleştirilmiş takımlar için Kanban tarzında bir kişisel planlama ve proje yönetimi uygulamasıdır.\n\n\n- 📥 Görevleri kartlara ekleyerek sıralayabilirsiniz\n- 📄 Markdown ile biçimlendirilmiş notlar ekleyebilirsiniz\n- 🔖 Daha iyi düzenleme için etiketler atayabilirsiniz\n- 👥 Takımınız, arkadaşlarınız ya da aileniz ile paylaşabilirsiniz\n- 🚀 Projelerinizi düzenli tutarak izleyebilirsiniz",
|
||||
@@ -22,6 +31,7 @@
|
||||
"Board details" : "Pano ayrıntıları",
|
||||
"All Boards" : "Tüm Panolar",
|
||||
"Archived boards" : "Arşivlenmiş panolar",
|
||||
"Drop your files here to upload it to the card" : "Karta yüklemek istediğiniz dosyalarınızı sürükleyip buraya bırakın",
|
||||
"Archive" : "Arşivle",
|
||||
"Unarchive" : "Arşivden Çıkar",
|
||||
"Enter a card title" : "Bir kart başlığı yazın",
|
||||
@@ -52,7 +62,11 @@
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Pano silme işlemini geri alır. Yoksa pano zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Create new board" : "Yeni pano ekle",
|
||||
"New board title" : "Yeni pano başlığı",
|
||||
"Select an attachment" : "Bir ek dosyası seçin",
|
||||
"by" : "Kişi:",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dosya silme işlemini geri alır. Yoksa dosya zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Undo file deletion" : "Dosya silmeyi geri al",
|
||||
"Insert the file into the description" : "Dosyayı açıklamaya ekle",
|
||||
"Modified:" : "Değiştirilme:",
|
||||
"Created:" : "Oluşturulma:",
|
||||
"Choose a tag" : "Bir etiket seçin",
|
||||
@@ -65,9 +79,12 @@
|
||||
"Click to set" : "Ayarlamak için tıklayın",
|
||||
"Remove due date" : "Bitiş tarihini kaldır",
|
||||
"Description" : "Açıklama",
|
||||
"Attachments" : "Ek dosyalar",
|
||||
"Saved" : "Kaydedildi",
|
||||
"Unsaved changes" : "Kaydedilmemiş değişiklikler",
|
||||
"Formatting help" : "Biçimlendirme yardımı",
|
||||
"Upload attachment" : "Ek dosya yükle",
|
||||
"Insert attachment" : "Ek dosya ekle",
|
||||
"Add a card description…" : "Bir kart açıklaması ekle...",
|
||||
"Shared boards" : "Paylaşılmış panolar",
|
||||
"View more" : "Diğerlerini görüntüle",
|
||||
|
||||
@@ -32,9 +32,11 @@ use OCA\Deck\Db\CardMapper;
|
||||
use OCA\Deck\InvalidAttachmentType;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\NotFoundException;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCP\AppFramework\Http\Response;
|
||||
use OCP\ICache;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IL10N;
|
||||
|
||||
class AttachmentService {
|
||||
|
||||
@@ -48,6 +50,8 @@ class AttachmentService {
|
||||
private $application;
|
||||
/** @var ICache */
|
||||
private $cache;
|
||||
/** @var IL10N */
|
||||
private $l10n;
|
||||
|
||||
/**
|
||||
* AttachmentService constructor.
|
||||
@@ -58,16 +62,17 @@ class AttachmentService {
|
||||
* @param Application $application
|
||||
* @param ICacheFactory $cacheFactory
|
||||
* @param $userId
|
||||
* @param IL10N $l10n
|
||||
* @throws \OCP\AppFramework\QueryException
|
||||
*/
|
||||
public function __construct(AttachmentMapper $attachmentMapper, CardMapper $cardMapper, PermissionService $permissionService, Application $application, ICacheFactory $cacheFactory, $userId) {
|
||||
public function __construct(AttachmentMapper $attachmentMapper, CardMapper $cardMapper, PermissionService $permissionService, Application $application, ICacheFactory $cacheFactory, $userId, IL10N $l10n) {
|
||||
$this->attachmentMapper = $attachmentMapper;
|
||||
$this->cardMapper = $cardMapper;
|
||||
$this->permissionService = $permissionService;
|
||||
$this->userId = $userId;
|
||||
$this->application = $application;
|
||||
$this->cache = $cacheFactory->createDistributed('deck-card-attachments-');
|
||||
|
||||
$this->l10n = $l10n;
|
||||
|
||||
// Register shipped attachment services
|
||||
// TODO: move this to a plugin based approach once we have different types of attachments
|
||||
@@ -145,6 +150,9 @@ class AttachmentService {
|
||||
} catch (InvalidAttachmentType $e) {
|
||||
// just store the data
|
||||
}
|
||||
if ($attachment->getData() === null) {
|
||||
throw new StatusException($this->l10n->t('No data was provided to create an attachment.'));
|
||||
}
|
||||
$attachment = $this->attachmentMapper->insert($attachment);
|
||||
|
||||
// extend data so the frontend can use it properly after creating
|
||||
|
||||
@@ -25,9 +25,11 @@ namespace OCA\Deck\Service;
|
||||
|
||||
use OC\Security\CSP\ContentSecurityPolicyManager;
|
||||
use OCA\Deck\Db\Attachment;
|
||||
use OCA\Deck\StatusException;
|
||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||
use OCP\AppFramework\Http\EmptyContentSecurityPolicy;
|
||||
use OCP\AppFramework\Http\FileDisplayResponse;
|
||||
use OCP\Files\Cache\IScanner;
|
||||
use OCP\Files\IAppData;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\Files\NotPermittedException;
|
||||
@@ -100,6 +102,10 @@ class FileService implements IAttachmentService {
|
||||
return $attachment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws StatusException
|
||||
*/
|
||||
private function getUploadedFile () {
|
||||
$file = $this->request->getUploadedFile('file');
|
||||
$error = null;
|
||||
@@ -115,13 +121,13 @@ class FileService implements IAttachmentService {
|
||||
];
|
||||
|
||||
if (empty($file)) {
|
||||
$error = $this->l10n->t('No file uploaded');
|
||||
$error = $this->l10n->t('No file uploaded or file size exceeds maximum of %s', [\OCP\Util::humanFileSize(\OCP\Util::uploadLimit())]);
|
||||
}
|
||||
if (!empty($file) && array_key_exists('error', $file) && $file['error'] !== UPLOAD_ERR_OK) {
|
||||
$error = $phpFileUploadErrors[$file['error']];
|
||||
}
|
||||
if ($error !== null) {
|
||||
throw new \Exception($error);
|
||||
throw new StatusException($error);
|
||||
}
|
||||
return $file;
|
||||
}
|
||||
@@ -131,16 +137,21 @@ class FileService implements IAttachmentService {
|
||||
$folder = $this->getFolder($attachment);
|
||||
$fileName = $file['name'];
|
||||
if ($folder->fileExists($fileName)) {
|
||||
throw new \Exception('File already exists.');
|
||||
throw new StatusException('File already exists.');
|
||||
}
|
||||
|
||||
$target = $folder->newFile($fileName);
|
||||
$target->putContent(file_get_contents($file['tmp_name'], 'r'));
|
||||
$content = fopen($file['tmp_name'], 'rb');
|
||||
$target->putContent($content);
|
||||
fclose($content);
|
||||
|
||||
$attachment->setData($fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method requires to be used with POST so we can properly get the form data
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function update(Attachment $attachment) {
|
||||
$file = $this->getUploadedFile();
|
||||
@@ -148,7 +159,9 @@ class FileService implements IAttachmentService {
|
||||
$attachment->setData($fileName);
|
||||
|
||||
$target = $this->getFileForAttachment($attachment);
|
||||
$target->putContent(file_get_contents($file['tmp_name'], 'r'));
|
||||
$content = fopen($file['tmp_name'], 'rb');
|
||||
$target->putContent($content);
|
||||
fclose($content);
|
||||
|
||||
$attachment->setLastModified(time());
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-content card-attachments">
|
||||
<div class="error icon-error" ng-if="fileservice.status"><strong>{{ fileservice.status.error }}</strong><br />{{ fileservice.status.message }}</div>
|
||||
<attachment-list-component ng-if="params.tab === 1 && cardservice.getCurrent() && isArray(cardservice.getCurrent().attachments)" attachments="cardservice.getCurrent().attachments"></attachment-list-component>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ use OCP\AppFramework\Http\Response;
|
||||
use OCP\AppFramework\IAppContainer;
|
||||
use OCP\ICache;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IL10N;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Test\TestCase;
|
||||
|
||||
@@ -67,6 +68,8 @@ class AttachmentServiceTest extends TestCase {
|
||||
private $appContainer;
|
||||
/** ICache */
|
||||
private $cache;
|
||||
/** @var IL10N */
|
||||
private $l10n;
|
||||
|
||||
/**
|
||||
* @throws \OCP\AppFramework\QueryException
|
||||
@@ -91,7 +94,9 @@ class AttachmentServiceTest extends TestCase {
|
||||
->method('getContainer')
|
||||
->willReturn($this->appContainer);
|
||||
|
||||
$this->attachmentService = new AttachmentService($this->attachmentMapper, $this->cardMapper, $this->permissionService, $this->application, $this->cacheFactory, $this->userId);
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
|
||||
$this->attachmentService = new AttachmentService($this->attachmentMapper, $this->cardMapper, $this->permissionService, $this->application, $this->cacheFactory, $this->userId, $this->l10n);
|
||||
}
|
||||
|
||||
public function testRegisterAttachmentService() {
|
||||
@@ -103,7 +108,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
$application->expects($this->any())
|
||||
->method('getContainer')
|
||||
->willReturn($appContainer);
|
||||
$attachmentService = new AttachmentService($this->attachmentMapper, $this->cardMapper, $this->permissionService, $application, $this->cacheFactory, $this->userId);
|
||||
$attachmentService = new AttachmentService($this->attachmentMapper, $this->cardMapper, $this->permissionService, $application, $this->cacheFactory, $this->userId, $this->l10n);
|
||||
$attachmentService->registerAttachmentService('custom', MyAttachmentService::class);
|
||||
$this->assertEquals($fileServiceMock, $attachmentService->getService('deck_file'));
|
||||
$this->assertEquals(MyAttachmentService::class, get_class($attachmentService->getService('custom')));
|
||||
@@ -121,7 +126,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
$application->expects($this->any())
|
||||
->method('getContainer')
|
||||
->willReturn($appContainer);
|
||||
$attachmentService = new AttachmentService($this->attachmentMapper, $this->cardMapper, $this->permissionService, $application, $this->cacheFactory, $this->userId);
|
||||
$attachmentService = new AttachmentService($this->attachmentMapper, $this->cardMapper, $this->permissionService, $application, $this->cacheFactory, $this->userId, $this->l10n);
|
||||
$attachmentService->registerAttachmentService('custom', MyAttachmentService::class);
|
||||
$attachmentService->getService('deck_file_invalid');
|
||||
}
|
||||
|
||||
@@ -184,8 +184,8 @@ class FileServiceTest extends TestCase {
|
||||
->willReturn(false);
|
||||
$file = $this->createMock(ISimpleFile::class);
|
||||
$file->expects($this->once())
|
||||
->method('putContent')
|
||||
->with(file_get_contents(__FILE__, 'r'));
|
||||
->method('putContent');
|
||||
// FIXME: test fopen call properly
|
||||
$folder->expects($this->once())
|
||||
->method('newFile')
|
||||
->willReturn($file);
|
||||
@@ -202,8 +202,8 @@ class FileServiceTest extends TestCase {
|
||||
->willReturn(false);
|
||||
$file = $this->createMock(ISimpleFile::class);
|
||||
$file->expects($this->once())
|
||||
->method('putContent')
|
||||
->with(file_get_contents(__FILE__, 'r'));
|
||||
->method('putContent');
|
||||
// FIXME: test fopen call properly
|
||||
$folder->expects($this->once())
|
||||
->method('newFile')
|
||||
->willReturn($file);
|
||||
@@ -231,8 +231,8 @@ class FileServiceTest extends TestCase {
|
||||
$folder = $this->mockGetFolder(123);
|
||||
$file = $this->createMock(ISimpleFile::class);
|
||||
$file->expects($this->once())
|
||||
->method('putContent')
|
||||
->with(file_get_contents(__FILE__, 'r'));
|
||||
->method('putContent');
|
||||
// FIXME: test fopen call properly
|
||||
$folder->expects($this->once())
|
||||
->method('getFile')
|
||||
->willReturn($file);
|
||||
|
||||
Reference in New Issue
Block a user