download_backup_page

   Usages of this macro
... in backup.naml
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<macro name="download_backup_page" requires="servlet">
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.is_site_admin
Macro
Requires: user
>
        <then>
            <n.login
Macro
Requires: servlet
Parameters: message
.><t>Only authorized users can proceed in this area.</t></n.login.>
        </then>
    </n.if.not.visitor.is_site_admin>
    <n.html
Macro
Parameters: head, body
>
        <head>
            <n.title
Macro
Parameters: text
.><t>Backup</t></n.title.>
        </head>
        <body>
            <h1><t>Backup</t></h1>
 
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_running_backup
Binary
Namespace: NabbleNamespace
>
                <then>
                    <p>
                        <t>The system is generating the backup now. When it is finished, a link to the backup file will be emailed to you.</t>
                    </p>
                </then>
                <else>
                    <p>
                        <t>Here you can download a backup of <t.location.root_node
Binary
Namespace: NabbleNamespace
Parameters: do
.subject
Macro
Requires: node
/>.</t>
                        <t>When you press the button below, the system will start the generation of the backup file and
                        this may take some minutes to finish. You will receive an email with a link to download the file when it is ready.</t>
                    </p>
 
                    <p>
                        <n.form
Macro
Requires: servlet
Parameters: macro, method, onsubmit, content
. macro="start_backup_process">
                            <input type="submit" class="toolbar action-button" value="[t]Generate backup file[/t]"/>
                            <t>or</t>
                            <a href="[n.root_node
Binary
Namespace: NabbleNamespace
Parameters: do
.url
Macro
Requires: node
Parameters: template, date, index_record
/]"><t>Cancel</t></a>
                        </n.form.>
                    </p>
 
                    <p class="light-bg-color rounded" style="padding:.5em 1em;margin-top:2em">
                        <t>The backup file is generated with the <a href="https://github.com/tig100/JdbcPgBackup">JdbcPgBackup</a> tool,
                        which is an open source project in Java. You should visit the project website if you want to restore your backup
                        into a Postgresql database.</t>
                    </p>
                </else>
            </n.if.is_running_backup>
        </body>
    </n.html>
</macro>