<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" 
      xmlns="http://purl.org/atom/ns#"
	  xmlns:dc="http://purl.org/dc/elements/1.1/"
	  xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
      xml:lang="ja">
#set($listAction = $link.setRelative('/search'))
#prepareSearchTaskAction($listAction $taskQuery $taskPager)
#set($atomAction = $link.setAction('/atom/searchLatest'))
#prepareSearchTaskAction($atomAction $taskQuery $taskPager)

#set($listActionString = $listAction.toStatelessString())
#set($atomActionString = $atomAction.toStatelessString())

$uriBase

  <title>WorkStyle</title>
  <link rel="alternate" type="text/html" href="$request.scheme://$request.serverName:$request.serverPort$listActionString" />
  <link rel="service.post" type="application/x.atom+xml" href="$request.scheme://$request.serverName:$request.serverPort$atomActionString" title="WorkStyle" />
  
#if($taskList.size() > 0)
#set ($lastIndex = $taskList.size() - 1)
#set ($updateDate = $taskList.get($lastIndex).updateDate)
#end
  <modified>$utils.formatDateRss($updateDate)</modified>
  <author>
    <name>yher.net</name>
  </author>
  <id>$request.scheme://$request.serverName:$request.serverPort$listActionString</id>
  <generator url="$request.scheme://$request.serverName:$request.serverPort$link.contextPath" version="0.1">WorkStyle</generator>
  
#foreach($task in $taskList)
#set ($viewAction = $link.setAction('/view').addQueryData('taskId', $task.taskId).addQueryData('dummy', $task.updateDate).toStatelessString())
#set ($idAction = $link.setAction('/view').addQueryData('taskId', $task.taskId).addQueryData('dummy', $task.updateDate).toStatelessString())
  <entry>
    <title>$task.taskId $utils.cut($task.contents, 30)</title>
    <link rel="alternate" type="text/html" 
    	href="$request.scheme://$request.serverName:$request.serverPort$viewAction" />
    <issued>$utils.formatDateRss($task.updateDate)</issued>
    <modified>$utils.formatDateRss($task.updateDate)</modified>
    <created>$utils.formatDateRss($task.createDate)</created>
    <author>
      <name>nobody</name>
    </author>
    <id>$request.scheme://$request.serverName:$request.serverPort$idAction</id>
	<summary type="text/plain">$utils.cut($task.contents, 150)</summary>
	
	<dc:subject>$task.taskId $utils.cut($task.contents, 30)</dc:subject>
	
    <content 
    	type="application/xhtml+xml" 
    	xml:lang="ja">

		<div xmlns="http://www.w3.org/1999/xhtml">
			<p style="font-family: 'Arial', 'Osaka', 'ＭＳ Ｐゴシック';">
			<div style="float:left; margin: 8px; text-align:center;width:128px;font-size:x-small;">
				<img src="$request.scheme://$request.serverName:$request.serverPort$request.contextPath/resources/skin/default/image/icon/$utils.image($task.statusBean.image, 128)"/>
				<img src="$request.scheme://$request.serverName:$request.serverPort$request.contextPath/resources/skin/default/image/icon/starset-${task.priority}h.gif"/><br />
				<span style="color: #aaa;">見積: $task.estimatedManHour, 〆切: $utils.formatDate($task.deadEndDate)</span>
			</div>
#set ($tagList = $task.tagAsList)
			<ul style="line-height: 2em;list-style: none;">
#foreach($tag in $tagList)
				<li style="background-color: #EEEEEE;border: 1px solid #DDDDDD;display: inline;padding: 1px;margin-right: 4px;padding: 2px;font-weight: normal;font-size: small;">
					$tag
				</li>
#end
			</ul>
			$utils.formatHtmlSimple($task.contents)

#if ($task.taskCommentBeans.size() > 0)
			<dl style="clear:both;font-size:small;border: 1px solid #999999; background-color:#EEEEEE;padding: 5px;line-height: 1.5em;">
#foreach ($comment in $task.taskCommentBeans)
				<dt style="font-weight:bold;">$comment.commentator ($utils.formatTimestamp($comment.updateDate))</dt>
				<dd style="margin-bottom:5px;">
				$utils.formatHtmlSimple($comment.contents)
				</dd>
#end
			</dl>
#end
			</p>
		</div>
	</content>
  </entry>
#end
</feed>