mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
i18n fixes
This commit is contained in:
parent
e56263564c
commit
6c8b10753d
11 changed files with 18 additions and 17 deletions
|
@ -176,6 +176,7 @@ func processDocument(ctx domain.RequestContext, r *env.Runtime, store *store.Sto
|
|||
document.UserID = ctx.UserID
|
||||
documentID := uniqueid.Generate()
|
||||
document.RefID = documentID
|
||||
document.Sequence = doc.Unsequenced
|
||||
|
||||
if r.Product.Edition == domain.CommunityEdition {
|
||||
document.Lifecycle = workflow.LifecycleLive
|
||||
|
|
|
@ -66,6 +66,8 @@ func FilterCategoryProtected(docs []doc.Document, cats []category.Category, memb
|
|||
|
||||
// CopyDocument clones an existing document
|
||||
func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (newDocumentID string, err error) {
|
||||
unseq := doc.Unsequenced
|
||||
|
||||
doc, err := s.Document.Get(ctx, documentID)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "unable to fetch existing document")
|
||||
|
@ -79,6 +81,7 @@ func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (
|
|||
doc.VersionID = ""
|
||||
doc.GroupID = ""
|
||||
doc.Template = false
|
||||
doc.Sequence = unseq
|
||||
|
||||
// Duplicate pages and associated meta
|
||||
pages, err := s.Page.GetPages(ctx, documentID)
|
||||
|
|
|
@ -93,6 +93,7 @@ func (h *Handler) SavedList(w http.ResponseWriter, r *http.Request) {
|
|||
func (h *Handler) SaveAs(w http.ResponseWriter, r *http.Request) {
|
||||
method := "template.saved"
|
||||
ctx := domain.GetRequestContext(r)
|
||||
unseq := doc.Unsequenced
|
||||
|
||||
if !h.Runtime.Product.IsValid(ctx) {
|
||||
response.WriteBadLicense(w)
|
||||
|
@ -149,6 +150,7 @@ func (h *Handler) SaveAs(w http.ResponseWriter, r *http.Request) {
|
|||
doc.ID = 0
|
||||
doc.Template = true
|
||||
doc.Lifecycle = workflow.LifecycleLive
|
||||
doc.Sequence = unseq
|
||||
|
||||
// Duplicate pages and associated meta
|
||||
pages, err := h.Store.Page.GetPages(ctx, model.DocumentID)
|
||||
|
@ -342,6 +344,7 @@ func (h *Handler) Use(w http.ResponseWriter, r *http.Request) {
|
|||
d.SpaceID = spaceID
|
||||
d.UserID = ctx.UserID
|
||||
d.Name = docTitle
|
||||
d.Sequence = doc.Unsequenced
|
||||
|
||||
if h.Runtime.Product.Edition == domain.CommunityEdition {
|
||||
d.Lifecycle = workflow.LifecycleLive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue