<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html metal:use-macro="container/page_macro/macros/master_page">

<span metal:fill-slot="main_content_slot">
	  &gt; <a href=".." i18n:translate="">knowledge building</a>
	  &gt; <label tal:omit-tag="" tal:content="python:context.aq_parent.get_name()" />
	  &gt; <label tal:omit-tag="" i18n:translate="">creating a new note</label>
<!--	FIX:something missing, content.dtml maybe  
	  <span tal:omit-tag="" tal:content="structure python:context.aq_parent.aq_parent"/>
	  <span tal:omit-tag="" tal:content="structure python:content(ret_self().parent().parent(), REQUEST)"/>
	  
	Displays note
	
	<dtml-unless "ret_self().parent().parent().is_course_context()">
  <dtml-var expr="content(ret_self().parent().parent(), REQUEST)">
</dtml-unless>
-->
  
	  <form action="edit_note_form_handler" method="post" enctype="multipart/form-data" tal:define="tt context/get_tt_ref">
	  	  <table border="0" cellpadding="4" cellspacing="0" width="100%" bgcolor="#EEEEEE">
		  <tr>
		  	  <td>
				<span tal:replace="structure python:tt.get_tt_icon_tag(request)" />
				<strong tal:content="tt/get_name" />
				<br />
				<br />
				<label tal:omit-tag="" i18n:translate="">Title for the note:</label>
				<br />
				<input type="text" name="subject:string" size="45" value="" tal:attributes="value context/get_subject | default" /> 
			</td>
			<td align="right">
				<label tal:omit-tag="" tal:content="python:str(user)" />
				<span tal:omit-tag="" tal:replace="structure python:context.fle_root().fle_users.get_user_info(str(user)).get_photo_tag(request, height='40')" />
			</td>
		  </tr>
		  <table>
		  
		  <table border="0" cellpadding="0" cellspacing="0" width="100%">
		  	<tr>
		  		<td align="right" tal:content="python:context.get_printable_current_time(request)"></td>
		  	</tr>
		  </table>
		  
		  <table border="0" cellpadding="0" cellspacing="0" width="100%">
		  <tr>
		  	<td valign="top" colspan="2" style="width:500px">
			Message:<br />
				<textarea name="body:string" cols="60" rows="20" tabindex="2" tal:content="context/body | context/get_body"></textarea>
			</td>

		 	<td rowspan="2">&nbsp;</td>
			<td rowspan="2" style="text-align:left" valign="top">
			  <span tal:omit-tag="" tal:condition="tt/has_checklist">
				<br />
				<h3 i18n:translate="">tt checklist(FLE asks/IVA asks)</h3>
				<span tal:replace="structure tt/render_checklist" />
			  </span>
			  
			  <span tal:content="python:context.ret_self().parent().parent().get_possible_follow_ups()" tal:on-error="string:some error" />
<!-- 	FIX:friiki stuff
   <dtml-let ups="ret_self().parent().parent().get_possible_follow_ups()">
    <dtml-if "_.len(ups)>1">
      <h3><dtml-var L_change_type></h3>
      <select name="tt_id_new">
      <dtml-in ups>
        <option value="<dtml-var get_id>"<dtml-if
        "get_id()==get_tt_id()"> selected="selected"</dtml-if>><dtml-var get_name></option>
      </dtml-in>
      </select>
      <input type="submit" name="change_tt" value="<dtml-var L_change>" />
    <dtml-else>
      <h3><dtml-var L_no_change_possible></h3>
    </dtml-if>
-->						  
			</td>	
		  </tr>
		  <tr>
		  <tr tal:condition="context/has_image">
			<td valign="top" i18n:translate="">Current image:</td>
			<td><img src="" tal:attributes="src string:${context/hack_absolute_url}/get_image_data" /></td>
		  </tr>
		  <tr tal:condition="context/has_image">
		  	<td i18n:translate="">Replace image with:</td>
			<td><input type="file" name="image" tabindex="3" class="width240" /></td>
		  </tr>
		  <tr tal:condition="not:context/has_image">
		  	<td i18n:translate="">Add image:</td>
			<td><input type="file" name="image" tabindex="3" class="width240" /></td>
		  </tr>
		  <tr>
			<td style="width:120px" i18n:translate="">Title for the image:</td>
			<td>
				<input type="text" name="image_name:string" size="36" value="" 
					tal:attributes="value context/image_name | context/get_image_name" tabindex="4" class="width240" />
			</td>
		  </tr>
		  <tr>
			<td i18n:translate="">Add link:</td>
			<td>
				<input type="text" name="url:string" size="36" value=""
					tal:attributes="value context/my_url | context/get_url" tabindex="5" class="width240" />
			</td>
		  </tr>
		  <tr>
			<td i18n:translate="">Title of the link:</td>
			<td>
				<input type="text" name="url_name:string" value="" 
					tal:attributes="value url_name | context/get_url_name" size="36" tabindex="6" class="width240" />
			</td>
		  </tr>
		  <tr>
			<td colspan="2">&nbsp;</td>
		  </tr>
		  <tr>
              <td>&nbsp;</td>
              <td>
              	<input type="submit" value="Preview" name="preview" tabindex="7" />
              	<input type="submit" value="Cancel" name="cancel" tabindex="8" />
              </td>
		  </tr>
		  </table>
	  </form>
</span>

</html>
