{# Copyright (C) 2006-2023 Edgewall Software This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at https://trac.edgewall.org/wiki/TracLicense. This software consists of voluntary contributions made by many individuals. For the exact contribution history, see the revision history and logs, available at https://trac.edgewall.org/. #} # extends 'layout.html'
{# Note: the wiki edit page can be presented according to several modes: - "standard" or "side-by-side" edit mode (`sidebyside` is true in the second mode) In standard mode, the edit area is on top of the preview, in side-by-side mode there are next to each other. - "edit" or "edit+preview" mode (`action == 'preview'` is true in the second mode) In edit mode, only the textarea is visible, but not the preview. In sidebyside mode, we always have a preview. In this category, we also have the "collision mode" (`action == 'collision'`), which happens when a concurrent edit has been detected. - "wiki preview" or "diff preview" (`diff` is true in the second mode) When the preview is shown, it can be either an actual preview of the rendered wiki text, or it can be a diff view on the changes that have been made (a.k.a. "review mode"). In the latter case, `changes[0].diffs` contains the data for the diffs, if any. See `preview_or_review` below. #} # block head ${ super() }
# endblock head
# block content
# set preview_or_review = action == 'preview' and (not diff or changes[0].diffs) # if not sidebyside and preview_or_review:
# endif

# ${_("Editing %(name)s", name=name_of(page.resource))}

{# Normal preview mode, edit form followed by preview: | [include "wiki_edit_form.html" ] | | == Preview == | | [.Revision #info...................................] | | [.....#preview.....................................] Side-by-side edit/preview mode: | [.Revision #info...................................] | | == Preview == | [......#preview......] | [include "wiki_edit_form.html"] (the #preview will float at the right of the edit form's textarea) #} # if action == 'collision':
# trans Sorry, this page has been modified by somebody else since you started editing. Your changes cannot be saved. # endtrans
# endif # if not sidebyside: # include 'wiki_edit_form.html' # endif # if merge:

# trans Someone else has modified that page since you started your edits. # endtrans

# trans If you save right away, you risk to revert those changes (highlighted below as deletions). # endtrans

# trans Please review all those changes and manually merge them with your own changes.
If you're unsure about what you're doing, please press `Cancel` (losing your changes) and start editing the latest version of the page again. # endtrans

# endif # if action == 'preview':

# trans version = page.version + 1, author Change information for future version ${version} (modified by ${author}): # endtrans
${wiki_to_html(context.child(page.resource(version=none)), comment)}

# if not sidebyside and preview_or_review:

## # if diff: ${_("Review Changes")} # else: ${_("Preview")} # endif

# endif # if not preview_or_review:

## ${_("No changes")}

# endif
# if diff:
# with no_id = true # include 'diff_div.html' # endwith
# else:
${wiki_to_html(context, page.text)}
# endif
# if not sidebyside and page.text:
# endif
# endif # if sidebyside: # include 'wiki_edit_form.html' # endif # with alist = attachments, compact = true, foldable = true # include 'list_of_attachments.html' # endwith # call(note, page) jmacros.wikihelp('TracWiki'): # trans note, page ${note} See ${page} for help on using the wiki. # endtrans # endcall
${ super() } # endblock content