Skip to content

Commit

Permalink
Merge branch '2023.11' into 2024.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Jan 11, 2024
2 parents 933277b + 171c979 commit c2d5f79
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
1 change: 1 addition & 0 deletions tine20/Tasks/Import/definitions/tasks_import_csv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<dryrun>0</dryrun>
<delimiter>,</delimiter>
<description>Import CSV formatted tasks</description>
<example>Tasks/Import/examples/checklist.csv</example>
<extension>csv</extension>
<mapping>
<field>
Expand Down
4 changes: 4 additions & 0 deletions tine20/Tasks/Import/examples/checklist.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
summary,due,priority,description,percent,status,completed,alarm_minutes_before
Configure Backup,+1 week friday,normal,,0,NEEDS-ACTION,,1440
Configure Monitoring,+1 week friday,normal,,0,NEEDS-ACTION,,1440
Restore Test Database,+1 week friday,normal,,0,NEEDS-ACTION,,1440
36 changes: 11 additions & 25 deletions tine20/Tinebase/js/widgets/dialog/ImportDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3
* @author Cornelius Weiss <[email protected]>
* @copyright Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
* @copyright Copyright (c) 2007-2024 Metaways Infosystems GmbH (http://www.metaways.de)
*/
Ext.ns('Tine.widgets.dialog');

Expand Down Expand Up @@ -236,7 +236,7 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
* returns the file panel of this wizard (step 1)
*
* @TODO restrict allowed extensions on definition selection OR
* restirct allowed definitions on file selection
* restrict allowed definitions on file selection
*/
getFilePanel: function() {
if (this.filePanel) {
Expand All @@ -247,6 +247,10 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
description = def ? this.app.i18n._hidden(def.get('description')) : '',
options = def ? def.get('plugin_options_json') : null,
example = options && options.example ? options.example : '';

const importText = (example !== '')
? i18n._('Following you find a list of all supported import formats and a sample file, how Tine 2.0 expects your file to look like.').replace(/Tine 2\.0/g, Tine.title)
: i18n._('Following you find a list of all supported import formats.');

return {
title: i18n._('Choose File and Format'),
Expand Down Expand Up @@ -277,16 +281,12 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
baseCls: 'ux-subformpanel',
title: i18n._('What should the file you upload look like?'),
flex: 1,
items: [/*{
xtype: 'label',
cls: 'tb-login-big-label',
html: i18n._('What should the file you upload look like?') + '<br />'
},*/ {
items: [{
xtype: 'label',
html: '<p>' + i18n._('Tine 2.0 does not understand all kind of files you might want to upload. You will have to manually adjust your file so Tine 2.0 can handle it.').replace(/Tine 2\.0/g, Tine.title) + '</p><br />'
}, {
xtype: 'label',
html: '<p>' + i18n._('Following you find a list of all supported import formats and a sample file, how Tine 2.0 expects your file to look like.').replace(/Tine 2\.0/g, Tine.title) + '</p><br />'
html: '<p>' + importText + '</p><br />'
}, {
xtype: 'label',
html: '<p>' + i18n._('Please select the import format of the file you want to upload').replace(/Tine 2\.0/g, Tine.title) + '</p>'
Expand All @@ -313,7 +313,6 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
html: example ? ('<p><a href="' + example + '">' + i18n._('Download example file') + '</a></p>') : '<p>&nbsp;</p>'
}, {
xtype: 'displayfield',
// fieldLabel: i18n._('Import description'),
ref: '../../definitionDescription',
height: 70,
value: description,
Expand Down Expand Up @@ -483,13 +482,7 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
frame: true,
ref: '../conflictsPanel',
canonicalName: 'ImportResolveConflicts',
items: [/*{
xtype: 'label',
ref: '../conflictsLabel',
rawText: '<p>' + i18n._('There are {0} {1} that might already exist.') + '</p>',
html: '<p></p>',
height: 20
},*/ {
items: [{
xtype: 'paging',
ref: '../conflictPagingToolbar',
pageSize: 1,
Expand Down Expand Up @@ -661,14 +654,8 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
return this.summaryPanel;
}
var exceptionExpander = new Ext.ux.grid.RowExpander({
tpl : new Ext.XTemplate('{[this.showClientRecord(values)]}', { showClientRecord: function(values) {
tpl : new Ext.XTemplate('{[this.showClientRecord(values)]}', { function(values) {
if (values && values.exception && values.exception.clientRecord) {
// there is no generic detailsPanel retirval yet
// if (Ext.isObject(values.exception.clientRecord)) {
// var detailsPanel = new Tine.Addressbook.ContactGridDetailsPanel({});
//
// return detailsPanel.tpl.apply(values.exception.clientRecord);
// }
return Ext.util.Format.htmlEncode(Ext.encode(values.exception.clientRecord));
} else {
return i18n._('No Detail Informations');
Expand Down Expand Up @@ -858,8 +845,7 @@ Tine.widgets.dialog.ImportDialog.openWindow = function (config) {
height: 600,
name: Tine.widgets.dialog.ImportDialog.windowNamePrefix + Ext.id(),
contentPanelConstructor: 'Tine.widgets.dialog.ImportDialog',
contentPanelConstructorConfig: config//,
// modal: true
contentPanelConstructorConfig: config
});
return window;
};
8 changes: 6 additions & 2 deletions tine20/Tinebase/translations/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -3894,6 +3894,9 @@ msgstr "Konfiguriere was mit den Daten gelöschter Benutzer geschehen soll"
msgid "Delete personal containers"
msgstr "Lösche persönliche Ordner"

msgid "Personal container"
msgstr "Persönlicher Ordner"

#: Config.php:953
msgid "Delete file folders and files"
msgstr "Dateien und Ordner löschen"
Expand Down Expand Up @@ -6474,8 +6477,9 @@ msgstr "Bild in ausgewählter Größe einfügen"
msgid "Image size"
msgstr "Bildgröße"

msgid "Personal container"
msgstr "Persönlicher Ordner"
msgid "Following you find a list of all supported import formats."
msgstr ""
"Nachfolgend finden Sie eine Liste mit allen unterstützten Import-Formaten."

msgid "Reload the application"
msgstr "Anwendung neu laden"

0 comments on commit c2d5f79

Please sign in to comment.