... | in edit_post.naml |
1 2 3 4 5 6 7 8 9 10 11 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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
<override_macro name="edit_post" 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.set_var. name="value1"><n.page_node.raw_subject/></n.set_var.>
<n.set_var. name="value"><n.page_node.raw_subject/></n.set_var.>
<n.if.not.is_submitted_form>
<then>
<n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
<then>
<n.set_var. name="value"><n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
</then>
</n.if.contains_substring>
<n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
<then>
<!--<n.jsm_checkboxfull_field.set_value value="[n.true/]" /> -->
<n.set_var. name="value"><n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
</then>
</n.if.contains_substring>
<n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
<then>
<n.set_var. name="value"><n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
</then>
</n.if.contains_substring>
<n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
<then>
<n.set_var. name="value"><n.jsm_limpamark_chkhelp texto="[n.var name='value1'/]" /></n.set_var.>
</then>
</n.if.contains_substring>
<n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
<then>
<n.set_var. name="value"><n.jsm_limpamark_chkexclama texto="[n.var name='value1'/]" /></n.set_var.>
</then>
</n.if.contains_substring>
<n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
<then>
<n.set_var. name="value"><n.jsm_limpamark_chkadm texto="[n.var name='value1'/]" /></n.set_var.>
</then>
</n.if.contains_substring>
<n.subject_field.set_value value="[n.var name='value'/]" />
<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/]" />
<n.alert_field.set_value value="[n.page_node.visitor_is_subscribed_to_topic/]" />
<n.page_node.init_edit_post_custom_fields/>
</then>
<else>
<n.catch_exception. id="save-block">
<n.edit_page_node. commit="[n.not.is_preview/]">
<n.set_var. name="marksfinal"></n.set_var.>
<n.if.jsm_checkboxnew_field.is_checked>
<then>
<n.set_var. name="marksfinal">¬n¬</n.set_var.>
</then>
</n.if.jsm_checkboxnew_field.is_checked>
<n.if.jsm_checkboxfull_field.is_checked>
<then>
<n.set_var. name="marksfinal">¬¢¬</n.set_var.>
</then>
</n.if.jsm_checkboxfull_field.is_checked>
<n.if.jsm_checkboxnormal_field.is_checked>
<then>
<n.set_var. name="marksfinal">¬.¬</n.set_var.>
</then>
</n.if.jsm_checkboxnormal_field.is_checked>
<n.if.jsm_checkboxhelp_field.is_checked>
<then>
<n.set_var. name="marksfinal">¬h¬</n.set_var.>
</then>
</n.if.jsm_checkboxhelp_field.is_checked>
<n.if.jsm_checkboxexclama_field.is_checked>
<then>
<n.set_var. name="marksfinal">¬e¬</n.set_var.>
</then>
</n.if.jsm_checkboxexclama_field.is_checked>
<n.if.visitor.is_site_admin>
<then>
<n.if.jsm_checkboxadm_field.is_checked>
<then>
<n.set_var. name="marksfinal">¬a¬</n.set_var.>
</then>
</n.if.jsm_checkboxadm_field.is_checked>
</then>
</n.if.visitor.is_site_admin>
<n.if.equal value1="[n.var name='marksfinal'/]" value2="">
<then>
<n.set_subject subject="[n.subject_field.value/]" />
</then>
<else>
<n.set_subject subject="[n.subject_field.value/] [n.var name='marksfinal'/]" />
</else>
</n.if.equal>
<n.set_message message="[n.message_field.value/]" is_html="[n.not.is_null.html_format_field.value/]" />
<n.if.not.is_preview>
<then.save_post />
</n.if.not.is_preview>
</n.edit_page_node.>
<n.if.not.is_preview>
<then>
<n.page_node.save_alert_field/>
<n.page_node.save_edit_post_custom_fields/>
<n.redirect_to.page_node.url/>
</then>
</n.if.not.is_preview>
</n.catch_exception.>
</else>
</n.if.not.is_submitted_form>
<n.html>
<head>
<META NAME="robots" CONTENT="noindex,nofollow"/>
<n.title.><t>Edit Post</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 Post[/t]" second_text="[n.page_node.get_app_node.subject/]" />
<!-- multiplo editor -->
<script type="text/javascript">
<n.editor_script_jsm/>
</script>
<br/><button onClick="addArea2();" class="toolbar action-button">Visual Editor</button> <button onClick="removeArea2();" class="toolbar action-button">Nabble Editor</button>
<n.if.is_submitted_form>
<then>
<n.if.is_preview>
<then>
<n.page_node.preview/>
</then>
</n.if.is_preview>
<n.show_edit_post_error/>
</then>
</n.if.is_submitted_form>
<n.form.>
<n.edit_post_form />
<div style="margin-top:1em">
<input type="submit" class="toolbar action-button" value="[t]Post Message[/t]" />
<input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]" />
<t>or</t> <a href="[n.page_node.url/]"><t>Cancel</t></a>
</div>
</n.form.>
</body>
</n.html>
</n.node_page.>
</override_macro>
|
... | in edit_post.naml |
1 2 3 4 5 6 7 8 9 10 11 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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
<macro name="edit_post" 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/]" />
<n.alert_field.set_value value="[n.page_node.visitor_is_subscribed_to_topic/]" />
<n.page_node.init_edit_post_custom_fields/>
</then>
<else>
<n.catch_exception. id="save-block">
<n.edit_page_node. commit="[n.not.is_preview/]">
<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.if.not.is_preview>
<then.save_post />
</n.if.not.is_preview>
</n.edit_page_node.>
<n.if.not.is_preview>
<then>
<n.page_node.save_alert_field/>
<n.page_node.save_edit_post_custom_fields/>
<n.redirect_to.page_node.path/>
</then>
</n.if.not.is_preview>
</n.catch_exception.>
</else>
</n.if.not.is_submitted_form>
<n.html>
<head>
<META NAME="robots" CONTENT="noindex,nofollow"/>
<n.title.><t>Edit Post</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 Post[/t]" second_text="[n.page_node.get_app_node.subject/]" />
<n.if.is_submitted_form>
<then>
<n.if.is_preview>
<then>
<n.page_node.preview/>
</then>
</n.if.is_preview>
<n.show_edit_post_error/>
</then>
</n.if.is_submitted_form>
<n.form.>
<n.edit_post_form />
<div style="margin-top:1em">
<input type="submit" class="toolbar action-button" value="[t]Post Message[/t]" />
<input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]" />
<t>or</t> <a href="[n.page_node.path/]"><t>Cancel</t></a>
</div>
</n.form.>
</body>
</n.html>
</n.node_page.>
</macro>
|
Free forum by Nabble | Nabble® |