add format tips
authorraph
Mon, 11 Oct 2010 15:04:45 +0200
changeset 321 e13b6d92f70c
parent 320 1132f5f6eddf
child 322 c7eac1e0b46a
add format tips
src/cm/templates/site/macros/form_fields.html
src/cm/templates/site/text_create_content.html
src/cm/templates/site/text_create_upload.html
--- a/src/cm/templates/site/macros/form_fields.html	Mon Oct 11 14:46:20 2010 +0200
+++ b/src/cm/templates/site/macros/form_fields.html	Mon Oct 11 15:04:45 2010 +0200
@@ -7,7 +7,12 @@
      <td>
         <div {% if field.errors %}class="error"{% endif %}>{{ field }}
         {% ifequal field.name "format" %}
-        <a target="_blank" href="{% url help %}#format">?</a>
+        	{% ifequal form_type "create_content" %}
+        	<a class="tip" href="#" title="{% blocktrans %}Markdown (or rst) is a structured format which permit simple formatting with simple textual syntax. We recommend you use the 'markown' format unless you want to paste HTML (in which case you should use the 'html' format).{% endblocktrans %}"> </a>
+        	{% endifequal %}
+        	{% ifequal form_type "upload_content" %}
+        	<a class="tip" href="#" title="{% blocktrans %}Markdown (or rst) is a structured format which permit simple formatting with simple textual syntax. We recommend you use the 'markdown' format if your text is mostly text and/or if you will create many revisions of your text. You can use the 'html' format if your text will not be edited or if you want to preserve complex formatting (tables, images, etc.).{% endblocktrans %}"> </a>
+        	{% endifequal %}        	
         {% endifequal %}
         </div>                
 
--- a/src/cm/templates/site/text_create_content.html	Mon Oct 11 14:46:20 2010 +0200
+++ b/src/cm/templates/site/text_create_content.html	Mon Oct 11 15:04:45 2010 +0200
@@ -36,7 +36,9 @@
 <form id="text_create_content" enctype="multipart/form-data" class="wizard-form" action="." method="post">
 <table class="wide_form">
     <tbody>
-    {% include "site/macros/form_fields.html" %}    
+    {% with 'create_content' as form_type %} 
+	    {% include "site/macros/form_fields.html" %}
+    {% endwith %}    
     <tr>
         <td style="vertical-align: top; width: 20%; text-align:right;">
         </td>
--- a/src/cm/templates/site/text_create_upload.html	Mon Oct 11 14:46:20 2010 +0200
+++ b/src/cm/templates/site/text_create_upload.html	Mon Oct 11 15:04:45 2010 +0200
@@ -31,7 +31,9 @@
 <form id="text_create_upload" enctype="multipart/form-data" class="wizard-form" action="." method="post">
 <table class="wide_form">
     <tbody>
-    {% include "site/macros/form_fields.html" %}    
+    {% with 'upload_content' as form_type %}     
+	    {% include "site/macros/form_fields.html" %}
+    {% endwith %}    	        
     <tr>
         <td style="vertical-align: top; width: 20%; text-align:right;">
         </td>