<!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="main_content_slot">
	&gt; <label tal:omit-tag="" i18n:translate="">knowledge building</label>
    <table tal:condition="python:context.kas_opetaja(request)" 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:context.kas_opetaja(request) 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="python:context.kas_opetaja(request)" href="" tal:attributes="href string:context_form_handler?cc_id=${cc/id}">
				  <label tal:condition="python:cc.public==1" i18n:translate="">Published</label>
				  <label tal:condition="python:cc.public==0" i18n:translate="">Not published</label>
				</a>
			</td>
       	</tr>
		<tr>
			<td colspan="3">
				<strong>
						<label tal:content="python:cc.get_n_unread_notes(str(user))" />	
						<label i18n:translate="">new notes</label>
				</strong> 
				/ <label tal:content="cc/get_n_notes" /> <label i18n:translate="">messages</label>
			</td>
		</tr>
		<tr>
			<td colspan="3">
				<p><label tal:content="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">
				abs
				</span>
			</td>
		</tr>
	</span>	
	</table>
		
</span>
</html>
<!-- <dtml-if expr="_.len(cc.get_children('Note'))>0">
    <ul>
    <dtml-in expr="cc.get_children('Note')">
      <dtml-let note=sequence-item uname="get_current_user(REQUEST)"
      cc="_['sequence-item'].find_course_context()">
        <dtml-unless "note.is_temporary()">
        <li><dtml-var expr="note.get_tt_icon_tag(REQUEST)">
        <a href="<dtml-var expr="state_href(REQUEST, cc.get_id() + '/' + note.get_id() + '/index_html')">">
        <strong><dtml-var expr="note.get_subject(REQUEST)"></strong></a> /
        <dtml-var expr="note.get_author()"> /
        <dtml-var expr="note.get_printable_creation_time(REQUEST)">
        <dtml-unless "note.is_reader(uname)"></dtml-unless>
        <dtml-let count_new="note.get_n_unread_notes(get_current_user(REQUEST))">
          (<strong><dtml-if "count_new>0"><a href="<dtml-var expr="state_href(REQUEST, cc.get_id() +
          '/' + note.get_id() + '/index_html#new')">"></dtml-if><dtml-var count_new>
          <dtml-var "L_new_notes"><dtml-if "count_new>0"></a></dtml-if></strong> / <dtml-var
          expr="note.get_n_notes()"> <dtml-var "L_notes_total">)
        </dtml-let>
        </li>
        </dtml-unless>
      </dtml-let>
    </dtml-in>
    </ul>
  </dtml-if>
    </td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
</dtml-if>
-->
