Create shares from search and select view

This commit is contained in:
eikek
2021-10-02 23:46:58 +02:00
parent 189009325e
commit aa21e7a74c
14 changed files with 1046 additions and 131 deletions

View File

@ -0,0 +1,82 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.PublishItems exposing
( Texts
, de
, gb
)
import Http
import Messages.Basics
import Messages.Comp.HttpError
import Messages.Comp.ShareForm
import Messages.Comp.ShareView
import Messages.DateFormat
import Messages.UiLanguage
type alias Texts =
{ basics : Messages.Basics.Texts
, httpError : Http.Error -> String
, shareForm : Messages.Comp.ShareForm.Texts
, shareView : Messages.Comp.ShareView.Texts
, title : String
, infoText : String
, formatDateLong : Int -> String
, formatDateShort : Int -> String
, submitPublish : String
, cancelPublish : String
, submitPublishTitle : String
, cancelPublishTitle : String
, publishSuccessful : String
, publishInProcess : String
, correctFormErrors : String
, doneLabel : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, httpError = Messages.Comp.HttpError.gb
, shareForm = Messages.Comp.ShareForm.gb
, shareView = Messages.Comp.ShareView.gb
, title = "Publish Items"
, infoText = "Publishing items creates a cryptic link, which can be used by everyone to see the selected documents. This link cannot be guessed, but is public! It exists for a certain amount of time and can be further protected using a password."
, formatDateLong = Messages.DateFormat.formatDateLong Messages.UiLanguage.English
, formatDateShort = Messages.DateFormat.formatDateShort Messages.UiLanguage.English
, submitPublish = "Publish"
, submitPublishTitle = "Publish the documents now"
, cancelPublish = "Cancel"
, cancelPublishTitle = "Back to select view"
, publishSuccessful = "Items published successfully"
, publishInProcess = "Items are published "
, correctFormErrors = "Please correct the errors in the form."
, doneLabel = "Done"
}
de : Texts
de =
{ basics = Messages.Basics.de
, httpError = Messages.Comp.HttpError.de
, shareForm = Messages.Comp.ShareForm.de
, shareView = Messages.Comp.ShareView.de
, title = "Dokumente publizieren"
, infoText = "Beim Publizieren der Dokumente wird ein kryptischer Link erzeugt, mit welchem jeder die dahinter publizierten Dokumente einsehen kann. Dieser Link kann nicht erraten werden, ist aber öffentlich. Er ist zeitlich begrenzt und kann zusätzlich mit einem Passwort geschützt werden."
, formatDateLong = Messages.DateFormat.formatDateLong Messages.UiLanguage.German
, formatDateShort = Messages.DateFormat.formatDateShort Messages.UiLanguage.German
, submitPublish = "Publizieren"
, submitPublishTitle = "Dokumente jetzt publizieren"
, cancelPublish = "Abbrechen"
, cancelPublishTitle = "Zurück zur Auswahl"
, publishSuccessful = "Die Dokumente wurden erfolgreich publiziert."
, publishInProcess = "Dokumente werden publiziert"
, correctFormErrors = "Bitte korrigiere die Fehler im Formular."
, doneLabel = "Fertig"
}

View File

@ -16,12 +16,14 @@ import Messages.Basics
import Messages.Comp.HttpError
import Messages.Comp.ShareForm
import Messages.Comp.ShareTable
import Messages.Comp.ShareView
type alias Texts =
{ basics : Messages.Basics.Texts
, shareTable : Messages.Comp.ShareTable.Texts
, shareForm : Messages.Comp.ShareForm.Texts
, shareView : Messages.Comp.ShareView.Texts
, httpError : Http.Error -> String
, newShare : String
, copyToClipboard : String
@ -33,6 +35,7 @@ type alias Texts =
, errorGeneratingQR : String
, correctFormErrors : String
, noName : String
, shareInformation : String
}
@ -42,6 +45,7 @@ gb =
, httpError = Messages.Comp.HttpError.gb
, shareTable = Messages.Comp.ShareTable.gb
, shareForm = Messages.Comp.ShareForm.gb
, shareView = Messages.Comp.ShareView.gb
, newShare = "New share"
, copyToClipboard = "Copy to clipboard"
, openInNewTab = "Open in new tab/window"
@ -52,6 +56,7 @@ gb =
, errorGeneratingQR = "Error generating QR Code"
, correctFormErrors = "Please correct the errors in the form."
, noName = "No Name"
, shareInformation = "Share Information"
}
@ -60,6 +65,7 @@ de =
{ basics = Messages.Basics.de
, shareTable = Messages.Comp.ShareTable.de
, shareForm = Messages.Comp.ShareForm.de
, shareView = Messages.Comp.ShareView.de
, httpError = Messages.Comp.HttpError.de
, newShare = "Neue Freigabe"
, copyToClipboard = "In die Zwischenablage kopieren"
@ -71,4 +77,5 @@ de =
, errorGeneratingQR = "Fehler beim Generieren des QR-Code"
, correctFormErrors = "Bitte korrigiere die Fehler im Formular."
, noName = "Ohne Name"
, shareInformation = "Informationen zur Freigabe"
}

View File

@ -19,7 +19,7 @@ import Messages.UiLanguage
type alias Texts =
{ basics : Messages.Basics.Texts
, formatDateTime : Int -> String
, enabled : String
, active : String
, publishUntil : String
}
@ -28,7 +28,7 @@ gb : Texts
gb =
{ basics = Messages.Basics.gb
, formatDateTime = DF.formatDateTimeLong Messages.UiLanguage.English
, enabled = "Enabled"
, active = "Active"
, publishUntil = "Publish Until"
}
@ -37,6 +37,6 @@ de : Texts
de =
{ basics = Messages.Basics.de
, formatDateTime = DF.formatDateTimeLong Messages.UiLanguage.German
, enabled = "Aktiv"
, active = "Aktiv"
, publishUntil = "Publiziert bis"
}

View File

@ -0,0 +1,66 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.ShareView exposing
( Texts
, de
, gb
)
import Messages.Basics
import Messages.DateFormat as DF
import Messages.UiLanguage
type alias Texts =
{ basics : Messages.Basics.Texts
, date : Int -> String
, qrCodeError : String
, expiredInfo : String
, disabledInfo : String
, noName : String
, copyToClipboard : String
, openInNewTab : String
, publishUntil : String
, passwordProtected : String
, views : String
, lastAccess : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, date = DF.formatDateLong Messages.UiLanguage.English
, qrCodeError = "Error generating QR Code."
, expiredInfo = "This share has expired."
, disabledInfo = "This share is disabled."
, noName = "No Name"
, copyToClipboard = "Copy to clipboard"
, openInNewTab = "Open in new tab/window"
, publishUntil = "Published Until"
, passwordProtected = "Password protected"
, views = "Views"
, lastAccess = "Last Access"
}
de : Texts
de =
{ basics = Messages.Basics.de
, date = DF.formatDateLong Messages.UiLanguage.German
, qrCodeError = "Fehler beim Erzeugen des QR-Codes."
, expiredInfo = "Diese Freigabe ist abgelaufen."
, disabledInfo = "Diese Freigae ist nicht aktiv."
, noName = "Ohne Name"
, copyToClipboard = "In die Zwischenablage kopieren"
, openInNewTab = "Im neuen Tab/Fenster öffnen"
, publishUntil = "Publiziert bis"
, passwordProtected = "Passwordgeschützt"
, views = "Aufrufe"
, lastAccess = "Letzter Zugriff"
}