<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:t="http://www.participatorypolitics.org/"
      xmlns:i18n="http://www.participatoryculture.org/i18n"
      eventCookie="@@@eventCookie@@@" dtvPlatform="@@@dtvPlatform@@@">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<link href="resource:css/main.css" rel="stylesheet" type="text/css" />
<t:include filename="dynamic.js" />
<t:include filename="settings.js" />
</head>
    <t:execOnLoad><![CDATA[
feed = views.feeds.getObjectByID(int(kargs['id']))
]]></t:execOnLoad>

<body>

<form action="javascript:eventURL('template:channel?id=@@@feed.getID()@@@')" method="GET" name="settings">
	<input name="feed" type="hidden" value="@@@feed.getID()@@@" />
	
	<div id="settings-inner">
            <div id="channel-url">
                <div t:replace="feed.getURL()" class="selectable" />
                <div><a class="remove-channel" href="#" onclick="return eventURL('action:removeFeed?id=@@@feed.getID()@@@');"><span i18n:translate="">remove channel</span></a></div>
            </div>
	<h2 i18n:translate="">Settings for <span i18n:name="title" t:replace="feed.getTitle()" /></h2> 
				
		<div id="actual-settings">
		
		<span i18n:translate="">Videos expire after </span>
		<select name="expireAfter" onChange="javascript:setExpiration();">
			<option value="system" selected="1" 
t:hideIf="feed.getExpirationType() != 'system'"><span i18n:translate="">Default</span> 
(<span t:replace="feed.getFormattedDefaultExpiration()" />)</option>
			<option value="system" t:hideIf="feed.getExpirationType() == 
'system'"><span i18n:translate="">default</span> (<span i18n:name="expiration"
t:replace="feed.getFormattedDefaultExpiration()" />)</option>
			<option value="3" selected="1" t:hideIf="feed.getExpirationTime() 
!= 3" i18n:translate="">3 hours</option>
			<option value="3" t:hideIf="feed.getExpirationTime() == 3" 
i18n:translate="">3 hours</option>
			<option value="24" selected="1" 
t:hideIf="feed.getExpirationTime() != 24" i18n:translate="">1 day</option>
			<option value="24" t:hideIf="feed.getExpirationTime() == 24" 
i18n:translate="">1 day</option>
			<option value="72" selected="1" 
t:hideIf="feed.getExpirationTime() != 72" i18n:translate="">3 days</option>
			<option value="72" t:hideIf="feed.getExpirationTime() == 72" 
i18n:translate="">3 days</option>
			<option value="144" selected="1" 
t:hideIf="feed.getExpirationTime() != 144" i18n:translate="">6 days</option>
			<option value="144" t:hideIf="feed.getExpirationTime() == 144" 
i18n:translate="">6 days</option>
			<option value="240" selected="1" 
t:hideIf="feed.getExpirationTime() != 240" i18n:translate="">10 days</option>
			<option value="240" t:hideIf="feed.getExpirationTime() == 240" 
i18n:translate="" >10 days</option>
			<option value="720" selected="1" 
t:hideIf="feed.getExpirationTime() != 720" i18n:translate="">1 month</option>
			<option value="720" t:hideIf="feed.getExpirationTime() == 720" 
i18n:translate="">1 month</option>
			<option value="never" selected="1" 
t:hideIf="feed.getExpirationType() != 'never'" i18n:translate="">Never</option>
			<option value="never" t:hideIf="feed.getExpirationType() == 
'never'" i18n:translate="">Never</option>
		</select>
<br /><br />
		<input type="checkbox" name="maxOutDownloads" onClick="javascript:setMaxNew();" checked="checked" t:hideIf="feed.getMaxNew() == 'unlimited'" />
		<input type="checkbox" name="maxOutDownloads" onClick="javascript:setMaxNew();" t:hideIf="feed.getMaxNew() != 'unlimited'"/>
		<span i18n:translate="">Don't Auto Download when more than 
		<input i18n:name="maxnew" name="maxNew" type="text" size="3" value="3" disabled="1" onBlur="javascript:setMaxNew();" t:hideIf="feed.getMaxNew() != 'unlimited'"/>
		<input i18n:name="maxnew2" name="maxNew" type="text" size="3" value="@@@feed.getMaxNew()@@@" onBlur="javascript:setMaxNew();" t:hideIf="feed.getMaxNew() == 'unlimited'"/>
		videos are waiting unwatched.</span><div i18n:translate="" class="settings-small">Prevents this channel from using unlimited disk space.</div>

	    <div class="gray-button-wrap settings-button">
		    <div id="feed-settings-close-button" class="gray-button-bg" onclick="return hideSettings()" >
                <div class="gray-button-left" />
                <div class="gray-button-right" />
                <div i18:translate="" class="gray-button-content">Done</div>
            </div>
	</div>
 	</div>         
</div>


</form>

</body>
</html>
