<!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">

		<div tal:omit-tag="" tal:condition="python:here.kas_opetaja(request) or user.has_role(('Manager','IVAAdmin',))">
			&gt; <label i18n:translate="">Courses</label>
			<br />
			<br />
			<form action="courses_form_handler" method="post">
			<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#EEEEEE">
				<tr>
					<td width="25%" align="center">
						<a href="manage_course_info" class="link2" i18n:translate="">Add course</a>
					</td>
					<td width="25%" align="center">
						<a href="manage_import_form" class="link2" i18n:translate="">Import course</a>
					</td>
					<td width="25%" align="center">
						<a href="manageCategories" class="link2" i18n:translate="">Course categories</a>
					</td>
					<td width="25%" align="center">
						<a href="../typesets/" class="link2" i18n:translate="">Knowledge Type Management</a>
					</td>
				</tr>
			</table>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<img src="images/transparent_gif" height="8" width="10" alt="" />
					</td>
				</tr>
			</table>
			<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#EEEEEE">
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td><a href="" tal:attributes="href string:?sortc=2" i18n:translate="">Course name</a></td>
					<td style="width:200px"><a href="" tal:attributes="href string:?sortc=1" i18n:translate="">Category</a></td>
				</tr>
				<tr tal:repeat="course python:context.get_courses(request)">
					<td class="t1" width="30" tal:condition="python:here.kas_opetaja(request) or request.AUTHENTICATED_USER.has_any_role(('Manager','IVAAdmin',))">
						<input type="checkbox" value="" tal:attributes="value course/get_id" name="course_ids" />
					</td>
					<td class="t1" width="30" tal:condition="python:here.kas_opetaja(request) or request.AUTHENTICATED_USER.has_any_role(('Manager','IVAAdmin',))">
						<a href="#" tal:attributes="href string:sea_jooksev_kursus?kursus=${course/get_id}">GO</a>
					</td>
					<td class="t1">
						<a href="" tal:attributes="href string:${course/get_id}/manage_course_info" tal:content="course/get_name"></a>
					</td>
					<td class="t1"><a href="" tal:attributes="href string:?filter=${course/getCourseCategory}" tal:content="python:context.getNameForID(course.getCourseCategory())"></a></td>
				</tr>
			</table>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<img src="images/transparent_gif" height="8" width="10" alt="" />
					</td>
				</tr>
			</table>
			<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#EEEEEE">
				<tr>
					<td>
						<input type="submit" value="Export" i18n:attributes="value" name="course_export" tal:attributes="disabled not:context/has_courses" disabled="disabled" />
						<input type="submit" value="Delete" i18n:attributes="value" name="delete" tal:attributes="disabled not:context/has_courses" disabled="disabled" />
					</td>
				</tr>
			</table>
			</form>
		</div>
		
 </span> 
</html>
