<!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 tal:omit-tag="" metal:fill-slot="breadcrumbs">
	&gt; <label tal:omit-tag="" i18n:translate="">knowledge building</label>
</span>

<span tal:omit-tag="" metal:fill-slot="main_content_slot">
    <table tal:condition="isTeacher" width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#EEEEEE">
        <tr>
            <td width="30" align="center"><img src="images/kb_context" height="20" width="20" i18n:attributes="alt" alt="Create context" /></td>
            <td>
            	<a href="add_course_context_form" class="link2" i18n:translate="">Create new context</a>
            </td>
        </tr>
    </table>
<p />
	<table border="0" cellpadding="2" cellspacing="0" width="100%">
	<span tal:omit-tag="" tal:repeat="cc context/get_course_contexts">
       	<tr tal:condition="python:isTeacher or cc.public==1">
			<td bgcolor="#EEEEEE" width="30" align="center">
				<img src="images/kb_context" alt="" height="20" width="20" />
			</td>
			<td bgcolor="#EEEEEE">
				<strong>
				<a href="" tal:attributes="href string:${cc/id}/" tal:content="cc/get_name"></a>
				</strong>
			</td>
			<td bgcolor="#EEEEEE" align="right">
			&nbsp;
				<a tal:condition="isTeacher" href="" tal:attributes="href string:context_form_handler?cc_id=${cc/id}">
				  <label tal:omit-tag="" tal:condition="python:cc.public==1" i18n:translate="">Published</label>
				  <label tal:omit-tag="" tal:condition="python:cc.public==0" i18n:translate="">Not published</label>
				</a>
			</td>
       	</tr>
		<tr>
			<td colspan="3">
				<strong tal:define="newnotes python:cc.get_n_unread_notes(str(user))" tal:omit-tag="python:newnotes==0">
						<label tal:replace="newnotes" />
						<label tal:omit-tag="" i18n:translate="" tal:condition="python:newnotes>1">new notes</label>
						<label tal:omit-tag="" i18n:translate="" tal:condition="python:newnotes==1">new note</label>
						<label tal:omit-tag="" i18n:translate="" tal:condition="python:newnotes<1">new notes</label>
				</strong> 
				/ <label tal:replace="cc/get_n_notes" /> 
				  <label tal:omit-tag="" i18n:translate="" tal:condition="python:cc.get_n_notes()==1">message</label>
				  <label tal:omit-tag="" i18n:translate="" tal:condition="python:cc.get_n_notes()>1">messages</label>
				  <label tal:omit-tag="" i18n:translate="" tal:condition="python:cc.get_n_notes()<1">messages</label>
			</td>
		</tr>
		<tr>
			<td colspan="3">
				<p><label tal:replace="cc/get_description" />
				(<a href="" tal:attributes="href string:${cc/id}/" i18n:translate="">Full description</a>)
				</p>
				<span tal:omit-tag="" tal:condition="python:len(cc.get_children('Note'))>0">
				</span>
			</td>
		</tr>
	</span>	
	</table>
		
</span>
</html>
