Mercurial Hosting > nabble
diff src/nabble/view/naml/edit_app.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/nabble/view/naml/edit_app.naml Thu Mar 21 19:15:52 2019 -0600 @@ -0,0 +1,92 @@ +<macro name="edit_app" requires="servlet"> + <n.node_page.> + <n.if.not.visitor.can_edit.page_node> + <then> + <n.login.><t>Only authorized users can proceed in this area.</t></n.login.> + </then> + </n.if.not.visitor.can_edit.page_node> + <n.if.not.is_submitted_form> + <then> + <n.subject_field.set_value value="[n.page_node.raw_subject/]" /> + <n.html_format_field.set_value value="[n.page_node.message.is_html_format/]" /> + <n.message_field.set_value value="[n.page_node.message.as_editable/]" /> + </then> + <else> + <n.catch_exception. id="save-block"> + <n.edit_page_node.> + <n.set_subject subject="[n.subject_field.value/]" /> + <n.set_message message="[n.message_field.value/]" is_html="[n.not.is_null.html_format_field.value/]" /> + <n.save_node/> + </n.edit_page_node.> + <n.redirect_to.page_node.path/> + </n.catch_exception.> + </else> + </n.if.not.is_submitted_form> + <n.html> + <head> + <META NAME="robots" CONTENT="noindex,nofollow"/> + <n.title.><t>Edit Name & Description</t></n.title.> + <style type="text/css"> + .title-row { + padding:.2em; + border-width:2px; + border-style:solid; + font-weight:bold; + } + div.field-title { + margin-top: 0; + } + </style> + </head> + <body> + <n.edit_header first_text="[t]Edit Name & Description[/t]" second_text="[n.page_node.get_app_node.subject/]" /> + <n.if.is_submitted_form> + <then> + <n.show_edit_post_error/> + </then> + </n.if.is_submitted_form> + <n.form.> + <n.if.not.visitor.is_registered> + <then> + <div class="field-box light-border-color"> + <div class="second-font field-title"><t>Your Name</t></div> + <div class="weak-color"> + <n.page_node.owner.name/> + </div> + </div> + </then> + </n.if.not.visitor.is_registered> + + <div class="field-box light-border-color"> + <div class="second-font field-title"><t>Name</t></div> + <div class="weak-color"> + <n.subject_field.input size="60" /> + </div> + </div> + + <div class="field-box light-border-color"> + <div class="second-font field-title"><t>Description</t></div> + <div class="weak-color"> + <n.if.visitor.is_registered> + <then> + <n.html_format_field.checkbox /> + <label for="[n.html_format_field.name/]"><t>Description is in HTML Format</t></label><br/> + <div style="margin:.1em 0"> + <n.editor_toolbar + textarea_id="[n.message_field.name/]" + node_id="[n.page_node.id/]" + /> + </div> + </then> + </n.if.visitor.is_registered> + <n.message_field.textarea wrap="SOFT" style="min-width:30em;max-width:55em;width:100%;height:20em;" /> + </div> + </div> + + <input type="submit" value="[t]Save Changes[/t]" /> + <t>or</t> <a href="[n.page_node.path/]"><t>Cancel</t></a> + </n.form.> + </body> + </n.html> + </n.node_page.> +</macro>